Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Changing Approver on Existing Approval

kshaw
Giga Guru

Trying to find out the correct procedure to change the user/approver on an existing Approval Request. In the below,example, Erica is the current approver. But she is not correct, a diffferent user needs to be choosen.

 

apprvval_list.png

 

Also (as some searches said change the approval record), the approval record is read only and controlling policy can not be found.

 

approval_request.png

Going back to the approval list, clicking on the Edit button allows a new user to be added to the approver list. 

edit_approver.png

Editing the State of the new approver from Not Yet Requested to Requested is next.

 

edit2.png

edit3.png

 

SO... the big question I have is what to do next with the original requestor. Choosing Approved or Rejected will either move the approval ahead by the wrong approver or will cause the approvel to be rejected which affects the workflow.

Of the remaining 3 choices I am not sure which to choose. I think over time I have choosen each and some just advance to workflow and the new approver (Ken Shaw in example) does not need to approve. If I leave the old approver as Requested, even if Ken approves, the approval is still waiting for Erica to approve before the workflow advances.

 

I am trying to figure out the correct steps to take to change approvers

edit 4.png

Thanks in advance for help.

Ken

14 REPLIES 14

What we have done here is all using UI Actions / UI Pages, so it won't copy/paste to workspace. Our change management system is still on the old UI so it hasn't been migrated. It wouldn't be challenging to migrate but we haven't had the need to yet.

 

Do you have any specific questions or items you are curious about? It's a pretty straight forward system in that it sets approvals and allows emails to be resent. We use our CMDB as the source of truth for who can approve what as well. 

 

Tasks such as "Change Approver" are pretty straight forward because we change the approver, flip to Requested and the email is sent. 

 

Let me know how I can help!

hi @TrevorK ,

I would like to know how your are triggering approvals here? via flow or any BR is running

We have a flow in our system which is responsible for triggering the approvals..now that we are going incorporate such ui action ..user_id taken as input should be passed to the existing flow and flow should be re-executed...I am trying to figure out how can I achieve this?
Any thoughts if you can share here?

Many thanks!

The entire Change Request is encapsulated in a single flow (workflow, we haven't updated it to flow since it works fine). In our Change Management process we have different steps for approvals: approval to build / test (we removed this one a couple years ago), approval by the Change Management team that the change can proceed to implementation, Implementation approvals, Post-Implementation approvals. There can be a couple other approvals thrown in.

 

Because we have a single flow for our entire change, restarting it is not possible. Or rather would be very technically challenging with our complex scenario. Therefore we switch the name on the approval record itself (which triggers the audit history to show previous / current values). That was deemed acceptable in our case - we didn't need to have a visual indicator an approver was changed but rather just the ability to audit if needed (via audit logs). 

 

If you were to take a similar approach - changing the approver name and resending the approval email - you would have no need to restart the flow (or even touch the flow). It would progress as expected when the approval record is saved as approved / rejected. 

 

If this is your only approval for a change then stopping the flow and starting again would be reasonable since it's easy to do and has no impacts. If you have multiple approvals, I'd probably ask myself whether your Change Management process derives value from showing a "skipped" approval record and if not, I'd keep the large single flow and just change the approver (relying on the audit log to capture it was changed). 

 

One thing I teach is asking yourself what is the value of something you want to do. Everything should add some sort of value and your job is to minimize the time it takes to add that value. Therefore, if there is no value is creating a new approval record just re-use the existing one as that provides the most value for the time you spend. 

 

 

In short, if you change the user on the approval record itself you have no need to change the flow as it's waiting for an approve / reject / other status change and shouldn't proceed forward on other approval record changes (such as approver). This is what we do and our auditors are fine with it since the actions is documented in the notes / audit history of the approval record.

 

Ask away with any other questions!

do you happen to have the update set on this?
i've been trying to implement something like this for our RITM's for a while now but got no where with it.
i would be able to help you with a custom widget i created on bulk approvals if thats something you are looking into or a window tray icon for approvals

You are looking for to change an approver and resend the email?

 

It's been awhile since I developed it but this is the script we use in one spot (it's the part applicable to this - it's written into small chunks because other parts of the script use the same pieces):

   
    resend_approval: function() {
        var approval_record = this.getParameter("sysparm_approval_record");
        return (this._resend_approval_email(approval_record));
    },
     
    _resend_approval_email: function(approval_record_sys_id){
        var gr = this._lookup_approval_record(approval_record_sys_id);
       
        if (gr.next()) {
            gs.eventQueue("approval.inserted", gr);
            return "success";
        }
        else {
            return "Could not find approval record. This is most likely due to a network timeout. Please close the Change Owner window and re-open.";
        }
       
    },
   
    _lookup_approval_record: function(approval_record_sys_id) {
        var gr = new GlideRecord("sysapproval_approver");
        gr.addQuery("sys_id",approval_record_sys_id);
        gr.query();
       
        return gr;
    },
 
It was coded almost 10 years ago so best practices and such may have changed (Flow wasn't even available yet). But we change the approver (outside of this) then retrigger the event which sends the email. That way nothing in the workflow needs to change and we aren't causing chaos with the rules running on the approver table.
 
It's a nice, simple and easy way to do things. Your audit requirements will dictate whether you can take a simplified approach like this or you need to do something more formal with the approvals. 
 
If you want something more I can possibly help.