
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2019 11:57 AM
I have two separate notifications on incident, one for the Assigned To user, and one for the Watch list. The reason they have to be separate is because one links to the portal and the other links to the platform UI. But in many cases the assigned to user is also on the watch list. This is usually because the caller submitted through email and CC'd the assigned to user.
Whenever this happens, the assigned to gets double notified. Once from each notification. Is there a way I can stop this in this situation? I tried making the notification weight higher for the assigned to notification, but they are still receiving both. Maybe because the watch list has multiple recipients where assigned to is only one person.
Solved! Go to Solution.
- Labels:
-
Instance Configuration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2019 12:14 PM
Maybe put a business rule on outbound email that pulls the number out of the subject, queries, looks at the assigned to, goes to the user record for the assigned_to email address, do an indexOf against the recipients, and deletes the email from the recipient list if it exists. I did this when we had to scrub a certain set of VIPs from emails going out. That is the only way I know to do this, since you have two notifications going out, but it is a fair bit of scripting, and, depending on how many emails created a day, needs to be conditioned very specifically to prevent performance issues.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2019 12:14 PM
Maybe put a business rule on outbound email that pulls the number out of the subject, queries, looks at the assigned to, goes to the user record for the assigned_to email address, do an indexOf against the recipients, and deletes the email from the recipient list if it exists. I did this when we had to scrub a certain set of VIPs from emails going out. That is the only way I know to do this, since you have two notifications going out, but it is a fair bit of scripting, and, depending on how many emails created a day, needs to be conditioned very specifically to prevent performance issues.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2019 12:15 PM
Good idea, I will try that and follow up.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-23-2019 06:21 AM
Thanks, this worked perfectly. Here was the code I wrote before insert on incident. I didn't find it too bad.
Condition:
current.assigned_to.changes() && !current.assigned_to.nil() && !current.watch_list.nil() && current.watch_list.indexOf(current.assigned_to) != -1
Script:
(function executeRule(current, previous) {
var list = current.watch_list.toString();
var array = list.split(',');
for(var i = 0; i < array.length; ++i) {
if(array[i] == current.getValue('assigned_to')) {
//Remove Assigned to from Watch List array
array.splice(i, 1);
}
}
current.watch_list.setValue(array.toString());
})(current, previous);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2019 12:14 PM
Hi Chris,
I don't think there is any direct OOB feature to prevent this. Technically SN sends out emails to all the users that exist in watchlist and does not do a check whether the mail is already sent.
To overcome this, you can write a script and schedule it to run once every day which could remove the user from watchlist if the user already exists in assigned_to field.
Mark the comment as a correct answer and helpful if it helps.