KristenA1641094
Kilo Sage

Is this notification's "When to send" a table condition or when an event is triggered? 

 

- If table condition, I suggest changing to event is triggered.

- For event is triggered, you're looking at creating a business rule (you can use the condition on the business rule to only trigger when it needs to send the notification. It will be an advanced business rule and in the script you will so something like this (note, the event is just made up here, if you aren't already using an event, then you should create an event under event registry).

var user = gs.getUserByID(current.getValue('caller'));
var hasItil = user.hasRole('itil');
if(hasItil){
gs.eventQueue("incident.new_work_note", current, user.getID(), user.getName());
} else{
gs.eventQueue('incident.new_work_note', current, '', '');
}