Email notification

sourav3
Mega Guru

When configuring the content of an Email Notification, which syntax should be used to reference the properties of an event triggering the Notification?

1 ACCEPTED SOLUTION

Hi Sourav,

I guess you are looking for syntax of using event parms in Notifications.

You can use ${event.parm1}, ${event.parm2} to access Event parm values in Notifications. You can use email scripts for any manipulation of those parm values.

Check this out for more: How to send more than 2 parameters in an event?


If it helps, please mark Correct and 👍 Helpful.

Thanks & Regards,
Madhav

View solution in original post

5 REPLIES 5

haseena ayesha
Kilo Guru

Hi Sourav,

Creating an email notification involves specifying when to send it, who receives it, what it contains, and if it can be delivered in an email digest.

se the following tabs in the Notification form to configure an email notification:

  • When to send — Conditions required to send the notification.
  • Who will receive — Recipients of the notification.
  • What it will contain — Contents of the notification.
  • What Digest will contain — Contents of the email digest if the notification can be delivered in a digest.
Note: If you do not see all the fields on the form, switch to the Advanced view.
 
 
Events are special records the system uses to log when certain conditions occur and to take some kind of action in response to the conditions.
 

The system uses business rules to monitor for system conditions and to generate event records in the Event [sysevent] table, which is also known as the event log or event queue.

Event-generating business rules typically use this script logic:

If [some condition is true for the current record], then [add a specific event to the queue].

For example, here are some of the conditions in the incident event business rule:
  • If a user adds a comment to an incident record, add an incident.commented event.
  • If a user adds an incident record, add an incident.inserted event.
  • If a user updates an incident record, add an incident.updated event.

he handler uses information from event records to take some kind of action such as:

  • Run a script action
  • Schedule a job
  • Send a notification
  • Trigger a workflow activity
  • Trigger an inactivity monitor

Need more information check below thread.

https://developer.servicenow.com/dev.do#!/learn/learning-plans/orlando/new_to_servicenow/app_store_l...

 

                               PS: Hit like, Helpful or Correct depending on the impact of the response

 

Thanks & Regards

Haseena

sourav3
Mega Guru
Hi Haseena, Thanks for your reply. But I am asking about the syntax that should be used to reference event in notification? Can you pls help with writing the exact syntax?

Hi Sourav,

I guess you are looking for syntax of using event parms in Notifications.

You can use ${event.parm1}, ${event.parm2} to access Event parm values in Notifications. You can use email scripts for any manipulation of those parm values.

Check this out for more: How to send more than 2 parameters in an event?


If it helps, please mark Correct and 👍 Helpful.

Thanks & Regards,
Madhav

Hi, gs.eventQueue('incident.commented', current, gs.getUserID(), gs.getUserName()); incident.comment is event name, current refers to specific table, gs.getUserID() is param1, gs.getUserName() is second param2. User above method in your script. In notification Select when to send section in that select when event triggered, after selecting this option you will get another select box to select event name. If in above method if you are passing recipient to whom notification should get sent, then in notification selct send to param1, param2 choice boxes as selected. Mark this answer as correct if helps Thanks, Manjusha Bangalr