arpitt
Tera Expert

Recently I got a request to configure Approval reminder emails to be sent to the Approvers as they are very busy, and sometimes the process of deciding if they can approve or reject a step takes a while. They wanted to make sure that the approvals didn't get forgotten.we now sending out an individualized notification to any business users who may have approvals that are still pending for Service Requests.

What You Need:

To replicate this process you need to create a workflow on Approval (sysapproval_approver) Table, create an event and a notification which will be triggered by the worflow.

Create Your Event

  1. Go to System Policy | Events | Registry.
  2. Click New to create a new Event.

Capture.PNG

Create Your Workflow:

  1. Go to Workflow | Workflow Editor
  2. Click New to create a new Worklow.

Capture1.PNG

Workflow Activities:

Capture2.PNG

a) Use Timer Activity to Enter the number of days the workflow should wait to trigger the event.(Example 2 days)

Capture3.PNG

b) Use the If activity with conditions: "Source Table is sc_req_item" and "State is Requested"

Capture4.PNG

c) Use the Create Event activity with Event name as the one created in the first step and Pass "current.approver.email" in Parm1 and "current.approver.getDisplayValue()" in Parm2.

Note: Connect the Yes of the If activity to the Create Event activity.

Capture5.PNG

d) Connect back the "Create event" to the "Timer" activity.

Publish the Workflow.

Create Your Notification.

Create a event based notification with the event as the one we created in the first step and used the appropriate content.

Note: Check the   "Event parm 1 contains recipient" to send notification email to the email id of the approver.  

Capture6.PNG

Comments
Chandresh
Tera Guru

Great Article, I have one issue, I have made one UI action for on demand approval mail reminder and on clicking it triggers an event and event triggers an email notification to all the approvals in requested state. Now, In notification, I want to give the option to approve/reject the approval, but since the Reference message will get changed in reminder mail, it is not updating the record. Any suggestions??


michaellshively
Mega Expert

This works out great! I used the template "request.itil.approve.role" for the notification to provide the approvers with a URL to approve or deny the request.


One isse I ran into was that I use the Activity called "Create Event with GR" and I should have used "Create Event" which was the OOB component.


Thanks for the great example!


jonny27
Giga Contributor

Hi there



I'm having a couple of difficulties executing this which I needs a little bit of help on. It makes sense in the large part but I've two sticky patches:



Firstly, the create event in the workflow. I'm being asked to enter scripts rather than just the strings which are on the screen shots. Is what I've done here right?


find_real_file.png



Secondly, the event notification. I can't find a way in which to create this as per the instructions. Any help here? When I click on the notifications part of the event, it doesn't give me any way in which to tie it back to the workflow.



I'm running Istanbul.



Thanks


Your friendly Yorkshireman.


Armin Heinlein1
Giga Expert

You need to enter it like this:


find_real_file.png


jituksingh
Kilo Guru

Hi All,



Can somebody guide me on creating notification for this purpose?



Regards,


Jitendra Singh


Armin Heinlein1
Giga Expert

Do you have a specific question? Please don't forget to mark as helpful or correct answer. 🙂



You need to create a workflow:



find_real_file.png


find_real_file.png


find_real_file.png


find_real_file.png


jituksingh
Kilo Guru

Hi,



I follow all these above steps but reminder notification is not working. Not sure where and what is missing. Can somebody guide me how I can diagnose the issue?


find_real_file.png



find_real_file.png


find_real_file.png


find_real_file.png


find_real_file.png


Armin Heinlein1
Giga Expert

Can you show the event log for this event and make a screen copy?


Armin Heinlein1
Giga Expert

Keep in mind that now email will be created when you send it to yourself.


jituksingh
Kilo Guru

Here it is


find_real_file.png


jituksingh
Kilo Guru

Not sending to myself. Creator and Approver is diffenrent.


Armin Heinlein1
Giga Expert

Is this the copy from the event log? The parameter 1 and 2 should contain a name or an email address.



My business rule to create the event is:



find_real_file.png


Armin Heinlein1
Giga Expert

Is this a copy of the event log. Parameter 1 and Paramter 2 must contain a name or an email address. Go into the event and enter a valid email address into Parm1 and the user name into Parm2 and reprocess the event. Check what happens. The vaule you have provided will not create an email.


Armin Heinlein1
Giga Expert

If you don't mind show me the detail screen of the event.



It should look like this:


find_real_file.png


jituksingh
Kilo Guru

My is like this


find_real_file.png


jituksingh
Kilo Guru

Where I need to apply this business rule?


Armin Heinlein1
Giga Expert

You don't need the business rule. my mistake. Actually, lets focus on the event creation and show me a copy of the detail screen of the event log. I do believe it has something to do how you create the event in the workflow.



I believe you put the parameter in single quotes. No "' ' ".



The event creation should look like this


find_real_file.png


jituksingh
Kilo Guru

Here it is


find_real_file.png


Armin Heinlein1
Giga Expert

The " is wrong.



this is how it should look:



return (current.approver.email);



and



return (current.approver.getDisplayValue());



Don't forget to mark this as correct answer


Armin Heinlein1
Giga Expert

Is it working?


jituksingh
Kilo Guru

Hi Armin,



This is working now. you are great, thank you so much for helping me!


I need one more help. Can you share email script for message body for proper format.



Jitendra Singh


Armin Heinlein1
Giga Expert

Jitendra,



Just don't forget to mark the actual answer as correct and helpful.



I use the standard OOB template.



find_real_file.png


Armin Heinlein1
Giga Expert

Jitendra,



Please mark the answer as correct and helpful if I was able to help you.



Armin


jituksingh
Kilo Guru

Hi Armin,



I have marked it helpful but not getting option to mark correct. May be because I have used old thread.


Armin Heinlein1
Giga Expert

Look for the article



How To Mark Answers Correct From Community Inbox



Armin


derekifdsgroup
Giga Contributor

Saved me SO much time.


Thank you!!!!!


mark_edwards
Tera Contributor

Great article arpitt



I'm struggling with creating the email template, using Helsinki.   Perhaps someone can assist arminheinlein



Thanks



Mark


Armin Heinlein1
Giga Expert

What is your struggle?


mark_edwards
Tera Contributor

I don't appear to have the same options. I was wonder if you could walk me through setting up the email template as per the instructions above.



In particular the "When to send" and "Who will receive" menus.



Mark



find_real_file.png


Armin Heinlein1
Giga Expert

Edward,



Sorry for the late reply. You have to switch into advanced mode on the notification.


find_real_file.png


VaranAwesomenow
Mega Sage

I believe with updates to ServiceNow platform and workflow data fabric below would be the approach.

If you want to achieve it using group approval, you can consider leveraging SLAs on sysapproval_group table

VaranAwesomenow_0-1753160587917.png

 

If you want to achieve at a single RITM level then you can use a flow that triggers on RITM record.

If you want to apply this email reminder on RITM approvals in general then go with flow with trigger as schedule and table and query sysapproval_approver records then write notification logic accordingly. Only downside of flow + schedule is it wont take holiday calendar into consideration, which is available using SLAs.

Version history
Last update:
‎07-26-2015 12:16 PM
Updated by: