When incident is Created then system should send email notification to caller manager via event?

Anusha Gorige
Tera Contributor

When incident is Created then system should send email notification to caller manager via event?

2 REPLIES 2

Vishal Birajdar
Giga Sage

Hi @Anusha Gorige 

 

We can directly create Notification when incident is created but you want it via event then follow below steps :

 

 

Step 1 : Create Event registry 

 System policy >> Events >> Registry  

VishalBirajdar7_0-1695381899253.png

 

Click on "New" & create new record

Event Name : incident.send.to.manager

VishalBirajdar7_1-1695381997299.png

 

Step 2 : Go to Notifications >> Create New 

Set below things highlighted in yellow 

Send when : Event is fired

Event Name : incident.send.to.manager    // just created in step1

 

VishalBirajdar7_2-1695382179896.png

 

Select Advance view - in related links

and in Who will receive tab select 

Event parm 1 contains recipient 
 
VishalBirajdar7_3-1695382467228.png

 

 

Step 3 : Create business rule on "Incident" Table 

When to run - After insert

 

script : 

 

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

    var callerManager = current.caller_id.manager;

    gs.eventQueue('incident.send.to.manager',current,callerManager);

})(current, previous);

VishalBirajdar7_4-1695382630013.png

 

 

 

 

 

 

 

 

 

 

 

Vishal Birajdar
ServiceNow Developer

I know one thing, and that is that I know nothing.
- Socrates

OlaN
Giga Sage
Giga Sage

Hi,

Here is one suggestion, you can create a Flow that triggers on creating of incident, and runs an action of either trigger notification or use Send email action, and send the email to the manager of the caller of the incident.