Send separate notification to each approver

Bhoomi Chaudhar
Tera Contributor

Hey everyone, I am struggling to trigger notifications for each approver. For example, When case is generated,

First Approval Goes to team leader - Send Approval Notification to team leader...if TL Approves then

Second Approval goes to Manager - Send Approval Notification to Manager

Now I am trying to send notifications but it seems that

TL receives two notifications(one with TL Approval and second is with Manager Approval)

Manager receives two notifications(one with TL Approval and second is with Manager Approval)

FI: Separate 2 notifications, 2 email template are created for above

1 ACCEPTED SOLUTION

Hi @Bhoomi Chaudhar 

var gr = new GlideRecord("sysapproval_approver");
gr.addQuery("approval_for",current.getUniqueValue());
gr.query();
while(gr.next()){
//This while will give you all the approvals related to the record
//Here you need to write a script saying the approval which is yet to be approved. In your case in first it would be Team Lead and then followed by Manager when this BR triggers for the 2nd time.
}
}
Please hit like button if my suggestion has helped you in any way.
Please mark correct if my response has solved your query.

Cheers,
Mohammed Basheer Ahmed.

View solution in original post

6 REPLIES 6

*code

Hi @Bhoomi Chaudhar 

var gr = new GlideRecord("sysapproval_approver");
gr.addQuery("approval_for",current.getUniqueValue());
gr.query();
while(gr.next()){
//This while will give you all the approvals related to the record
//Here you need to write a script saying the approval which is yet to be approved. In your case in first it would be Team Lead and then followed by Manager when this BR triggers for the 2nd time.
}
}
Please hit like button if my suggestion has helped you in any way.
Please mark correct if my response has solved your query.

Cheers,
Mohammed Basheer Ahmed.