Prevent "duplicate" outbound email notifications (Comment / Work_notes)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-01-2016 08:53 AM
We have HR Case Email Notifications for both:
*Comments
*Work_notes
Sometimes the desk agent update one field, SAVE and update next field + hit the SAVE button, 2 emails will be sent.
The Business Rule "Ignore duplicates" seem not to prevent this type of "duplicate".
Business has requested me to prevent duplicate outbound notifications and so far have I briefly looked into using javascript in the notification checking for same email in Mailbox-Outbound-Outbox within a short timeframe (mark duplicate as "skipped")
Are there even more options/ideas how to prevent duplicate emails to be sent?
/Stefan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-01-2016 11:56 AM
I agree with what Brad had suggested about training the people about updating record.
One more point to add, If notes are getting added for update, then does your notification involve adding those notes too?
If yes,then there should not be a worry. If notes / comments are not getting added, then recipients will perceive these notifications as duplicate which does not have any information about comments / notes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2016 01:00 AM
Deepak and Brad
thanks for your suggestions and I will digest them in my work with the HR system (influence user to work differently)
but I am still considering the "ignore duplicates" BR until someone can explain that I am totally wrong.
my believe is that if I change weight from zero to X the BR "Ignore duplicates" should stop duplicates being sent, my believe is that the statements below would be executed, is the script working differently compared with my thoughts?
...
if((duplicate.subject == mySubject) && (isBodyEquals(duplicate.body, myBody))){
GlideSysLog.info("EMAIL." + duplicate.sys_id,"Message with sys_id " + duplicate.sys_id + " is a duplicate of message with sys_id " + current.sys_id + " and will be ignored.");
duplicate.type = 'send-ignored';
duplicate.update();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2016 03:09 AM
I would suggest to test this functionality on personal developer instance if that helps.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2016 06:27 AM
You could definitely write a business rule, but I think the weights would all be the same since it's the same notification. The bigger issue is that even if you could suppress maybe all emails within 5 minutes of the first email or something like that, what if the second or third updates had something important that the user needed to see? You just can't determine that from a script, so a much cleaner solution would be educate your process users what happens when they add customer comments.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2016 08:07 AM
Yeah, one goal for me is to prevent identical outbound notifications from HR Case/Task being sent within 4 seconds which has happened.
For me it would be great to ignore duplicates created by the same notification script/weight, and if you read the script syslog message in the BR you see it should have this function.
I talked with an experienced sys admin, and this BR "Ignore duplicates" were unknown also for him.
I still have a strong drive to analyze it, statement by statement and test it in our DEV instance as suggested.