Auto reject the approval if the approver is not approved for 30 days

antony4007
Tera Expert

Any one achieve the below in Service now. If yes please suggest the steps.

"Approver must approve the RITM approval within 30 days from the created date. If they fail to do so, the RITM should be auto-rejected with added comments "Approval timeline exceeded, Request item is rejected" and send a notification to requester and approver.

Thanks,

Antony

1 ACCEPTED SOLUTION

RiteshSwarnakar
Giga Guru

We can do it using Flow Designer. I used Rome version.

 

1] Schedule the Trigger to run daily at any time preferably outside business hours.find_real_file.png

 

2] Set the Action to look for all approval records which are in "Requested" state and the creation time is more than 30 days

find_real_file.png

 

3] Check if the count of no.of approvals in "Requested" state is greater than 0.

find_real_file.png

 

4] Then loop over each non approved records and finally update the state to "Rejected" and add comments as required.

find_real_file.png

 

Thanks,

Ritesh

View solution in original post

17 REPLIES 17

Shrutika Surwad
Kilo Guru

hey Antony,

Create a daily job  that will query all the approval record to check if there is any approval record created before 30 days and still in requested state.

var gr = new GlideRecord("sysapproval_approver");
gr.addQuery('state','requested');
gr.addQuery('sys_created_on','<',gs.daysAgo(30));
gr.query();
if (gr.next())
 {
gr.state = 'rejected';
gr.update();



}

 

Thanks,

Shrutika

Hey Shrutika,

Will it cancel the respective RITM also?

 

Thanks,

Antony

Hi 

can you please help me out ??

In ritm table if any user approval is waiting in requested state every 3 business days remainder email has to be send till user approve or reject

Hi Shrutika,

 

But, it will reject all approvals which are pending from 30 days right, means the remaining approvals like change, knowledge etc.

If we want to reject only RITM approvals then what is the logic need to be added here.

Could you please suggest.

 

Thanks.