Need help on configuring multi level approval notification trigger should be previous approvers

Are Kaveri
Tera Contributor

I have below requirement.

 

we have multi level approval for our request.

requestor submit request,

Requestor gets notification,

then Requestor manager need to approve the request

then Requestor department manager need to get approval request

at any point of time anyone rejects the approval the requestor and previous approver should get notification.

 

How to configure Hierachy of approvals in optimised way. instead of triggering each phase notification want to configure at one place.

 

Any suggesions please share.

4 REPLIES 4

Sunny3008
Tera Guru

Hello @Are Kaveri ,

 

To achieve this requirement you can update the workflow in which you are triggering approver, If approval is rejected then add Run Script activity in that use gs. event queue to call event and trigger notification based on the event, In event pass the parameter as previous approval. Kindly let me know of there is any questions.

 

Please mark this as the correct answer and helpful if it is resolved, or mark this helpful if this helps you to reach towards solution.

 

can you please give me one example for Run script. in gs.eventqueue with parameters. like how to add previous approver?

Hello @Are Kaveri ,

 

Please find below mentioned example and script to run script.

 

Sunny3008_0-1693680767435.png

Sunny3008_1-1693680854973.png

Script:

var temp='';
var gr=new GlideRecord('sysapproval_approver');
gr.addEncodedQuery('sysapproval='+current.sys_id);
gr.query();
while(gr.next()){
	temp=gr.approver+',';
}
gs.eventQueue('your_event_name',current,temp);

Please mark this as the correct answer and helpful if it is resolved, or mark this helpful if this helps you to reach towards solution.

@Sunny3008 

I am working on custom table and approvals triggers on my custom table.

when i tried above script it was not even executing . My notification is not even triggered any mistake i was doing not understanding

AreKaveri_1-1693809241339.png