- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2024 03:46 AM
Hello Everyone.
I have a scenario, when i am changing the caller to new user then system should trigger notification to new caller with name of previous caller in the mail body.
BR:
Dear User,
${number} has been reassigned to you because previous caller ${parm2} is no more active in the system, Please take necessary action.
Dear User,
INC0009005 has been reassigned to you because previous caller is no more active in the system, Please take necessary action.
Expected:
Dear User,
INC0009005 has been reassigned to you because previous caller David Miller is no more active in the system, Please take necessary action.
Thanks.
IT Service Desk.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2024 04:09 AM - edited 05-08-2024 04:11 AM
You mentioned like ${parm2} but you you have to mention like ${event.parm2} because both the parm1 and parm2 are part on event object.
So your email body is like
${number} has been reassigned to you because previous caller ${event.parm2} is no more active in the system, Please take necessary action.
Note: Use my business rule script because I mentioned previous in parm 2
Please mark my answer correct and helpful if this works for you
Thanks and Regards
Sarthak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2024 04:01 AM
You can get the previous caller using the previous parameter(previous.caller_id) and pass it as parameter 2

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2024 04:07 AM
Hi @Vijay Baokar ,
I tried your problem in my PDI and it works for me
Please check your BR to
(function executeRule(current, previous /*null when async*/) {
// Add your code here
gs.log("CHECK CALLER = " + current.caller_id.getDisplayValue() + " ________ " + previous.caller_id.getDisplayValue())
gs.eventQueue('incident.caller.changed',current, current.caller_id.getDisplayValue(),previous.caller_id.getDisplayValue());
})(current, previous);
And make your notification body like this
Result
Please mark my answer correct and helpful if this works for you
Thanks and Regards
Sarthak

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2024 04:09 AM - edited 05-08-2024 04:11 AM
You mentioned like ${parm2} but you you have to mention like ${event.parm2} because both the parm1 and parm2 are part on event object.
So your email body is like
${number} has been reassigned to you because previous caller ${event.parm2} is no more active in the system, Please take necessary action.
Note: Use my business rule script because I mentioned previous in parm 2
Please mark my answer correct and helpful if this works for you
Thanks and Regards
Sarthak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2024 04:59 AM
@Community Alums thanks for the responses, I have tried below script but this time notification didn't trigger . I have written this BR on sys_user table when active changes to false.
Dear User,
${number} has been reassigned to you because previous caller ${event.parm2} is no more active in the system, Please take necessary action.