Loading

Email Notification Example

From ServiceNow Wiki
Home > Administer > Service Administration > Notifications > Email Notification Example
Jump to: navigation, search
Role required
Functionality described here requires the Admin role.
Notifications
Knowledge.gif Get the Book

1 Overview

In this example, we will configure ServiceNow to notify specific users by email whenever an incident with a priority of 1 - Critical is updated, regardless of the changes that have been made. We will create an email notification to alert all recipients when the default system event incident.update is triggered for a priority 1 incident. The notification will display information of interest to the recipients, such as the incident number, category, assignees, and any comments that were added to the incident.

2 Set Up Email Notification

Open and configure a new email notification record:

  1. Navigate to System Policy > Email > Notifications, and then click New.
  2. Configure the email notification record as follows.


Field
Input Value
Name
Give your notification record a unique name, such as Incident of Priority 1 Updated.
User
Click the magnifying glass icon and select a recipient from the list of ServiceNow users. You can select only one user in this field.
Event name
Select the event to use for this notification. The incident.updated event is triggered by any change to an incident record and can be used to send our notification.
User field
Enter the field name from the Incident table that defines the recipient for this notification. For example, you might send notification of an update to the person who opened the incident by typing opened_by.
Email template
Leave this field blank. We will cover the construction and use of templates in another exercise.
Group
Click the magnifying glass icon, and then select a group from the list of ServiceNow groups. You can select only one group in this field.
Table
Select the appropriate database table, in this case Incident [incident].
Group field
Enter the field name from the Incident table that defines the group to notify. For example, you might send notification of the update to the designated assignment group by typing assignment_group.
Weight
Weight determines the sending priority of each notification when more than one qualifies. This is an arbitrary scale that you set.
Send to event creator
Select this check box to send the notification to the person who performed the action that started the notification process, in this case the person who updated the priority 1 incident. For this example, we clear the check box.
Type
Select EMAIL.
Active
Select the check box (true) to enable email notification.
Conditions
Updated --> is anything. This creates the condition under which the notification is sent. In our example, an update to any field in an incident record sends an email to all recipients.
Subject
Type an appropriate subject line for your email. Select variables for your content from fields in the Incident table. Put the cursor in the subject line where you want the variable to appear, and then click the field name in the Select variables column. For this exercise, type the following subject line and insert the variable for the Priority field:

An incident of priority ${priority} has been updated.

In this notification, the variable ${priority} returns the value 1 – Critical.

Message
Construct a message that includes all the information you think the recipients need to know about the updated incident. Select the appropriate variables for your message from the fields in the Incident table. Put the cursor in the message where you want the variable to appear, and then click the field name in the Select variables column. The special character, <hr/>, creates a manual break in the message that sets off the Comments section. For this exercise, create the following message:

Short Description: ${short_description}
Click here to view incident: ${URI}
Incident number: ${number}
Category: ${category}
Assigned to: ${assigned_to}
Assignment group: ${assignment_group}
<hr/>
Comments:
${comments}

List
Click the lock icon to open a list of recipients for the email notification. Click the magnifying glass icon and select names from the list of ServiceNow users. You can select as many users from the list as you want.
List field
Enter the field name from the Incident table that identifies a list that contains potential recipients. For example, to send the notification to users who are on the watch list for this issue, type watch_list.


Your email notification record should look like this:

Incident Email Notification2.gif

3 Test Your Email Notification

After you have created the email notification record, set up a test in your environment to make sure the intended recipients get the proper notification.

  1. Create users in your ServiceNow platform who have email addresses you can monitor, and then create a group that includes one of these users.
  2. Open a Priority 1 – Critical incident, and assign it to one of the users you created. Then select the group you created as the assignment group.
  3. Open your email notification record and specify the recipients.
    a. Select one of the users you created from the lookup list in the User field.
    b. Type assigned_to for the User field value.
    c. Type assignment_group for the Group field value.
  4. Update your Priority 1 incident by adding comments, and then click Update.
  5. Check the email accounts of the user to whom you assigned the incident and the user member of the assignment group.

The email that is sent should have the same structure as the following sample:


Sample notification email

Was this article helpful?
Yes, I found what I needed
No, I need more assistance
Views
Personal tools