- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2020 03:07 AM
Hi Friends,
Could you please help me to find the below solution.
My requirement : How to send notifications to users selected in List collector variables on catalog items shown below:
below screen is of RITM which shows variable has 3 users selected, so how can we send notification of RITM submition to them?
we could have add notification in workflow but due to some reason we are not supposed to modify the workflow.
Can anyone suggest me how to achieve this requirement, if you provide it in bit details and code(if required) then would be better.
Solved! Go to Solution.
- Labels:
-
Personal Developer Instance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2020 03:12 AM
Hi,
best way is you can use workflow notification activity and in the advanced script get the users and push to answer array
sample script;
answer = current.variables.<listCollectorVariable>.toString().split(',');
another approach would be have after insert BR on sc_req_item table and condition as catalog item is yours; so that it triggers only for your catalog item
create event in event registry for sc_req_item table
create notification on sc_req_item table and associated the event to this notification
ensure below
1) event parm 1 contains recipient checkbox is set to true
2) send to event creator is true
in BR script use this
gs.eventQueue('event_name', current, current.variables.<listCollectorVariable>,'');
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2020 03:12 AM
Hi,
best way is you can use workflow notification activity and in the advanced script get the users and push to answer array
sample script;
answer = current.variables.<listCollectorVariable>.toString().split(',');
another approach would be have after insert BR on sc_req_item table and condition as catalog item is yours; so that it triggers only for your catalog item
create event in event registry for sc_req_item table
create notification on sc_req_item table and associated the event to this notification
ensure below
1) event parm 1 contains recipient checkbox is set to true
2) send to event creator is true
in BR script use this
gs.eventQueue('event_name', current, current.variables.<listCollectorVariable>,'');
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2020 09:28 AM
This works perfectly, but how can we send the notifications to individual users separately?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2020 03:13 AM
Hi,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2020 05:27 AM
We have to implement it to more that 50 worflows so we are not touching that.
I am trying to trigger event notification from catalog client script and script include using AJAX.
List collectors already save users in a comma separated list as required by notifications.
Try this one