Scoped App Notification triggered using Scheduled Job and Event

Shaji T M
Tera Contributor

Hi Team, Currently I have a notification that triggered based on a scheduled job. This notification is configured on User table based on an event and the who will receive is set as email field.

This notification includes the count of requests that breached the SLA and the count of upcoming SLA breaches. This notification is send to the assignment group managers.

The scheduled job is to find the manager and corresponding requests counts and it's used in the Event.

Below is the event queue parameters currently using:

gs.eventQueue("x_xyz_aa.sla_breach_warning_mgr",fUserRec,upcomingTaskList.join(","), breachTaskList.join(","));
 
Now I have got another requirement to send the same notification to a set of people configured in another table. This table use the group name field from the group table. 
 
I have tried creating another email script to get Manager Name from event and glide into group table (to get group name)  and the other table (using group name) to get the people information field. But somehow, it's not working as expected as the manager name is not populating using event. May be because the event is already configured with parm1 and parm2.
Any assistance in this is highly appreciated. Also, please let me know if I can achieve this using any other logic.
2 REPLIES 2

Danish Bhairag2
Tera Sage
Tera Sage

Hi @Shaji T M ,

 

U can send a JSON value consisting of different Key Value pairs in one of the event Paramter.

 

For eg parm1 u can send 2 or 3 or more values like this before calling the event 

var jsonValue = {
'manager':manager_name,
'upcomingTask':upcomingTask.join(",")
}

 Then in ur event calling u can do something like this

gs.eventQueue("x_xyz_aa.sla_breach_warning_mgr",fUserRec,JSON.parse(jsonValue),manager_info);

 

Please use proper variable names, i have used random just for eg purpose. This way u can send n number of values in only 1 param 7 2nd param u can use for something else. 

 

Thanks,

Danish

 

Hi @Shaji T M ,

 

If my response was helpful to u could u please mark it as Solution Accepted as well as it will benefit other Users to find right answer.

 

Thanks,

Danish