How to send notifications to users selected in List collector variables on catalog items

kumaraj
Kilo Sage

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?

find_real_file.png

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.

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

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

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

6 REPLIES 6

Hi,

So for example for 10 catalog items you want this; create system property which holds sys_ids of those 10 catalog items

in BR condition check whether current catalog item is belonging to system property

BR Condition: gs.getProperty('catalog_sys_ids').indexOf(current.cat_item) > -1

So this BR will only run for 10 catalog items; I assume the list collector variable name is same across the 10 catalog items

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

 

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi Kumar,

Let me know if that answered your question.

If so, please mark my response as correct & 👍 helpful so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader