We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

How to Send a Notification to a Catalog Item Variable (sys_user) with "When to Send: Triggered

TharshneK185996
Tera Contributor

Hi Team,

Need help!

There is a notification on table sc_req_item, whose

When to send: Triggered

 

I want to send this notification email to a variable of this cat item.

Variable (value): Supervisor (supervisor) (Type-Reference (sys_user table)) and First name (first_name) (Type-Reference (sys_user table))

 

I am unable to do dot walk into this variable of cat item from 'who will receive' > 'Users/Groups in fields' as I want to send this notification to the variable supervisor and first_name.

TharshneK185996_0-1784615883651.png

Please help!

3 REPLIES 3

yashkamde
Mega Sage

Hello @TharshneK185996 ,

 

variables can't be fetched from who will receive,

you can use Send Email Action to include variable :

Screenshot 2026-07-21 124057.png

 

If my response helped mark as helpful and accept the solution.

Ankur Bawiskar
Tera Patron

@TharshneK185996 

so you want email to be sent to the user selected in that variable

that's not possible with OOTB notification

2 solutions

1) use flow "Send Email" flow action and include the recipient by grabbing the variable using "Get Catalog Variables" flow action

OR

2) create after insert BR on RITM table, create event on RITM table and then create notification on RITM table linked with this event, from BR script use gs.eventQueue('event_name', current, current.variables.supervisor.toString()); and then in notification use "Event parm1 contains recipient" checkbox as true

💡 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  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

Tanushree Maiti
Tera Patron

Hi @TharshneK185996 

 

Follow these steps to configure the notification since you cannot natively dot-walk to Catalog Item variables in the standard "Who will receive" dropdown, you must fire an event from a Business Rule and pass the Supervisor's sys_id as the event parameter.

 

1: Register the Event

  • Navigate to System Policy > Events > Event Registry.
  • Click New.
  • Create an event name: sc_req_item.supervisor_email.
  • Table: sc_req_item.
  • Enter a brief description.

 

2: Create a Business Rule

  1. Navigate to System Definition > Business Rules and click New.
  2. Name: Fire Event for Supervisor Notification
  3. Table: Requested Item (sc_req_item)
  4. When to display / Before-After: After / Insert (or Update, depending on your conditions)

 

(function executeRule(current, previous /*null when async*/) {

    var supervisorSysId = current.variables.supervisor.toString();     // Replace 'supervisor' with the actual name of your catalog variable   

    if (supervisorSysId) {

          gs.eventQueue('sc_req_item.supervisor_email', current, supervisorSysId, '');

    }

})(current, previous);

 

3: Configure the Email Notification

  • Navigate to System Notification > Email > Notifications.
  • Open or create your notification for the sc_req_item table.
  • Under When to send, set Send when to Event is fired.
  • Select the sc_req_item.supervisor_email event you created.
  • In the Who will receive tab, check the box for Event parm1 contains recipient.
  • In the What it will contain tab, you can pull variable data using the mail script token ${mail_script:your_email_script_name} or directly reference standard form fields.

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti