Notification Trigger Email

LakshmanV
Tera Contributor

Create a Schedule job - this should pull the records (RITM) which have similar assigned to(I mean if user have multiple RITM's assigned pull those records)
Notification: Trigger a notification to the assigned to user mentioning that they have RITMs assigned. If any user have only one RITM assigned then don

1 REPLY 1

SN_Learn
Kilo Patron
Kilo Patron

Hi @LakshmanV ,

 

You can try the below:

var count = 0;

var ritmAssignee = new GlideAggregate('sc_task');
ritmAssignee.addEncodedQuery("active=true^assigned_toISNOTEMPTY");
ritmAssignee.groupBy("assigned_to");
ritmAssignee.addAggregate('COUNT');
ritmAssignee.query();
while (ritmAssignee.next()) {
    count = ritmAssignee.getAggregate('COUNT');

    if (count > 1) {
        gs.eventQueue('event.name', current, parm1, parm2);
    }
}

 

In the event.name, create a new event from event registry and replace it.

In parm1 or parm2, pass the email address of the assigned to and send notification.

 

 

----------------------------------------------------------------
Mark this as Helpful / Accept the Solution if this helps.