Approval/Rejection response email not linking back to Change Request

vickie_wampler
Mega Contributor

Requests for User approvals for new change requests are being generated via email, and the user email response is received and logged in ServiceNow.   However, the change request is not being updated with the user response, and the workflow simply waits for a response/approval to proceed.

 

This is an out-of-the-box implementation, and we have the following Inbound Email Actions for Change in place.   What could be going wrong?

  • Update Change Task
  • Update Change
  • Update Approval Request


Thanks for any suggestions!!!

1 ACCEPTED SOLUTION

That's it! I had to narrow the approval group down only me (so I knew I was responding to the correct email), and responded to the approval request that was sent specifically to me, the logic handled the response and updated the request perfectly.



Thanks so much!!! Now I have to understand delegates so I can pass this along during upcoming training sessions.



You made my day, thanks for sharing your expertise!



Vickie


View solution in original post

4 REPLIES 4

Brad Tilton
ServiceNow Employee
ServiceNow Employee

I would check a couple of things.



1. Does the response back to ServiceNow from the customer contain the word approve in the subject line? Sometimes users will just reply to these emails saying "I approve" in the body or something like that.


2. If so, is the actual approval record being updated and its state set to approved?


Hi — we are still in development, so the user is me and another admin. The response back to SN includes the CHG### - approve and the text from the response template. So I believe the correct response is being received.



Unfortunately the state still indicates Requested and the workflow status is awaiting a response.



Vickie


Are you listed as the approver on the approval record? There is some logic built into the Update Approval Request inbound action that checks to see if the person who sent the email is the approver or the approver's delegate. If not, it won't update the approval.



function validUser() {


      if (current.approver == email.from_sys_id)


          return true;


 


  // check if the email is from a delegate of the approver


  //


  var g = new GlideRecord("sys_user_delegate");


  g.addQuery("user", current.approver.toString());


  g.addQuery("delegate", email.from_sys_id);


  g.addQuery("approvals", "true")


  g.addQuery("starts", "<=", gs.daysAgo(0));


  g.addQuery("ends", ">=", gs.daysAgo(0));


  g.query();


  return g.hasNext();


}


That's it! I had to narrow the approval group down only me (so I knew I was responding to the correct email), and responded to the approval request that was sent specifically to me, the logic handled the response and updated the request perfectly.



Thanks so much!!! Now I have to understand delegates so I can pass this along during upcoming training sessions.



You made my day, thanks for sharing your expertise!



Vickie