Needing multiple approval e-mails

daniellethomson
Tera Expert

Hello!

We have been told by our Service Now implementors that there is no way to create multiple approval emails. We need to have a very specific template for Change approvals and another template for Service Request Approvals. Is there anyway to create separate approval emails for multiple applications?

This is a huge deal in our environment any help or ideas are welcomed!

Thank you,

Danielle

1 ACCEPTED SOLUTION

I came across the correct answer for us. If I added a condition on the original approval request email notification to only run on the change_request table then I was able to create/use the Catalog Request template by also adding a condition to only run on the request table. So far so good!



Thank you everyone for your help.


View solution in original post

5 REPLIES 5

manikorada
ServiceNow Employee
ServiceNow Employee

Danielle,



You should be able to do this. In your instance check the business rule 'approval events(Task)'(https://<<instance_name>>.service-now.com/nav_to.do?uri=sys_script.do?sys_id=aea34678c61122710151b1b7fdf65762)


There will be a code something like :


if (current.state.changes() && current.state=='requested') {


    var event = "approval.inserted";


    if (isRequest)


          event = "request.approval.inserted";


    else if (isSCTask)


          event = "sc_task.approval.inserted";


   


    gs.eventQueue(event, current, gs.getUserID(), gs.getUserName());


    updateTask(current, current.approver.getDisplayValue() + " requested to approve task");


}



In the above code, you can add a script to check if the approval is related to change_request and generate a separate event to have email each based upon the task type.


daniellethomson
Tera Expert

Thank you Mani! It's good to know I can accomplish this. I am very new to scripting and Service Now. Is there any place I can find the script to make this work?


Jim Coyne
Kilo Patron

I'm confused as to why they would say that.   Take a look at the Notifications (System Policy \ Notifications) and search the name for records that contain "approval request".   There are already separate ones for Change and Request.   Even one for Contracts, depending on the modules you have.


daniellethomson
Tera Expert

Jim, I see what you mean. When we built a new hire approval work flow, for example, the approval email that was being sent was from our Change Request approval email. Our implementer told us that we would have to keep the approval template very generic because SN only uses one template. My boss and I have looked into it and find to change this there is a lot of scripting behind it. If you have an easier answer, I'm all ears! Is it really as simple as modifying the catalog approval template? or is there another step to ensure the catalog workflow is using the correct approval email notification?