- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2018 11:29 AM
Currently we have the approval for the Request automatically being approved. But we need an approval for the RITM, catalog item approved by the approving manager. For the RITM, it was setup to use the approval request email, with the change.itil.approve.role, which is incorrect, but with it firing off when approval.inserted we are getting the email but with the incorrect info or not all the info... So I want to user the Catalog Request Approval email, with the request.itil.approve.role that fires off when an approval.inserted. The email is received when using that email template but not all the info is showing. But what I have noticed is that when I preview this notification and put in a RITM is does not show the information, but when I put in a REQ to preview it shows the information that I need. So how do I get the REQ info in the email when the RITM is sent for an approval. Or what am I doing wrong...
When I preview a RITM
When I preview a REQ
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2018 01:32 PM
One correction made. try this
<div>${mail_script:branded_email_header}</div>
<div>Short Description: ${sysapproval.short_description}</div>
<div>Priority: ${sysapproval.priority}</div>
<div>Requested For: ${sysapproval.requested_for}</div>
<div>Requested By: ${sysapproval.opened_by}</div>
<div>Total Price: ${sysapproval.price}</div>
<hr/>
<mail_script>
template.print("Summary of Requested items:\n");
var item = new GlideRecord("sc_req_item");
if (current.sysapproval.sys_class_name == 'sc_request')
item.addQuery("request", current.sysapproval);
else
item.addQuery("sys_id", current.sysapproval);
item.query();
while(item.next()) {
template.print(item.number + ": " + item.quantity + " X " + item.cat_item.getDisplayValue() + " at " +
item.price.getDisplayValue() + " each \n");
template.print(" Options:\n");
var keys = new Array();
var set = new GlideappVariablePoolQuestionSet();
set.setRequestID(item.sys_id);
set.load();
var vs = set.getFlatQuestions();
for (var i=0; i < vs.size(); i++) {
if(vs.get(i).getLabel() != '') {
template.space(4);
template.print(' ' + vs.get(i).getLabel() + " = " + vs.get(i).getDisplayValue() + "\n");
}
}
}
</mail_script>
Comments:
${sysapproval.description}
<hr/>
${mailto:mailto.approval}
<hr/>
${mailto:mailto.rejection}
<hr/>
Click here to view Approval Request: ${URI}
Click here to view ${sysapproval.sys_class_name}: ${sysapproval.URI}
<div>${mail_script:branded_email_footer}</div>
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2018 12:28 PM
Should I just start over from scratch and not use the OOB.. I am so confused and I have been working on this for weeks.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2018 01:46 PM
It is not that difficult.
You have an event approval.insert which triggers the notifications.
You need to identify if you have only one notification using that event.
If you just find one, Trigger email notification for request. Go to email logs and check if notification is triggered and if it is the same notification used by approval.insert event.
Then trigger approval for requested item.Go to email logs and check if notification is triggered and if it is the same notification used by approval.insert event. If no email triggered, check system log, if there is an error.
If no error found, remove the template from notification and add some text to the HTML section of notification.
If it triggers now, add the template back and add some gs.log statements to check where it is failing.
Try these steps and let me know, if you find out the reason it is not triggering.
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2018 01:51 PM
Thank you for all your help.. I will look into this and get back with you tomorrow or later this evening
Get Outlook for iOS<https://aka.ms/o0ukef>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2018 09:28 AM
Sanjiv I am about to start checking on the items you wanted me to check
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2018 10:04 AM
I have fixed the issue with the notification email not sending. I had several notifications sending on "approval.inserted". So I set everything back the way it was from the beginning. So I tested and here is the results..... When a Request is put in, the Request is automatically approved and an email notification is sent just to inform requestor that a request has been opened on your behalf. So the next thing that happens, is an approval notification is sent to the approving manager to approve the RITM. The notification that is sent is the "Approval Request" email notification, on "approval.inserted". This is the email that I am having the issues with.. It's not enough information in the email. It is using the change.itil.role email template. So I am assuming that my instance was configured to use 1 email notification for all approvals? I need summary of items to show