Notification snippets
Quick answer
Notifications react to records or events.
Key takeaways
- Fire an event from a rule
- Mail script (in the notification body)
Notifications react to records or events.
Fire an event from a rule
gs.eventQueue('incident.escalated', current, current.priority, current.assigned_to);Mail script (in the notification body)
template.print('Priority: ' + current.priority.getDisplayValue());Want to learn this properly?
Our live, instructor-led ServiceNow Training covers this hands-on, with real projects and a certification path.
Check your understanding
What queues a custom event for a notification?
- A. gs.eventQueue()
- B. g_form.addInfoMessage()
- C. gr.insert()
Show answer
A. gs.eventQueue()
gs.eventQueue raises an event notifications can subscribe to.
Where does template.print() run?
- A. In a mail/notification script
- B. In a client script
- C. In an ACL
Show answer
A. In a mail/notification script
Mail scripts build notification content.
Frequently asked questions
What does the term Notification snippets refer to in ServiceNow?
Notifications react to records or events.