- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2018 12:45 PM
I am working on a Workflow from a Service Catalog Request that creates a Requested Item. Currently, the workflow generates 10 notifications. Some of these are from Notification actions, some are from other actions (like Tasks) and others are automated notifications (like changes in Stages, verification of submission, completion, etc).
The team that is making this request would like to change some of the wording on the Notifications to include more information (mostly catalog variables). For the Notification actions and Task actions, this is easy enough to do, but the issue is with the automatic notifications. Is it possible just to suppress some of those, so I can manually create new Notification actions? Or is it an "all or nothing" proposition, where I can only suppress all automated notifications, or allow all? And, is there any guide to identify each of these automated notifications?
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2018 10:51 AM
I found the answer I need! It is to use the Advanced Script in the Notification in this post from Michael Ward: Re: Disable Request opened/approved emails
(copied from his post so that the answer is in this thread:
var gr = new GlideRecord('sc_req_item');
gr.addQuery('request',current.sys_id); // current is the sc_request
gr.addQuery('cat_item','<a catalog item sys_id>'); // perhaps set to a sys_property
gr.query();
if (gr.next()) {
answer=false;
} else {
answer=true;
}
So, I just go the sys_id from the Catalog Item and substituted it in the code, and it worked like magic!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2018 01:47 PM
To my knowledge, all notifications either
- go through the notification table which can be conditional and/or event driven.
- Or a notification workflow activity
That being said they can all be modified or deleted. its up to you. go to the email logs table and click on the email you want to change and it references where that email was sent and you can change it there
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2018 07:03 AM
Thanks. That helps a little, but I have still not been able to accomplish my goal (which is to replace certain automated email notifications in a specific service catalog workflow with some custom ones).
Once we identified the notification, here is what we tried:
1. Added a new TRUE/FALSE field to the Request table named "Do Not Notify", with a default value of false.
2. Updated the Notification criteria so it does not run if "Do Not Notify" equals true.
3. Updated the workflow, so the very first step is to set the value of "Do Not Notify" to true, and the second step is my new custom notification.
I tested it out, and it is not working. I can see that it is actually successfully updating the "Do Not Notify" field to true, but both the automated confirmation and my custom notification are being created. So it is not successfully preventing the creation of the automated notification. I am guessing it is a timing thing, and that notification is created before the workflow begins running.
Some other ideas we bounced around were to disable this automated notification altogether, or set the default of the "Do Not Notify" field to true instead of false (so they would be suppressed by default, and we would need to do something explicitly to turn them back on). However, doing this would affect ALL our other service catalog workflows, and we really do not want to go back and edit all of them.
Another idea we had would be to create a BEFORE INSERT Business Rule, but I think we still run into the same issue we are having with the other options we have tried in how we can limit it to just this single service catalog workflow request, without affecting all the others?
Any ideas?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2018 07:17 AM
I would do a Business rule, you can specify which catalog items it triggers on
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2018 07:27 AM
I would do a Business rule, you can specify which catalog items it triggers on
How exactly would that work? We would be creating an INSERT Business Rule on the Request table. Under the "Filter Conditions", Catalog Item is not a valid field to select from (as it is not found in the Request table).
What am I missing?