Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

Send notification at RITM level

rachelconstanti
Mega Sage

I need to trigger a notification when a customer comments in a RITM particularly one that is pending approval.  Ideally it should send the notification to the 'Assigned to'  however we do not use 'assigned to' or 'assignment group' at the RITM level, only at the SCTASK level and we do not use Flow Designer. 

 

RITMs that are pending approval do not not have a task created, therefore we cannot use these fileds 'assigned to' or 'assignment group' and we do not use Flow Designer.  

 

Many times customers comment on the RITM which just updates the RITM and no one receives these notifications because they are pending approval. (Once the RITM is approved and a task is created, the comments are copied from TASK to RITM, which the customer will receive.  

 

The only time this is a problem is when the RITM is pending approval.

 

@Ankur Bawiskar 
Suggestion on a solution?

 

Thank you!

Rachel

1 ACCEPTED SOLUTION

Mark Manders
Mega Patron

So, your process doesn't work. You need to fix that. 

Because you are essentially asking 'we want to send an email but we don't know to who'. You need to configure your process so you know who should get the email. 

Start using assignment group/assigned to on RITM level (even if it's the servicedesk), so you are able to send the email to someone. Or have a dedicated person/team receiving all the notifications. You aren't using flow designer, so I assume it's an inbound action: make it that, if there isn't a task, you have a default group to send the email to. 

Asking 'we want to send an email to a group/person and we don't have that group/person available' can't be resolved, without fixing the process.

O, and start using flow designer! Workflow Editor is deprecated.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

View solution in original post

7 REPLIES 7

@Ankur Bawiskar I did mark this resolved, but just thought of something...  is it possible through scripting to copy the approver(s) on that comment notification?
"Request Item commented" is the notification in question.

Thank you,

Rachel

@rachelconstanti 

unless you identify the recipient you can't send email

Once you identify that yes using email script you can include approvers in email body

something like this

// Initialize an empty array for approver names
var approvers = [];

// Query the approval [sys_approval_approver] table for the current request item
var approvalGR = new GlideRecord('sys_approval_approver');
approvalGR.addQuery('document_id', current.sys_id); // link to current sc_req_item
approvalGR.query();

while (approvalGR.next()) {
    // Collect the approver's display name
    var approverName = approvalGR.approver.getDisplayValue();
    if (approverName)
        approvers.push(approverName);
}

// Format approvers as a string with line breaks
var approversList = approvers.length > 0 ? approvers.join('\n') : 'No approvers found';

// Print approvers list in email body or subject
template.print('Approvers for this request item: ' + approversList.toString());

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Thank you again for the support.  After further thinking on this, the approvers already get "spammed" with enough email and they ignore those so no need to send more!!!

I took the suggestion of @Mark Manders (thank you again for that) to have the notification send to the Service Desk. 

 

Because we have a specific set of filtering conditions for when to send, I created a new notification.

 

Rachel