- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2025 02:40 AM
Hello Community!
I'm working on a requirement where a notification should be sent to the Assigned to user of an open Catalog Task (sc_task) whenever the Requested for user adds a comment in the Additional comments field on the parent Requested Item (sc_req_item).
This is my mission:
"Create a notification (content of the notification will be described below) that is sent to the proponent of an open task (Assigned to of the Catalog task) when the client (Requested for) writes a response in the Additional comments of the request.
Notes:
● If there is no proponent: the notification will be sent to the members of the proponent group (assignment group).
● If there is more than one open task: the notification will be sent to proponents of all open tasks."
I did Notification, Event, and Business Rule for this mission but when i go to "Email Logs" i dont see any email sent.
Picture of Event:
Pictures of BR:
Pictures of Notification:
In addition i add the system logs:
Thank you All !
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2025 04:02 AM
Hi @ItayB
1. I noticed the event you have registered is "sc_req_item.notification.itil" and the event called in the BR is "custom.client.comment.notification"
2. In your BR, please move the condition to check the additional comment change to when to run tab
3. As you have the notification referring to sc_request_item, and you need to send the email to the task assignment group, which you will not be able to dot walk, so you need to send the group DL email address /sys_id in the event parameter of the BR refer to the script shown below
if (current.sys_updated_by == current.requested_for.user_name) { //check if the latest comment added is by requested for
var taskgrp = [];
var taskGr = new GlideRecord('sc_task');
taskGr.addQuery('request_item', current.sys_id);
taskGr.addQuery('state', 'NOT IN', '3,4,7');
taskGr.query();
while (taskGr.next()) {
taskgrp.push(taskGr.assignment_group.email.toString()); //pushing all the active assignment group email id's
}
//syntax gs.eventQueue ('<event name registered'>,' <gliderecord of the notification table>','event param 1<optional>','event param 2 <optional>');
gs.eventQueue('sc_req_item.notification.itil', current, taskgrp);
}
Hope you have verified if the task group records have email id's, if not push the group sys_id's
taskgrp.push(taskGr.assignment_group.sys_id.toString());
Do the above changes and try to trigger the email and check them in the email logs
Mark this as Helpful / Accept the Solution if this clears your issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2025 04:06 AM
@ItayB ,
As Gautam pointed out event name is also different 🙂
Please correct it.
Event you have registered is "sc_req_item.notification.itil" and the event called in the BR is "custom.client.comment.notification".
Regards,
Mohammad Danish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2025 04:49 AM
I tried all of what you told me.. still nothing..
ChatGPT told me that for this mission the table should be sc_task and not the sc_req_item..
Its true?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2025 04:59 AM
Hi @ItayB ,
No, the table where the BR should trigger should be Request Item only.
Can you check the email logs now?
Also, share the updated BR and Notification screenshot.
Regards,
Mohammad Danish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2025 05:43 AM
@ItayB ,
1. Please add a condition in BR "Additional Comment " -> Changes.
2. We don't need this on insert. Please run this on Update only.
------------------------------------ | Was my response helpful? | ------------------------------------
⬇️Dropping a Kudos or Accepting as solution ✅ ↘️ would be absolutely brill ⭐ Cheers!
Regards,
Mohammad Danish