how to send update notifications to users selected in list collector when the RITM is updated?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-23-2024 10:44 AM
I have a catalog item that has a primary_contact list collector. After the request is submitted, i want to send a notification to the selected users(s) on this list collector anytime there are updates to the RITM. I've tried several methods but cannot get it to work right. Either it won't send, or it will only send upon being submitted not after updates/ comments are added to the RITM.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-23-2024 11:20 AM
You can add the email to your workflow/Flow that runs after your catalog item is submitted. If you are using a list collector, though, you will have to use code in the "To" field to pull each user's email address if you are using the "Send Email" action in a Flow. It will look something like this:
//In my form, the list collector is named 'user_list' and I pulled it into the Flow in step 2
var userIds = fd_data._2__get_catalog_variables.user_list.toString();
var peeps = [];
var gr = new GlideRecord('sys_user');
gr.addQuery('sys_id', 'IN', userIds);
gr.addActiveQuery();
gr.query();
while(gr.next()){
peeps.push(gr.email.toString());
}
return peeps.join(', ');