The Now Platform® Washington DC release is live. Watch now!

Help
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
asifnoor
Kilo Patron
Kilo Patron

Hi,

In this article, I will share the steps on how to trigger an email notification if the assignment group on a particular incident changes more than once. I noticed that this seems to be a very regular feature and hence documenting it here in detail with the screenshots. 

To get started, there is OOTB field reassignment count available on the incident. This gets incremented whenever the assignment group on the incident changes. So we will use this field instead of creating a new one.

1. We need to create an event which gets fired by the BR whenever the reassignment count gets incremented and > 3.

Navigate to System Policy -> Events -> Registry and click on New to create an event. Once the event is created, it should be visible in the Event Registry as shown in the below screenshot.

find_real_file.png

Once the event is created, now let us Create a Business rule on the incident table. 

I am creating a BR on the incident table which triggers "after update" and the condition is 

Reassignment Counter >= 3. // you can change as per your requirement. 

find_real_file.png

Click on Advanced Tab (Ensure you have checked Advanced field).

And fire the event that you have created earlier. You can do this by calling the following line

gs.eventQueue('incident.reassignment_count', current, gs.getUserID(), gs.getUserName()); //the name here should match with the event name that you have created. 

find_real_file.png

Refer to Glide System Event Queue function to understand the usage of other parameters

Once this is done, save the Business Rule.

Now whenever the incident is updated, your newly created BR executes and it checks if the reassignment counter is >= 3. If yes, then it will fire the event.

Now you need to create a notification and let the SN system know that it needs to run when our specified event is fired. You can do this in the notifications.

Go to System Notifications -> Email -> Notifications and click on New to create a new notification. Refer to below screenshot.

find_real_file.png

Once this is created, then you are all set.

Now go to any existing incident, change the assignment group and save. Configure the form using form designer and add the reassignment counter field on the form for the testing purpose. 

Check the reassignment counter field, it should be incremented whenever an assignment group changes. Change assignment group multiple times till you get the reassignment counter to 3 or more. Once it reaches 3 or more, then you should get an email.

Mark the article as helpful if you found this useful.

 

 

 

 

Comments
karan15
Tera Contributor

can we create BR to trigger email to certain people if there is any P1 or P2 incident logged?

asifnoor
Kilo Patron
Kilo Patron

yes sure. you need to write Br to trigger an event and pass the recipients as event parameters. Then in your notification, under recipients, you can select the field "event param1 contains recipients" or "event param2 contains recipients" depending on which param you are sending recipients.

deepan_db
Tera Contributor

How to pass the Email ID dynamically for different assignment group?

deepan_db
Tera Contributor

Event not triggering Email.

 

Its triggering when I am using gs.GetUserID() or hard Coded mail ID in param1,

 

If fetching Assignment Group manager's mail its not sending.

Jonnie_
Tera Contributor

Can we use async BR instead of After BR.

 

Which one is best practice to use async or after BR?

Version history
Last update:
‎01-31-2019 11:24 PM
Updated by: