How to notify affected ci owners with their own information in change request?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2016 08:19 AM
Hi!
What I am trying to do is to send an email notification to the ci owners when change request is in assess state.
I did this Business Rule.
Condition: current.state.changesTo(-4) // -4 is Assess State
Script:
var owners = '';
var ci = new GlideRecord('task_ci');
ci.addQuery('task',current.sys_id);
ci.query();
while(ci.next())
{
owners += ',' + ci.ci_item.owned_by;
}
gs.eventQueue("change.ciowner", current, owners, gs.getUserName()); // Event name change.ciowner
Notification.
What will contain:
========================================================================
Dear Customer: ${user.company_name} // this company name have to be the affected ci company of the owner.
According to our records the affected CI will be: ${ci_item} // this have to be affected ci
====================================================================
The notification is general and all the affected ci owners recive the same notification.
The problem here is that we want to send these notifications very specific per customer, that just show their own company information, like the owner company name [user.company_name] and the name of their affected ci.
My question is... Is there any way to send particular or specific notifications per affected ci owners?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2016 08:21 AM
Hi Crhistopher,
You would need to generate a new event based on each type of notification you want to send.
If owner A gets notification A and owner B gets notification B and they are both part of the same change request, you need to fire different events to get the different notifications to go.
Events and Email Notification - ServiceNow Wiki
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2016 08:44 AM
Hi Chuck,
Could you give me an example for how could I build those events?
You would help me a lot with that.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2016 08:48 AM
Sure. Please provide some examples of what you had in mind for this statement:
Is there any way to send particular or specific notifications per affected ci owners?
How do you know who gets what notifications? Are they based on the CI class? Are they based on the CI Owner's department? What makes it different for user A to receive notification 1 and user B gets notification 2?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2016 10:29 AM
How do you know who gets what notifications?
I will know for the affected ci owners registered in the affected ci ´s related list.
Are they based on the CI class?
Yes they are.
Are they based on the CI Owner's department?
They are based on the Affected CI Owner Company.
What makes it different for user A to receive notification 1 and user B gets notification 2?
The Affected CI Owner Company