Prevent Self-Notification for Requested For User Comments on RITMs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Currently, when the Requested For user adds an update in Additional Comments on a Request Item (RITM), the system triggers the notification "Your request RITM has new comments" to the same user who posted the comment. When the Requested For user posts a comment on their own RITM, the system should not send the "Your request has new comments" notification to that user. Notifications should continue to be sent to other intended recipients as per existing notification logic.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @saranya26
Try this:
To prevent the "Your request has new comments" notification from sending to the user who posted it, while still notifying others, you can use a Business Rule to control the event trigger, combined with notification settings.
- Disable "Send to Event Creator" and update Notification
- In the Application Navigator, go to System Notification > Email > Notifications.
- Open the notification responsible for the comments alert.
- In the Send when section, select Event is fired.
- In the Event name field, select the event you created (like ritm.comment.notification)
- On the Who will receive tab, ensure the Send to event creator checkbox is unchecked. Also verify that your intended recipients are selected.
2.Create a Custom Business Rule
- Navigate to System Definition > Business Rules and click New.
- Name: Evaluate RITM Comments
- Table: sc_req_item
- Advanced: Check the box.
- When: Before
- Insert,Update: Checked
- Filter Condition: Additional comments changes
(function executeRule(current, previous /*null when async*/) {
var currentUser = gs.getUserID();
if (current.requested_for != currentUser) {
gs.eventQueue('ritm.comment.notification', current, current.requested_for, currentUser); //Replace with your event name 'ritm.comment.notification'
}
})(current, previous);
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @saranya26 ,
Navigate to the notification record that sends the "Your request RITM has new comments" email.
Open the notification and scroll down to the "When to send" section.
Look for the checkbox labeled "Send to event creator" .
Uncheck this box .
Save the notification.
After this, the system will no longer send the notification to the person who triggered the event (the Requested For user posting a comment), but will continue to send it to all other intended recipients based on the notification's other "Who will receive" rules
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Hi @Tanushree Maiti , @pr8172510
Thank you for your prompt help! I need assistance with the following issue, could you please take a look?
If I leave the 'Send to event creator' checkbox unchecked and proceed with Business as described above.
Q) A RITM has been created for a different user (the 'opened by' and 'requested for' are not the same). Scenario 1: When comments are updated by the person who 'opened by' the RITM, notifications are only sent to the 'Requested for' individual. (This should not happen). Scenario 2: When comments are updated by the person who is 'Requested for' the RITM, notifications are sent only to the 'opened by' individual. (This is the expected behavior). The issue in Scenario 1 needs to be fixed so that if it is opened through updates, notifications will be sent to both the requester and the user who opened it.