Notifications

Download as pdf or txt
Download as pdf or txt
You are on page 1of 108

Notifications

ServiceNow

PDF generated using the open source mwlib toolkit. See http://code.pediapress.com/ for more information.
PDF generated at: Tue, 18 Jul 2017 05:30:40 PST
1

Introduction

System Mailboxes
Overview
Sent and received email can be seen in the System Mailboxes application, where you can view the Inbox, Outbox,
and Sent mailboxes. Each provides a filtered view of emails to let you see only what you need to at any given time,
including list fields applicable to each. From the left navigation pane, select System Mailboxes > Status to see your
current POP and SMTP status.

The System Mailbox is hosted by ServiceNow, who have sole access to the mailboxes. By default, once the
ServiceNow application has pulled an email message, it will be deleted from the mail server and stored in the
application on the sys_email table.

Mail Delivery
Inbound emails: All inbound mail is placed into the Inbox until it is processed. After it is cleared, the email moves
to the Received state. If the ServiceNow system is restarted for any reason (such as during a system upgrade), all
inbound mail waits on the external mail server until ServiceNow can request delivery.
Outbound emails: All outbound mail is placed into the Outbox until it is processed. Once cleared, it is moved to
Sent (if sent) or Skipped (not sent, as in the case of no valid recipients). If the ServiceNow system is restarted for
any reason (such as during a system upgrade), all outbound mail waits in the ServiceNow database until
ServiceNow comes online, and the scheduler looks for mail to deliver.
Notifications 2

Notifications
Overview
Notifications are important communication tools that keep users informed of events that concern them. You can use
email and SMS notifications to send and receive communication from within the system. Notifications are triggered
by system events, but unlike business rules, require no scripting knowledge. You can send notifications to email
addresses and SMS devices, such as cell phones. Notifications can also be forced to override any user preferences or
settings. This ensures the correct users always receive important notifications.
Users can subscribe to notifications of interest or unsubscribe from notifications that they do not want with the
subscription based notifications feature.
The subscription based notifications feature enables users to subscribe to notifications of interest or unsubscribe
from notifications that they do not want . This feature also enables administrators to send mandatory notifications
that users cannot block. A separate interface enables you to select the devices and service providers for SMS
notifications.

Email Notifications
For email messages, an administrator writes a simple form email that is sent out every time a certain event occurs.
The Email Notification form uses variables to return field values from the table generating the notification. For
example, an email notification generated by an incident can contain information about who opened the incident, the
incident's priority, and the description.
Users can enable or disable the email notifications for themselves. They can also define more specific rules
regarding which email notifications to receive if subscription based notifications are active. Users who receive email
notifications can respond to the email, which triggers an inbound email action. Inbound email actions are the other
half of the communication functionality that email notifications provide. By responding to email notifications, users
can interact with the system through their email provider, without logging in to the instance.

Configure Email Properties


Configure your SMTP and POP server settings in the email properties. The default settings are intended for the
ServiceNow mail server and need not be changed unless you intend to use your own SMTP or POP server.

Create Events and Business Rules


If the events in the base system do not provide the necessary level of detail, or do not suit your customized instance,
create custom events to trigger notifications. See Events and Email Notification for details. If you create custom
events, make sure to create business rules that use these events.
Notifications 3

Create Email Notifications


Create the email notifications for your users. The base ServiceNow system provides many useful notifications.
Create new records or edit an existing notification if the default functionality does not suit your business needs. Edit
the notification message either in the notification record or in the email template the notification uses.

Configure Email Addresses and Subscribe to Notifications


Users can subscribe to or unsubscribe from with the subscription based notifications feature. This provides users
with the flexibility of configuring the email notifications they see and the delivery method.
Additionally, this feature allows administrators to create additional email addresses that notifications should be sent
to. Follow the tasks in Getting Started to set up and use subscription based notifications.

Create or Update ServiceNow Records via Email


Use inbound email actions to perform various actions in ServiceNow. Inbound email actions behave like business
rules and use conditions and scripts to perform tasks. These are some of the typical actions that an inbound email can
perform:
Create new users
Assign tasks
Update or create tasks (incidents, problems, change requests)
Add attachments to records

SMS Notifications
Short messaging service (SMS) is the standard protocol used to deliver short text messages to cell phones. Most cell
phones support SMS, even if they do not support more sophisticated messaging like email. ServiceNow can deliver
alerts and notifications to SMS devices in addition to delivering standard email notifications. This is particularly
useful when critical events require immediate attention and an email notification may be too slow.
SMS messages, unlike emails, are limited to extremely short text strings, 140 characters in most cases. To
compensate for this limitation, subscription based notifications provide the SMS alternate field for the Email
Template and Email Notifications forms. Administrators can use this field to enter brief messages for SMS
notifications.
ServiceNow sends SMS messages through an SMTP gateway to the cell phone companies. The carriers then forward
the information to the devices. If the cell phone provider has an SMTP gateway, it can send SMS messages.
To configure notifications for SMS devices, such as cell phones, perform the following tasks.

Note: Your instance can send SMS messages if your carrier provides an SMTP to SMS gateway service. Verify this with your
carrier.
Notifications 4

Create Events and Business Rules


If base system events do not provide the necessary level of detail, or do not suit your customized system, you can
create events to trigger notifications. See Events and Email Notification for details. If you create events, you must
register the events and create business rules that use the events.

Create Notifications for Users


The base ServiceNow system provides many useful notifications. You can create new records or edit an existing
notification if the base system functionality does not suit your business needs. You can edit the SMS notification
message in the SMS alternate field in either the notification record or in the email template the notification uses.
The SMS alternate field enables you to configure SMS messages that meet the 140 character limit.

Create an SMS Device


Configure SMS devices and select the carrier in the Notification Preferences form.

Subscribe to the Notification


Allow users to subscribe or unsubscribe from notifications on their SMS device or block delivery of certain
notifications in the Notification Preferences form.

Social IT Notifications
Social IT table notifications generate automatic live feed messages or chat messages. When a record is inserted or
updated on a specific table and the notification conditions are met, a live feed or chat message is generated. Live
feed messages can be posted to the company feed or to any group. Chat messages are posted to the chat room that is
associated with the record.
To learn more, see Setting Up Live Feed Table Notifications.

Enhancements

Fuji
The Email Properties page provides SMS Sender job diagnostics.
The system provides better handling of emails with excessively large bodies. Improvements include error logging
and the prevention of truncated emails triggering inbound email actions. Additionally, the
glide.email.outbound.max_body_bytes property is added and enables administrators to configure the
maximum outbound email body size.
The system stores calendar data from incoming email as an attachment on the associated record by default. The
glide.email.inbound.calendar_behavior property enables administrators to modify how the system
stores calendar data.
The glide.email.outbound.header.auto_submitted property determines whether to add an
"Auto-submitted" header to all outbound emails.
The glide.email.reply_subject_prefix property recognizes additional reply subject prefixes for
meeting invitation responses.
Notifications 5

Eureka
Properties are available to limit the number and total size of email attachments allowed per email (Eureka Patch
4).
Email notifications created in Eureka are in a rich HTML format.
Administrators have the option of converting individual existing email notifications to the rich HTML format.
Images can be inserted into email notifications with an image picker in the WYSIWYG editor.
Images linked with URLs relative to a particular instance are converted to absolute URLs, preventing broken
links.
Mail scripts are condensed into a single, easy-to-read line that can be reused in multiple email notifications.
A Newlines to HTML check box has been added to the Email Script form to help ensure backward compatibility
with older scripts.
Properties are available for controlling the conditions by which recipient notifications are logged.
Administrators can filter device notifications using a schedule.

Dublin
The Mail Properties page layout has changed.
The Mail Diagnostics section provides information about the current state of your email configuration.
A system property, glide.smtp.encryption, in the Outgoing Mail Server section of the Mail Properties
page has been added to replace the glide.smtp.secure and glide.smtp.tls properties for specifying
how to encrypt communications with the SMTP server.
The following system properties are private to prevent their values from being copied to new instances during
clone requests or as part of update sets: glide.email.override.url, glide.email.user,
glide.pop3.secure, and glide.smtp.auth.
6

Configuration

Configuring Email Properties


Overview
All email notifications use the email properties you define in the System Properties > Email module. For
instructions on creating and sending custom emails when ServiceNow events occur, see the tasks in Email
Notifications.

Configuration Options
ServiceNow offers the following email configuration options.
Standard email configuration
Standard email configuration using your own address or domain
Alternate email configuration using your own SMTP server
Alternate email configuration using your own POP3 server
Alternate email configuration using your own SMTP and POP3 servers

Note: When the email accounts plugin is active, the system does not use the email properties. Configure account settings through the
Email Accounts module.

Standard Configurations Using ServiceNow SMTP and POP3


A POP3 mailbox is created on the ServiceNow mail server with an [email protected] naming
convention. Your end users will see email messages from that email address when submitting requests to the
ServiceNow application (such as requesting an approval or opening an incident). The ServiceNow application uses
the ServiceNow SMTP server to process outbound email messages to your users ([email protected]). These
messages are sent from the ServiceNow datacenter, routed as standard SMTP traffic to your primary Mail Exchange
(MX) server, and processed internally within your organization. The ServiceNow mail servers are configured to use
opportunistic TLS, meaning that if your internal mail servers support sending and receiving messages via a Transport
Layer Security (TLS)-encrypted channel, ServiceNow servers support that communication.

Note: Instances do not support the processing of incoming email messages with a signed certificate. The body of the email is stripped
out because the instance cannot process the part of the email that is stored in plain text or HTML.
Configuring Email Properties 7

Standard Email Configuration


The standard email configuration uses the SMTP and POP3 services provided by ServiceNow.

Note: ServiceNow automatically adds the necessary system property settings when provisioning your instance. You should not need
to change any settings to enable email, but these settings are provided as a reference.

1. Navigate to System Properties >


Email.
2. Configure the following email
properties and click Save.

Standard Email Configuration

Property System Property Label Setting Required


Section

Outgoing glide.email.smtp.active Mail sending enabled. Yes


Mail Server

Outgoing glide.email.user SMTP account (e.g. [email protected]). Username Email address of the instance. For example,
Mail Server is before the '@' when SMTP authentication is enabled [email protected].

Versions prior to Dublin

1. Navigate to System Properties > Email.


2. Configure the following email properties and click Save.

System Property Label Setting Required

glide.email.smtp.active Enable email sending (SMTP). Yes

glide.email.user User email (eg. [email protected]) that is used to log in Email address of the instance. For example,
to the SMTP server optionally. [email protected].
Configuring Email Properties 8

Standard Email Configuration Using Your Own Address or Domain


You can use the standard ServiceNow email infrastructure with your own internal email address. Typically,
organizations use a custom email address to change the reply-to address from the instance name to a custom email
address within their domain.

Note: This configuration requires changing your internal email architecture to forward email from your custom email address to
your instance's actual email address. ServiceNow also recommends implementing a spam filter on your custom email address to
prevent unwanted mail from triggering actions on your instance.

1. Navigate to System Properties >


Email.
2. Configure the following email properties
and click Save.
3. Set up a forward on your internal email
architecture. For example, forward mail
sent to [email protected] to
[email protected].

Standard Email Configuration Using Your Own Email Address or Domain

Property System Property Label Setting Required


Section

Outgoing Mail glide.email.smtp.active Mail sending enabled. Yes


Server

Outgoing Mail glide.email.user SMTP account (e.g. Custom email address you want to use in place of the
Server [email protected]). Username is instance email address. For example,
before the '@' when SMTP authentication [email protected]. This address becomes the
is enabled instance's reply-to address.

Outbound Mail glide.email.username Outgoing mail display name (e.g. "Help The display name of the custom email address. For
Configuration Desk") example, Help Desk.
Configuring Email Properties 9

Versions prior to Dublin

1. Navigate to System Properties > Email.


2. Configure the following email properties and click Save.
3. Set up a forward on your internal email architecture. For example, forward mail sent to [email protected] to
[email protected].

System Property Label Setting Required

glide.email.smtp.active Enable email sending (SMTP) Yes

glide.email.user User email (eg. [email protected]) Custom email address you want to use in place of the instance email
that is used to login to the SMTP server address. For example, [email protected]. This address
optionally. becomes the instance's reply-to address.

glide.email.username Outgoing email display name (e.g. "Help The display name of the custom email address. For example, Help Desk.
Desk")

Alternate Configurations Using Your Own SMTP or POP3


Some organizations utilize their own internal email architecture to handle email. This may be useful if you want to
leverage existing filtering, retention, or compliance aspects of your internal email architecture. You can combine the
ServiceNow email architecture with your own internal architecture as needed.

Alternate Email Configuration Using Your Own SMTP Server


This alternate email configuration uses a customer SMTP server and the ServiceNow POP3 server.
Configuring Email Properties 10

1. Navigate to System Properties >


Email.
2. Configure the following email properties
and click Save.
3. Verify you receive a Connection
Successful message for the Outgoing
Mail Server.
4. Set up a forward on your internal email
architecture. For example, forward mail
sent to [email protected] to
[email protected].

Alternate Email Configuration Using Your Own Custom SMTP Server

Property System Property Label Setting Required


Section

Outgoing Mail glide.email.smtp.active Mail sending enabled. Yes


Server

Outgoing Mail glide.email.server SMTP mail server URL to your SMTP server. For example,
Server smtp.yourdomain.com.

Outgoing Mail glide.smtp.auth SMTP server requires username and password Select Yes if your SMTP server requires
Server authentication authentication.

Outgoing Mail glide.email.user SMTP account (e.g. [email protected]). Email address to use for both SMTP
Server Username is before the '@' when SMTP authentication and the reply to address. For
authentication is enabled example, [email protected].

Outgoing Mail glide.email.user_password SMTP account password Password for your SMTP server.
Server

Outbound Mail glide.email.username Outgoing mail display name (e.g. "Help Desk") Display name for the SMTP email address. For
Configuration example, SMTP.
Configuring Email Properties 11

Versions prior to Dublin

1. Navigate to System Properties > Email.


2. Configure the following email properties and click Save.
3. If the SMTP account address listed in the glide.email.user property is not the reply to address you want to use in ${mailto:} links, add
the property glide.email.mail_to to set a different reply to address for email notification links. For example,
[email protected].
See Deep Linking for more information on creating links to ServiceNow records.
4. Verify that the instance can connect on the necessary TCP ports in your mail architecture.
5. Set up a forward on your internal email architecture. For example, forward mail sent to [email protected] to
[email protected].

System Property Label Setting Required

glide.email.smtp.active Enable email sending (SMTP) Yes

glide.email.server Outgoing (SMTP) mail server. URL to your SMTP server. For example, smtp.yourdomain.com.

glide.email.user User email (eg. [email protected]) that Email address to use for both SMTP authentication and the reply to
is used to login to the SMTP server optionally. address. For example, [email protected].

glide.email.mail_to [None] [Optional] Email address to use for the reply to address if different
from the SMTP authentication address. For example,
[email protected].

glide.email.username Outgoing email display name (e.g. "Help Display name for the SMTP email address. For example, SMTP.
Desk")

glide.email.user_password Outgoing (SMTP) mail server password. Password for your SMTP server.

glide.smtp.auth Authenticate with the SMTP server using the Select Yes if your SMTP server requires authentication.
user name and password properties
Configuring Email Properties 12

Alternate Email Configuration Using Your Own POP3 Server


This alternate email configuration uses an internal POP3 server and the ServiceNow SMTP server.
1. Navigate to System Properties >
Email.
2. Configure the following email properties
and click Save.
3. Verify the Incoming Mail Server
displays a Connection Successful
message.

Alternate Email Configuration Using Your Own Custom POP3 Server

Property Section System Property Label Setting Required

Incoming Mail glide.email.read.active Mail receiving Yes


Server enabled

Incoming Mail glide.pop3.server POP3 mail server URL to your POP3 server. For example, pop.yourdomain.com.
Server

Incoming Mail glide.pop3.user POP3 account Email address to use for POP authentication. For example,
Server [email protected].

Incoming Mail glide.pop3.password POP3 account Password for the POP3 server.
Server password
Configuring Email Properties 13

Versions prior to Dublin

1. Navigate to System Properties > Email.


2. Configure the following email properties and click Save.
3. Verify that the instance can connect on the necessary TCP ports in your mail architecture.

System Property Label Setting Required

glide.email.read.active Enable email receiving (POP3) Yes

glide.pop3.server Incoming (POP) mail server, if different from outgoing URL to your POP3 server. For example,
(SMTP) mail server pop.yourdomain.com.

glide.pop3.user Incoming (POP) mail account name, if different from Email address to use for POP authentication. For example,
outgoing (SMTP) mail account name [email protected].

glide.pop3.password Incoming (POP) mail account password, if different from Password for the POP3 server.
outgoing (SMTP) mail account password

Alternate Email Configuration Using Your Own SMTP and POP3 Servers
This alternate email configuration uses both internal SMTP and POP3 servers.
1. Navigate to System Properties >
Email.
2. Configure the following email properties
and click Save.
3. Verify you receive a Connection
Successful message for the Outgoing
Mail Server.

Alternate Email Configuration Using Your Own Custom SMTP and POP3 Servers
Configuring Email Properties 14

Property System Property Label Setting Required


Section

Outgoing Mail glide.email.smtp.active Mail sending enabled. Yes


Server

Outgoing Mail glide.email.server SMTP mail server URL to your SMTP server. For example,
Server smtp.yourdomain.com.

Outgoing Mail glide.smtp.auth SMTP server requires username and password Select Yes if your SMTP server requires
Server authentication authentication.

Outgoing Mail glide.email.user SMTP account (e.g. [email protected]). Email address to use for both SMTP
Server Username is before the '@' when SMTP authentication and the reply to address. For
authentication is enabled example, [email protected].

Outgoing Mail glide.email.user_password SMTP account password Password for your SMTP server.
Server

Outbound Mail glide.email.username Outgoing mail display name (e.g. "Help Display name for the SMTP email address. For
Configuration Desk") example, SMTP.

Incoming Mail glide.email.read.active Mail receiving enabled Yes


Server

Incoming Mail glide.pop3.server POP3 mail server URL to your POP3 server. For example,
Server pop.yourdomain.com.

Incoming Mail glide.pop3.user POP3 account Email address to use for POP authentication. For
Server example, [email protected].

Incoming Mail glide.pop3.password POP3 account password Password for the POP3 server.
Server

Versions prior to Dublin

1. Navigate to System Properties > Email.


2. Configure the following email properties and click Save.
3. If the SMTP account address listed in the glide.email.user property is not the reply to address you want to use in ${mailto:} links, add
the property glide.email.mail_to to set a different reply to address for email notification links. For example,
[email protected].
See Deep Linking for more information on creating links to ServiceNow records.
4. Verify that the instance can connect on the necessary TCP ports in your mail architecture.
5. Set up a forward on your internal email architecture. For example, forward mail sent to [email protected] to
[email protected].
Configuring Email Properties 15

System Property Label Setting Required

glide.email.smtp.active Enable email sending (SMTP) Yes

glide.email.read.active Enable email receiving (POP3) Yes

glide.email.server Outgoing (SMTP) mail server. URL to your SMTP server. For example, smtp.yourdomain.com.

glide.email.user User email (eg. [email protected]) that Email address to use for both SMTP authentication and the reply to
is used to login to the SMTP server optionally. address. For example, [email protected].

glide.email.mail_to [None] [Optional] Email address to use for the reply to address if different
from the SMTP authentication address. For example,
[email protected].

glide.email.username Outgoing email display name (e.g. "Help Display name for the SMTP email address. For example, Help
Desk") Desk.

glide.email.user_password Outgoing (SMTP) mail server password. Password for your SMTP server.

glide.smtp.auth Authenticate with the SMTP server using the Select Yes if your SMTP server requires authentication.
user name and password properties

glide.pop3.server Incoming (POP) mail server, if different from URL to your POP3 server. For example, pop.yourdomain.com.
outgoing (SMTP) mail server

glide.pop3.user Incoming (POP) mail account name, if different Email address to use for POP authentication. For example,
from outgoing (SMTP) mail account name [email protected].

glide.pop3.password Incoming (POP) mail account password, if Password for the POP3 server.
different from outgoing (SMTP) mail account
password

Email Size Restrictions


For instances that use a standard email configuration, the system cannot send or receive emails that are larger than
25MB, including the email header, body text, and attachments. Instances configured to use an alternate email
configuration may support different maximum total file sizes. The maximum email size limit is enforced regardless
of any configured email body or attachment size limits.

Note: Even if the email and its attachments are less than 25MB, the actual size of an email message could be larger when it gets
encoded by an email client. So these messages might exceed the limit when they reach the instance.

Email Service Availability


Email service is intentionally shut down on instance clones to prevent resending already delivered email.
Upgrades no longer require an extended interruption of email service (Dublin release). Instances will continue to
process email during an upgrade.
For a possible explanation for undelivered emails, see Whitelisting emails sent from the ServiceNow infrastructure
[1]
on the ServiceNow Community.
Configuring Email Properties 16

Instance-to-Instance Communication via Email


ServiceNow does not recommend using email notifications to communicate between two instances. Use Web
Services instead.

Next Steps
After enabling email on your instance, you may want to complete these related tasks.
Test the email configuration by routing all email to a single user (set the glide.email.test.user
property).
Review the baseline email notifications to determine if they meet your business needs.
Review the baseline inbound email actions to determine if they meet your business needs.
Determine if you want to create users when ServiceNow receives an email from an unrecognized user.
Determine what kind of watermarks outbound email uses to associate records with email messages.
Set the precedence of outgoing mail. By default, ServiceNow sends email with a precedence of "bulk" (set the
glide.smtp.precedence_bulk property).
Consider preventing untrusted users from triggering inbound actions. This is one way of preventing unwanted
email from affecting your instance.
Implement a spam filter to restrict unwanted messages sent to your custom email addresses.

Enhancements

Dublin
Email service is now available during upgrades. See Email Service Availability.
The email properties page has a new layout.

Calgary
The default SMTP server changed to relay.
A new property glide.email.mail_to specifies the email address to use as the reply to address in links
included in email notifications. This property allows customers to use distinct email addresses for SMTP
authentication and notifications.
A new property glide.email.smtp.max_recipients specifies the maximum number of recipients a
notification can have before ServiceNow splits the notification into multiple messages. By default, ServiceNow
splits a notification with more than 100 recipients into multiple messages with each message having up to 100
recipients.

References
[1] https:/ / community. servicenow. com/ community/ service-automation-platform/ notifications/ blog/ 2015/ 01/ 28/
whitelisting-emails-sent-from-servicenow-own-email-infrastructure
Enabling the Email Client 17

Enabling the Email Client


Overview
The ServiceNow email client enables you to send email directly from any record (such as an incident, change
request, problem, or user record). By default, this functionality is disabled. Administrators can enable the
functionality by changing the dictionary entry for each appropriate application.
The email client can be useful in cases where you want to send an email:
To engage more people in a piece of work.
That includes Cc and Bcc recipients.
That includes personalized comments.
To a third party who doesn't have an account in your ServiceNow instance.
To someone about an incident where you don't have an email notification set up to do exactly what you want.

Enabling the Email Client


The email client is enabled by default, starting with the Fuji release. If it is not enabled, you can enable the email
client for a specific table, such as Incident, by adding the email_client attribute.
1. Open a record in the appropriate application. For example, open any incident record.
2. Right-click the header bar and select the appropriate option for your version:
Fuji or later: Configure > Dictionary
Eureka or earlier: Personalize > Dictionary
3. Select the first record in the Dictionary Entries list. This has the record type collection and does not have any
entry for Column name.
4. In the Attributes field, enter email_client=true. If there are any other values in the field, be sure to use a comma
as a separator character.
5. Click Update.

Email client dictionary entry

Note: This capability is not inherited by tables that extend the current table. For example, enabling the email client on the Task table
does not enable it for the Incident or Problem tables.
Enabling the Email Client 18

Using the Email Client


After you enable the email client for an application, users see an email icon in the header bar for each application
record.
Click the email icon to launch the email client as a pop-up window. If
the window does not appear, verify that your browser is not blocking
Email icon
pop-ups.

Email client interface

Note: The Subject field on the email client allows a larger character count than the default setting for the Subject field on the Email
table. If the subject text from the client is being truncated, increase the Max length value for the Subject field on the Email table. See
Modifying Dictionary Entries for instructions.

Note: Make sure that your users have their notification device configured in their user settings.

Toolbar
Use the controls in the toolbar to send the email, attach files, insert quick message text, or check spelling.

Email client toolbar

Note: The email client only displays the Quick Message selector if you have already created quick message records.

User and Group Autocomplete


When you begin typing an email address, an autocomplete list displays any users and groups that match the text. The
autocomplete list only displays users and groups from domains you (the logged in user) can view. After you select a
user or group from the autocomplete list, the system adds the email address to the current address field.
Enabling the Email Client 19

Keyboard Shortcuts
The following keyboard shortcuts can be used:
Alt+S: Send email
Email client autocomplete

Alt+A: Open the attachments interface

HTML Support
The email client always uses the multipart/mixed content type and supports HTML markup in the message body.
See Email Notifications for more information.

Note: Line breaks do not appear for multi-line fields such as ${description} and ${comments} in the email client template.

Customizing the Email Client


The email client has the following default properties and values:

Property Default Value How to Customize

ACL access Defaults to allowing only users with the itil role to access the email client. Change the To control who can see the email
ACL rule to control access to the email client. client: Controlling Access to the
Email Client

Email icon Allows only users with write access to the current table to see the email icon. To remove the email icon:
Removing the Email Icon

Autocomplete Defaults to only displaying a user's first and last name. A system property controls what To change search behavior:
columns the email client autocomplete displays. If your organization has several users with Configuring Email Client
the same name, consider adding company or email address columns to help distinguish Autocomplete Search Results
between users. To display additional information:
Displaying Additional Information
in the Email Client Autocomplete

From Defaults to hiding the field. A system property can display the field on the email client. To display the field: Displaying an
The From setting defaults to the values in the User email (glide.email.user) and Editable From Field
Outgoing email display name (glide.email.username) system properties. To edit the default value: Creating
Email Client Templates

Reply to Defaults to hiding the field. A system property can display the field on the email client. To display the field Displaying the
The Reply to field defaults to the values in the User email (glide.email.user) and Reply To Field
Outgoing email display name (glide.email.username) system properties. To edit the default value: Creating
Email Client Templates

To Defaults to the email address of the caller. To edit the default value: Creating
Email Client Templates

Cc Defaults to the email addresses of the user who opened the incident and all users in the To edit the default value: Creating
watch_list. Email Client Templates

Subject Defaults to the incident number and short description. To edit the default value: Creating
Email Client Templates
Enabling the Email Client 20

Controlling Access to the Email Client


Only users with the itil role can access the email client.
To change the ACL rule for the email client, edit the following ACL:

Name Type Operation

EmailClientProcessor processor execute

Note: Because the visibility of the email icon is determined by whether the current user has write access to the table, it is possible
that a user may be able to see the email icon and still not open the email client.

Creating Email Client Templates


The email client uses its own email templates to define default values for fields. You can create a different template
for each table that uses the email client.
1. Navigate to System Policy > Email > Client Templates.
2. Click New.
3. Fill in the fields on the Email Client Template form.
4. Click Submit.

Note: If the Client Templates module is not visible, enable the module.

Field Description

Name Enter a unique template name.

Table Select the table that the template applies to. You must enable the email client for the same table.

Note: The list shows only tables and database views that are in the same scope as the template (starting with the Fuji
release).

To Enter a comma-separated list of either field names that contain user email addresses or specific email addresses.

Cc Enter a comma-separated list of either field names that contain user email addresses or specific email addresses.

Bcc Enter a comma-separated list of either field names that contain user email addresses or specific email addresses.

Subject Enter a description of the email. The description can contain a comma-separated list of field names or specific values.

Body Enter any text or mail script that you want to appear in the message body.

Here is a sample template for the Incident table that you can use in a mail script:
template.print("Incident number -" + current.number + "\n");
Here is how the template populates an incident email.
Enabling the Email Client 21

Configuring Email Client Autocomplete Search


Results
To control the email client autocomplete search result behaviors,
navigate to System Properties > UI Properties and set these
properties.

Email client window populated by a template

Email client autocomplete properties

Property Description

glide.ui.email_client.autocomplete.count Set the maximum number of autocomplete matches.

glide.ui.email_client.autocomplete.group Specify whether groups are included in autocomplete results.

Displaying Additional Information in the Email Client Autocomplete


Administrators can add a system property that allows the Email Client to display additional columns from the User
[sys_user] table in the autocomplete list. Defining this property can help distinguish between individuals who have
the same first and last names and ensures that users select the proper recipient for an email.

Property Description

glide.ui.email_client.email_address.disambiguator Sets the columns from the User [sys_user] table that the autocomplete
list displays. Separate each column name with a semicolon character (;).
See the system dictionary for a list of available column names. For
example, to add the sys_user.email and sys_user.company columns, set
the property to: email;company.
Type: string
Default value: name
Location: Add to the System Property [sys_properties] table

Enabling the SMS Delivery Option


The Subscription Based Notifications plugin activates the following
system property:
Email client autocomplete displaying additional
columns

Property Description

glide.email_client.show_sms_option Specify whether a check box appears in the email client for sending the message to the user's
SMS device. If no SMS device exists, the email client sends the message to the primary email
device.
Enabling the Email Client 22

Displaying an Editable From Field


By default, the email client does not display a From field. Instead, it
uses an email address computed from the combination of two email
properties:
Outgoing email display name (glide.email.username)
User email (glide.email.user)
Email client with SMS option active

For example: IT Service Desk <it_service_desk@<instance


name>.service-now.com>
To display an editable From field in the email client:
1. Navigate to System Properties > UI Properties.
2. Select the Yes check box for Override the email 'From:' address
in the email client (glide.ui.email_client.from).

Email properties that determine default From


address

Setting the From Address with an Email Client


Template
System Property to display the From field
Use an email client template to set a default value for the From field if
it should be different from the system default. For example, you can
dynamically set the From field to the email address of the current user.
1. Navigate to System Policy > Email > Client Templates.
2. Select an existing template or create a new one. For example, select the Incident Template record.
3. Configure the form to add the From field.
4. Enter a script to add a default value to the From field.
For example, the following script displays the current user name and the current user email address.

javascript:gs.getUserDisplayName() + " <" + gs.getUser().getEmail() + ">"

The email client dynamically generates the email address, as shown.


Enabling the Email Client 23

Displaying the Reply To Field


By default, the email client does not display the Reply to field because
users cannot change this address. The email client always uses the
same Reply to address as that defined for email notifications. This
ensures that the email has a valid watermark and can generate inbound
email actions as normal. If you want to change the global reply-to
address you must configure your instance to use your own SMTP
Email client displays values based on the email
client template
server.

To display the Reply to line in the email client:


1. Navigate to System Properties > UI Properties.
2. In the Override the email 'Reply to:' address in the email client (glide.ui.email_client.reply_to)
field, select the Yes check box.

Removing the Email Icon


You can use access control rules to hide or display the email icon.
System property to display the Reply to field
Users with write access to the current table can see the email icon. To
remove the icon, remove the user's write access to the table. Typically you do this in one of two ways:
Make the user an Employee Self-Service (ESS) user. ESS users do not have a user role, and without a role they do
not have write access to the Incident table. Making a user an ESS users, therefore, hides the email icon on the
Incident form.
Create a custom ACL rule and user role that does not have write access to the table. The default ACL rule for the
email client checks to see if the user has the itil role. If you grant users a custom role other than itil, then any such
users will not see the email icon.

Quick Messages
Quick messages allow you to insert predefined text into the message body of the email client. Selecting a quick
message fills the Message Text field with the body specified in the quick message. After you define one or more
quick messages, the Quick Message selector appears in the email client. You can reference variables directly in
quick messages. Use the following syntax: ${variable_name}.

Note: If you add attachments to the Quick Message templates, the attachments are not sent as part of the email distribution.

To define quick messages:


1. Navigate to System Policy > Quick Messages.
2. Click New.
3. Fill in the Email Client Canned Messages form.
4. Click Submit.
Enabling the Email Client 24

Field Description

Title Enter a name to appear in the Quick Message selector.

Active Select this check box to make the quick message available for selection. Clear this check box to remove the message from the Quick
Message selector.

User Select the user who has access to this quick message. Selecting a user restricts access to that user only. Leave the field blank to have no
user-based restrictions.

Group Select the group whose members have access to this quick message. Selecting a group restricts access to members of that group only. Leave
the field blank to have no group-based restrictions.

Body Enter the text you want to insert into the Message Text field. By default, the field supports HTML format.

Email Client Canned Messages form for defining


quick messages

Events and Email Notification


Overview
One use for system events in the ServiceNow platform is to control email notification for system activity, such as
when incident records are updated, or change requests are assigned. There are a number of useful events included in
the platform that provides you with a broad view of application activity, but these events might not give you the
detailed view you need or may not suit a customized system. If existing events do not meet your needs, you can
create your own events to watch for specific changes to ServiceNow records. For details on using events to notify
people of system activity, see Email Notifications. For instructions on creating and sending custom emails when
ServiceNow events occur, see the email notification setup tasks.

Business Rules
A business rule is a piece of JavaScript that you can configure to run when a record is inserted, updated, or deleted,
or as part of a table query. All business rules run either before or after the database action has occurred. Event-based
notifications add event records to the event queue using the following script logic.
If [something is true], then [add a specific event to the queue]
For more information, see Creating a Business Rule.
Events and Email Notification 25

Building a Script
The incident events business rule comes with the system and defines a number of events that can be triggered by
different actions in the Incident table.

This business rule defines several events, three of which are triggered after a record in the Incident table is inserted
or updated. The first script is:

if (current.operation() != 'insert' && current.comments.changes()) {


gs.eventQueue("incident.commented", current, gs.getUserID(),
gs.getUserName());
}

The condition in this script requires that a change be made to the Comments field in an existing (not inserted)
incident record. If this condition is true, then ServiceNow adds the incident.commented event to the event queue.
The second condition requires that a record be inserted before the event is added to the queue.

if (current.operation() =='insert') {

The third condition is true whenever the incident record is updated (including updates to the Comments field, as
specified by the first script).

if (current.operation() == 'update')

The then part of each script, the gs.eventQueue function, adds the event to the event queue. This statement uses
the following syntax, set off with braces:

gs.eventQueue("incident.updated", current, gs.getUserID(),


gs.getUserName());

The gs.eventQueue function takes the following parameters:


Events and Email Notification 26

Field Input Value

Name The name of the event triggered, set in quotation marks

Record The record referenced when the condition in the script evaluates to true. Usually this is expressed as current, meaning the current record
the business rule is working on. If the business rule is being triggered as part of a scheduled job, use a GlideRecord argument in its place.

Parm1 Passes a string value. Notification events pass the Sys ID of the user with the gs.getUserID() method. Other scripts can reference
this string value as parm1 using the format ${event.parm1}.

Parm2 Passes a string value. Notification events pass the user name with the gs.getUserName() method. Other scripts can reference this
string values as parm2 using the format ${event.parm2}.

Create a New Event


Administrators can create a custom event to send an email notification if an existing business rule does not provide
the necessary event. For example, you might want to notify people who initiate a service catalog request whenever a
comment is added to that request.
It is a best practice to verify there is not an existing event you can use.
1. Navigate to System Policy > Events > Registry.
2. Filter the list on the table your event will affect. For example, select the Requests [sc_request] table.
3. Review the events for the table and determine if there is an existing event you can use.
If you do not find a suitable existing event, you can create your own.
1. Navigate to System Policy > Events > Registry.
2. Click New and fill in the form.
3. Click the Business Rules related link.
4. Select the event business rule for the table. For example, select the sc request events business rule to create a
custom Request event.
5. In the Script field, add custom event JavaScript (see sample).
6. Click Update.

Sample Event Script


The following sample script adds a request.commented event with the user's Sys ID as parm1 and the user's user
name for parm2.

if (current.operation() != insert && current.comments.changes()) {


gs.eventQueue(request.commented, current, gs.getUserID(),
gs.getUserName());
}

Event States
Events may exist in one of several states:
Events and Email Notification 27

State Description

Ready The system created the event and it is in the queue waiting to be processed.

Processed The event successfully ran. An event does not necessarily trigger any further action when processed. Additional functionality must
make use of the event.

Error The event encountered an error during processing. This state is often caused by invalid event parameters. Reprocessing the event may
resolve the error.

Transferred The event was rotated to a different shard of the Event [sysevent] table. When an event is rotated, a duplicate record is created in an
active shard to be processed. A scheduled job processes the event when it is next in the queue, but it is not possible to predict when
this will happen as because several events may need to be processed before it. Therefore, you can reprocess the event.

Reprocessing Events
To reprocess an event:
1. Navigate to System Logs > Events.
2. Open an event.
3. Under Related Links, click Reprocess Event.
The event returns to the event queue.

Global Events
ServiceNow has a global function called global_events() that triggers from a business rule when these
conditions occur:
Inserting new records
Updating existing records
Adding comments to an existing record
Assigning a record to a user
Exceeding a record's inactive timer
For example, if you add the script global.events(current) to a business rule on the change_request table,
ServiceNow automatically configures the following events:
change_request.inserted
change_request.updated
change_request.commented
change_ request.assigned
change_ request.inactive
The business rule for global events on the change_request table looks like this:
Events and Email Notification 28

Sample Scripts from the change events Business Rule


The following scripts are found in the baseline change events business rule. This business rule defines events that
fire after a change request is inserted or updated.

if (current.operation() == 'insert') {
gs.eventQueue("change.inserted", current, gs.getUserID(),
gs.getUserName());
}

if (current.operation() == 'update') {
gs.eventQueue("change.updated", current, gs.getUserID(),
gs.getUserName());
}

if (!current.assigned_to.nil() && current.assigned_to.changes()) {


gs.eventQueue("change.assigned", current,
current.assigned_to.getDisplayValue() ,
previous.assigned_to.getDisplayValue());
}

if (current.priority.changes() && current.priority == 1) {


gs.eventQueue("change.priority.1", current, current.priority,
previous.priority);
}

if (current.risk.changes() && current.risk== 1) {


gs.eventQueue("change.risk.1", current, current.risk, previous.risk);

if (current.start_date.changes() || current.end_date.changes() ||
current.assigned_to.changes()) {
if (!current.start_date.nil() && !current.end_date.nil() &&
!current.assigned_to.nil()) {
gs.eventQueue("change.calendar.notify", current,
current.assigned_to, previous.assigned_to);
}

// Remove from previous assigned to, due to assigned_to changing


if (!previous.assigned_to.nil()) {
if (!current.assigned_to.nil() && current.assigned_to.changes()
&&
(!previous.start_date.nil() && !previous.end_date.nil())) {

gs.eventQueue("change.calendar.notify.remove", current,
current.assigned_to, previous.assigned_to);
}
Events and Email Notification 29

}
// Remove old calendar from current assigned to, due to date changing
else if (!current.assigned_to.nil()) {
if ((current.start_date.changes() && !previous.start_date.nil())
||
(current.end_date.changes() && !previous.end_date.nil())) {
gs.eventQueue("change.calendar.notify.remove", current,
current.assigned_to, current.assigned_to);
}
}
}
30

Setup

Email Notifications
Overview
Use email notifications to send selected users email about specific activities in the system, such as updates to
incidents or change requests. If you want to change how the system processes incoming email, see Inbound Email
Actions.
Email notifications allow administrators to specify:
When to send the notification
Who receives the notification
What content is in the notification
Additional email notification options are available. Users can subscribe to notifications, and administrators can make
some notifications mandatory. See Notifications for all the tasks required to create and send custom email when
system events occur.
Administrators also have the option of converting existing email notifications to a rich HTML format (starting with
the Eureka release). This format provides several advantages, including :
Raw HTML content is converted into a WYSIWYG format.
The content can be edited in a feature-rich HTML editor.
Mail scripts are condensed into a single, easy-to-read line that can be reused in multiple email notifications.
To prevent broken links, items like images and incidents, that are linked with URLs relative to a particular
instance are converted to absolute links. For example, if an incident is linked using a relative URL, the link is
converted to an absolute link.

Note: The rich HTML format is the default for all new email notifications starting with the Eureka release.

Creating Email Notifications


Creating an email notification involves performing the following steps on the Email Notification form:
1. Identifying the notification.
2. Specifying when to send the notification.
3. Specifying who receives the notification.
4. Specifying what the notification contains.
Email Notifications 31

Identifying the Notification


Each notification has a set of properties that uniquely identify it.

Use these steps to set email notification identifying properties.


1. Configure email properties to enable your instance to send and receive email.
2. Navigate to System Policy > Email > Notifications.
3. Click New.
4. Fill in the fields at the top of the Email Notifications form, as appropriate (see table).
5. Continue creating the notification by specifying when to send the notification.

Field Description

Name Enter a unique name for the email notification. Descriptive names help identify the purpose of the email notification. For example,
Incident Opened & Unassigned.

Table Select the database table to which this notification is linked, such as Incident [incident].

Warning: Do not select the Task [task] table. This table is for extending other tables. Notifications that run on the
Task table directly are not supported.

Note: The list shows only tables and database views that are in the same scope as the email notification (starting with
the Fuji release).

Type Select the type of notification you are creating: EMAIL or Meeting Invitation.

Active Select the check box to enable the email notification.

Description Type a description for this notification


Email Notifications 32

Specifying When to Send the Notification


You can define when to send a notification based on the type of triggering event. The instance can send a notification
in either of these circumstances.
When a record is inserted or updated
When a specific event runs

Note: If multiple notifications are generated by the same trigger, the system only sends on notification. The system considers all other
notifications, even those with a different subject and body, as duplicates. This functionality is controlled by the Ignore Duplicates
business rule.

When creating a notification based on a new or updated record, specify what additional conditions must be met to
trigger the notification. You can specify these notification-specific conditions.
Changes: Checks to a see if a field value changes.
Changes from: Checks to see if a field value changes from a particular value.
Changes to: Checks to see if a field changes to a particular value.
Use these steps to specify when to send a notification.
1. Identify the notification.
2. Fill in the fields for the When to send section of the Email
Incident notification sent on insert or update
Notifications form (see table).

3. Continue creating the notification by specifying who receives the notification.

Field Description

Send when Select under what condition the notification is sent: when a record is inserted or updated or when a particular event is triggered.

Weight [Required] Set a numerical value for this notification's priority relative to other notifications with the same target table and recipients.
The system only sends the notification with the highest weight. All other notifications are moved from the Outbox to the Skipped
mailbox. The default value 0 causes the system to always send the notification (assuming the conditions are met).
For example, suppose a service desk agent adds a comment to an incident and shortly thereafter closes it. By default, these actions
trigger both the Incident commented and Incident Closed notifications. However, since both notifications are from the Incident table
and both notify the incident caller, the system only sends the notification with the highest weight, in this case the Incident Closed
notification.

Notification weights

Note: The SMTP Sender scheduled job determines how often to send email. By default, this job runs every minute.

Conditions Use the condition builder to select the conditions under which this notification is sent. For example, you might select Priority >
greater than > 3 - Moderate to send the notification only for High and Critical priority incidents.

Inserted Select the check box to enable email notification when a record is inserted. This field is visible only when the Send when field has
been set to Record inserted or updated.
Email Notifications 33

Updated Select the check box to enable email notification when a record is updated. This field is visible only when the Send when field has
been set to Record inserted or updated.

Event Select the event that triggers this notification. This field is visible only when the Send when field has been set to Event is fired.
name

Optional: Specifying Advanced Conditions


Use an advanced condition to send a notification based on the current email record, changing field values, or system
properties. The advanced condition script must set the answer variable to true to send the notification.
For example, if you want to prevent the system from sending an email notification if the sender of a self-service
request is a member of the XYZ group, use this code:

var groupMember = gs.getUser();


if(groupMember.isMemberOf('XYZ')){
answer = false;
}
else{
answer = true;
}

You can add a script-based condition in the Advanced condition field by configuring the Email Notification form
and adding the field. You can access the field in the Advanced view without configuring the form starting with the
Eureka release.
The advanced condition script uses the following global variables:
current: contains the current record from the table to which the notification is linked.
event: contains the event that triggered the notification.

Note: The Advanced condition field is evaluated in addition to other conditions you set on the notification. Both the Condition and
Advanced condition must evaluate to true in order to send the notification.
Email Notifications 34

Specifying Who Receives the Notification


You can send notifications to:
A static list of users and groups determined when the notification is created.
A variable list of users and groups determined by entries in a particular task record.
Consider limiting the recipient list of any notification to 1000 users. By
default, if a notification has more than 100 intended recipients, The
Sample recipients of an incident email
system automatically creates multiple notification messages with up to
notification 100 recipients each. If you want to change the recipient limit, set the
system property glide.email.smtp.max_recipients.

Use these steps to specify who receives the notification.


1. Identify the notification.
2. Specify when to send the notification.
3. Fill in the fields for the Who will receive section of the Email Notifications form (see table).
Additional fields are available in Advanced view; however, these are needed only under rare circumstances.
4. Continue creating the notification by specifying the notification contents.
Email Notifications 35

Field Description

Users/groups in Select users or groups from reference fields and Glide lists of the notification record's table. For example, if a notification uses the
fields Incident [incident] table, then you can select users or groups from incident fields like Opened by and Assignment group. This
list of users or groups is variable and depends upon the values of the associated task record.
Note: You can dot-walk to values in reference fields by clicking the plus sign in the field selector and then selecting the related
field.

Users Select the users you want to receive the email notification. You can search for users with the reference lookup icon or manually
add their email addresses. This list of users is static.

Groups Select the groups you want to receive the email notification. You can search for groups with the reference lookup icon or by
manually entering the group name. This list of groups is static.

Specifying the Notification Contents


The administrator controls the formatting of the notification content with the built-in WYSIWYG HTML editor
(starting with the Eureka release). If you are modifying a notification that was created prior to the Eureka release,
you can edit the notification in its current form or convert the content to rich HTML formatting, which can be
maintained with the HTML editor. If you are using an older version, see the previous version information.

Note: As a best practice, use the same format type for all notifications. This ensures that all notifications have a consistent look and
feel.

Although there are no required content elements, you can use one or more of the following options to specify the
email notification contents:
Attach documents from source records
Customize the watermark
Format the email body using an email template
Add and edit HTML markup
Add images
Specify alternative outbound email addresses

Note: Additional fields are available in Advanced view; however, these are needed only under rare circumstances.
Email Notifications 36

Fill in these fields to specify the content of an email notification (starting with the Eureka release).

Field Description

Email If you want to re-use existing content, select an email template to add content to the email notification.
template

Subject Enter the subject line for the email message. The subject can include variables from the Select variables column.

Message Enter the content of the email notification message. The message can include variables from the Select variables column. Variables
HTML map to column names available from the notification table, its parent tables, and reference tables. Use variables to include values from
a record in the table such as an incident's short description or comments and work notes. The Message HTML field is visible only if
you set the content type to HTML and plain text or HTML only.
Note: If you want to include a link to the record that triggered the notification, see Enabling Links to ServiceNow Records.

SMS Enter the notification message to send to an SMS device. The SMS alternate message is limited to 140 characters.
alternate

Click the plus for versions prior to Eureka

Enter values for the following fields on the legacy Email Notification form.
Email Notifications 37

Field Description

Email If you want to re-use existing content, select an email template to add content to the email notification.
template

Subject Enter the subject line for the email message. The subject can include variables from the Select variables column.

Message Enter the content of the email message. The message can include variables from the Select variables column as well as HTML code
if you set the content type to HTML and plain text. Variables map to column names available from the notification table, its parent
tables, and reference tables. Use variables to include values from a record in the table such as an incident's short description or
comments and work notes. Notes:
You cannot use HTML code to control the appearance of the contents of the ${comments} variable.
If you want to include a link to the record that triggered the notification, see Enabling Links to ServiceNow Records (Deep
Linking).

SMS Enter the notification message to send to an SMS device. The SMS alternate message is limited is 140 characters.
alternate

Forcing a Notification to be Sent


Forcing a notification means that the relevant users receive the notification, even if they have not subscribed to the
notification or have turned off the subscription. In addition, the users receive the notification even if the Notification
field is set to Disable. Unlike making a notification mandatory, forcing the delivery does not lock the user's
preference or prevent the user from unsubscribing from the notification.
1. Navigate to System Policy > Email > Notifications.
2. Open the appropriate notification.
3. Configure the form and add the Force delivery field.
4. Select the Force delivery check box.
5. Click Update.

Converting Email Notifications to Rich HTML


By default, new email notifications are created in the rich HTML format starting with the Eureka release.
Administrators can convert notification content that was created in a pre-Eureka version to rich HTML so it can be
edited in the WYSIWYG editor. This is an optional step. Skip this process if you prefer to maintain email
notifications in their current format.
1. Navigate to System Policy > Email > Notifications.
2. On the Email Notifications list screen, click the name of the email notification you want to convert.
3. Click the What it will contain tab.
Email Notifications 38

4. Click Switch to Rich HTML Editor.


Any raw HTML in the Message field is rendered as WYSIWYG text. Additionally, any mail scripts in the
body are automatically saved to the Email Script [sys_script_email] table and are replaced in the notification
body with an embedded script tag. This makes the notification body easier to read.

Note: The letter "P" at the bottom of the screen shows the location of your cursor within the Message field. In this case, the cursor is
in a line containing an HTML <p> tag.

Note: For email notifications that were created in the Eureka release or that were already converted, the Switch to Rich HTML
Editor button is not displayed.
Email Notifications 39

Working with Mail Scripts


When you convert an email notification that was created in a version prior to Eureka to rich HTML, mail scripts are
automatically moved to the Email Script [sys_script_email] table and an embedded script tag with the name of the
script is automatically inserted into the body of the notification.
When creating new email notifications in the Eureka release, it is a best practice to write mail scripts using System
Policy > Email > Notification Email Scripts. When the scripts are completed, add a ${mail_script:script
name} embedded script tag to the email notification body. This makes it easy to use the same scripts in multiple
email notifications. All you need to copy and paste from one notification to the next is the embedded script tag.
If you manually enter a mail scriptany text bounded by <mail_script> and </mail_script>in the body of a new or
converted email notification or template, and then attempt to save the record, a message asks whether the mail script
should be converted.

In many cases, an unconverted mail script fails to run from inside the HTML editor. If you select Yes, the script is
added to the Email Script [sys_script_email] table and is automatically replaced in the body with an embedded script
tag.
You can view the mail scripts in their original form by opening the email notification and clicking the Show
Notification Scripts related link.

Handling Line Breaks


Rich HTML provides additional control over line breaks in your email notifications and templates. To accommodate
this, a Newlines to HTML check box is available in the Email Script form to ensure that <mail_script> scripts
work the same after an upgrade to Eureka.
Email Notifications 40

Selecting the Newlines to HTML check box indicates that the method for handling line breaks in earlier versions
carries forward for email notifications and templates used in Eureka. When an email notification or template is
converted to rich HTML, the Newlines to HTML check box is automatically selected.
For new mail scripts written in Eureka, it is a best practice to add correct HTML line breaks to
template.print() statements.
If an email notification or template to rich HTML is not converted to rich HTML, newlines are automatically
wrapped with <div> tags, the same as versions prior to Eureka. The old mail scripts still work; however, the
administrator does not enjoy the benefits of working in the rich HTML format, and does not have as much control
over exact HTML formatting.

Best Practice
When writing new scripts, it is best to insert explicit HTML line breaks and clear the Newlines to HTML check box
so that no HTML tags are injected when email notifications are generated. The same approach is recommended for
existing notifications and templates. That is, a best practice would be to replace template.print("\n")
JavaScript function calls with template.print("<br />"). This gives you better control over the HTML
formatting of your email notifications.

Handling Line Breaks in Versions Prior to Eureka


When emails are generated in versions prior to Eureka, the template.print() JavaScript function
automatically injects HTML <div> tags whenever newline (\n) characters are present in scripts.
For example:
<mail_script>
template.print("line 1\n"); // Note that \n is Javascript's notation
for a newline character
template.print("line 2\n");
</mail_script>
When an event triggers an email notification, every line in the script that ends with a newline character is wrapped
with <div> tags, which is the way HTML introduces a line break.
For example:
<div>line 1</div>
<div>line 2</div>
Email Notifications 41

Editing the HTML of an Email Notification


For added control over the content of a converted email notification, can edit the underlying HTML.
1. With the converted email notification displayed in the Message text field, click the HTML button in the rich
HTML editor.

2. Make the needed changes to the HTML.


3. Click Update.

Click the plus to expand previous version information

Adding HTML Markup When the email format is multipart/mixed, you can add HTML markup to the body of the message. For example, this
HTML markup:

This message will have <b>these words</b> in Bold!

results in the following message text:


This message will have these words in Bold!
Email Notifications 42

Adding Images to Email Notifications


Images can be inserted into email notifications that were created in the Eureka release or that were converted to rich
format using the HTML editor. The images must be in the Images [db_image] table, or they can be inserted as
attachments.

Attaching Documents to a Notification


You can include all attachments from the source record with the notification. For example, if an incident update
generates a notification, you can include all attachments from the incident record with the notification. To include all
attachments from the source record, select the check box for the Include attachments field. Note that email
messages, including attachments, cannot exceed the maximum email size or email attachment limits. This size
includes MIME encoding, which increases total attachment size by approximately 37%.

Attaching Documents with Scripting


Using scripting, you can attach documents by linking to them, or you can attach various types of reports by
specifying their IDs in the system.

Linking to an Attachment
You can add attachments to a notification by linking to the attachment record in the message of the notification.
Linking to attachment records in this fashion requires using email notification scripting. For example:
template.print('Attachment: <a href="/sys_attachment.do?sys_id=' + gr.sys_id + '">' + gr.file_name + '</a>\n');

Attaching Reports Using the Sys ID


You can also attach various types of reports, including gauges, dashboards, and charts, to a notification. The scripts
to attach these reports take the following syntax:

${report:X:Y}

where:
X is the type of report you want to attach (reportID, gaugeID, dashboardID, or chartID).
Y is the sys ID of the report, gauge, dashboard, or chart to be attached.
For example:
${report:reportID:<abc123>}
${report:gaugeID:<abc123>}
${report:dashboardID:<abc123>}
${report:chartID:<abc123>}
Email Notifications 43

Enabling Links to ServiceNow Records


Adding the special ${URI} parameter to an outbound email body or template creates a link to a specific
ServiceNow record. When a user clicks on the word LINK, the instance prompts the user to log in if not already
logged in, and then redirects the user to the record specified in the URI.
The ${URI} parameter has an extension called the ${URI+}
format to specify additional arguments in the email link, such as
sysparm terms, in addition to the automatically created URI. For
example:
Link displayed by ${URI} parameter

${URI+&sysparm_scriptlet=current.assigned_to=gs.getUserID()
&sysparm_scriptlet_condition=current.assigned_to.nil()
&sysparm_view=incident_active}

This example executes the JavaScript:

current.assigned_to=gs.getUserID()

when the condition of

current.assigned_to.nil()

is satisfied. Additionally, the script sets the view to incident_active.

Changing the Link Text


To show the display value of the record as the link text instead of the word LINK, use the ${URI_REF} parameter
instead of the ${URI} parameter.
For example, if the URL displays an incident record, the link text is the
incident number, which is the display value for incidents. If the URL
displays a user record, then the link text is the user name.

Link displayed by ${URI_REF} parameter

Linking to Related Records


A notification can link to a related record by specifying a reference field in front of the ${URI} or ${URI_REF}
parameters. Format the related record link as follows:
${<reference field that contains the related record you want to
display>.URI}
${<reference field that contains the related record you want to
display>.URI_REF}
For example:
Email Notifications 44

Related Record to Provide Link to Notification record table Reference Field Samples

Related task record to be approved from an approval Approval Approval for ${sysapproval.URI}
notification [sysapproval_approver] [sysapproval] ${sysapproval.URI_REF}

Related problem record in an incident notification Incident Problem [problem_id] ${problem_id.URI}


${problem_id.URI_REF}

For example, the following notification template produces the email links in the picture below:

Click here to view Incident: ${URI_REF}


Click here to view Related Problem: ${problem_id.URI_REF}

Linking to Content Pages


Example related record links
You can create links to content management pages using the following
format:

${CMS_URI+<site>/<page>}
For example, to link the email recipient to a page called Incident in the content site ESS, with the current incident as
the target document, use the following format:
${CMS_URI+ess/incident_detail}
The resulting email URL has this format:
https://<instance
name>.service-now.com/ess/incident_detail.do?sysparm_document_key=incident,46e18c0fa9

Working with Watermarks


By default, the system generates a watermark label at the bottom of each notification email to allow matching
incoming email to existing records. The watermark always includes "Ref:" and a customizable prefix (default MSG),
followed by the autonumbered identifier of the source record (such as incident, problem, or change request). For
example, Ref:MSG3846157.
Watermarks are always generated, but you can configure them to:
Have custom prefix characters.
Be hidden globally
Be omitted from individual email messages
Inbound email actions might not work properly if watermarks are omitted from email notifications. Without a
watermark, inbound email messages cannot be associated with the accumulated comments related to the original
incident, and each subsequent notification that is sent is treated as a new incident.

Note:
Create a custom watermark prefix for each instance to prevent accidentally triggering events in the wrong instance.
Do not use colons (:) in custom watermark prefixes. Colons are a reserved character and may cause the watermark to be ignored.
Email clients that use the plain text version of the email still show the watermark.
Email Notifications 45

Hiding Watermarks Globally


Rather than omitting watermarks, it is possible to hide watermarks on a global basis using HTML markup.
1. Navigate to sys_properties.list in the Application Navigator.
2. Create a new property named glide.email.watermark.visible and set it to false.
This ensures that all watermarks are hidden on all email messages. This cannot be done on a per-email basis.

Omitting Watermarks on Individual Email Notifications


When incoming email does not contain a watermark, either because it has been omitted or hidden, the system
searches the subject line and message body for an incident number. The system attempts to match any incident
number it finds to an existing incident. If there is a matching incident number, the incident is updated with the values
in the incoming email.
To omit watermarks on a per-email basis:
1. Navigate to System Policy > Email > Notifications.
2. Select the email notification to update.
3. Click the Advanced View related link.
4. In the What it will contain section, select the Omit watermark check box.
5. [Optional] If you want response email messages to generate new incidents, remove the record number
${number} variable from the Subject and Message HTML fields.

Creating Custom Watermark Prefixes


By default, email notifications use the watermark prefix MSG. Any email notifications that are forwarded from one
instance to another might be indistinguishable because they use the same watermark. To avoid unintentionally
triggering events in the wrong instance, ServiceNow recommends creating a unique watermark prefix for each
instance.
To create a unique watermark prefix for an instance:
1. Navigate to System Definition > Number Maintenance.
2. Open the sys_watermark record.
3. Make the Prefix unique for this instance.

4. Click Update.
Email Notifications 46

Specifying Alternative Outbound Email Addresses


By default, the system sends all outbound email notifications from the default email address of the instance. For
organizations that need to send email messages from specific email addresses, such as from multiple service desks,
or they want to send notifications in different languages, the platform supports the configuration of multiple
outbound addresses.
To create a notification for a different outbound email address:
1. Navigate to System Policy > Email > Notifications.
2. Select an existing notification record for the desired event, such as Incident Closed.
3. Create a copy of this notification for each outbound email address.
4. Open one of the notification copies, and click the Advanced view related link.
5. In the What it will contain section, add an email address to the From field that is different from the default
instance address.
6. Add a different email address than the From address to the Reply to field if you want replies to this notification
to go to a different address.
The system checks the From field for an address. If this field is empty, then the system uses the default
address for the instance. If the Reply to field is empty, then all replies are sent to the address from which the
notification was sent. If the Reply to field contains an email address, then the system sends all replies to the
notification to this address.
7. Create mutually-exclusive conditions for notifications of the same type, so only the desired notification is sent
when the event is fired.
For example, if the Company is a certain value, then the notification comes from a unique email address
entered in the From field.
8. Click Update.

Specifying An Outbound Email Address for a Particular Language


You can specify a different email address for each language your instance supports.
1. Create or copy a notification record for the desired event.
2. In the What will it contain section, enter a new email address in the From field.
3. Create the Subject and Message content in the desired language.
4. In the When to send section, create a condition as follows:
a. In the list of Condition fields, select Show Related Fields from the bottom of the choice list.
b. From the choice list of Related Fields, select the field that identifies the recipient.
For example, select .Caller-->User fields to send the notification to the user who called in an incident,
or .Assigned to-->User fields to send the notification to the user to whom an incident is assigned.
c. From the choice list of user fields, select Language.
d. Select the is operator.
e. Complete the condition by selecting the language of the desired user.
5. Click Update.
All notifications for that event originate from the specified email address and go out in the language of the
recipient.
Email Notifications 47

Specifying the Time Zone


The date and time stamp of a notification uses the system time zone and not the time zone of any recipient. The
property glide.email.append.timezone in System Properties > Email controls whether to append the
time zone. If true, the system time zone of the instance is appended to any dates or date/times in outbound email
messages (for example, 2010-07-02 04:01:14 PST).

Troubleshooting Email Notifications


For a list of common email notification errors and their solutions, see this ServiceNow Knowledge Base article:
KB0535129 [1].

Configuring the Platform for Incoming Email


To configure the platform to create records and perform other tasks from incoming email, see Inbound email actions.

Advanced View Fields


Field Description

Email Notifications - Who will receive

Send to event Select this check box to send the notification to the person who performed the action that started the notification process if the
creator person is also specified in the Users/groups in fields, Users, or Groups field. If the event creator is not specified in one of
these fields, the event creator does not receive a notification regardless of the setting in this field.
[2]
For troubleshooting information, see Troubleshooting email notifications - Send to the Event Creator on the ServiceNow
Community.

Event parm 1 Select this check box if the event parameter 1 contains one or more email recipients (in a comma separated list). This field is
contains recipient visible only when the Send when field is set to Event is fired.

Event parm 2 Select this check box if the event parameter 2 contains one or more email recipients (in a comma separated list). This field is
contains recipient visible only when the Send when field is set to Event is fired.

Subscribable Select this check box to allow users to subscribe to this notification.

Warning: Do not select this check box for any other type of notification. See Subscribable Notifications
for details.

Email Notifications - What it will contain

Importance Set the importance of the email message to low or high.

Content type Select the content type for the email notification:
HTML and plain text
HTML only
Plain text only
By default, HTML only is enabled.

Include Select this check box to send all attachments from the triggering record as email attachments.
attachments

Omit watermark Use this check box to apply or remove the watermark attached to each email. ServiceNow does not recommend removing the
watermark as a reply to an email without a watermark creates a new incident rather than updating the incident the original email
referred to. For more information, and an alternative way to hide watermarks, see Watermarks.
Email Notifications 48

Message Text Enter the notification message to send in plain text. This field is visible only if you set the content type to HTML and plain
text or Plain text only.

From Enter the email address you want the email notification to use in the From field. For example, [email protected].

Reply to Enter the email address you want people to use when replying to the email notification. For example,
[email protected].

Activating Engine Based Notifications


The Engine Based Notifications plugin replaces certain event-triggered default email notifications with equivalent
notifications that are triggered when records are inserted or updated. The Engine Based Notifications plugin is active
by default for new instances. For upgraded instances, a user with the admin role might need to activate the plugin.

[3]
Warning: Before you activate the Engine Based Notifications plugin, see KB0540612 to prevent the loss of customizations.

Click the plus to expand instructions for activating a plugin.

If you have the admin role, use the following steps to activate the plugin.
1. Navigate to System Definition > Plugins.
2. Right-click the plugin name on the list and select Activate/Upgrade.
If the plugin depends on other plugins, these plugins are listed along with their activation status.
3. [Optional] If available, select the Load demo data check box.
Some plugins include demo datasample records that are designed to illustrate plugin features for common use cases. Loading demo data is
a good policy when you first activate the plugin on a development or test instance. You can load demo data after the plugin is activated by
repeating this process and selecting the check box.
4. Click Activate.

Using the Email Log


See the email logs for a description of what you can see in the system log.

References
[1] https:/ / hi. service-now. com/ kb_view. do?sysparm_article=KB0535129
[2] https:/ / community. servicenow. com/ community/ service-management/ incident/ blog/ 2015/ 02/ 04/ beware-beware-the-event-creator
[3] https:/ / hi. service-now. com/ kb_view. do?sysparm_article& #61;KB0540612
Email Templates 49

Email Templates
Overview
Email templates enable administrators to create reusable content for the subject line and message body of email
notifications. Templates deliver consistent information on specific system activities and improve the efficiency of
creating multiple email notifications for similar actions. If necessary, you can make minor changes on the fly to an
email that uses a template by overriding the subject line and message body content in the notification form. A
common practice is to define the message body in a template and create new subject lines for different types of
recipients. There is no limit to the number of templates that you can create.
Email templates are created in rich HTML format, and administrators have the option of converting existing email
templates to rich HTML (starting with the Eureka release). This format provides several advantages, including:
Raw HTML content is converted into a WYSIWYG format.
The content can be edited in a feature-rich HTML editor.
Mail scripts are condensed into a single, easy-to-read line that can be reused in multiple email notifications.
To prevent broken links, images linked using URLs relative to a particular instance are converted to absolute
links.

Creating a Template
This section provides instructions for creating a template with rich HTML formatting, which is available starting
with the Eureka release. If you are using an earlier version, see the previous version information.
1. Navigate to System Policy > Email > Templates.
2. Click New.
3. Fill in the fields, as appropriate (see table).
Email Templates 50

Field Description

Name Enter a unique name for the template. For example, change.update.risk.

Table Select the name of the table involved. For example, Change Request [change_request].

Subject Enter a subject line that explains the purpose of the email. Select the appropriate variables for the subject line from the fields available on
the selected table. Place the cursor where you want the variable to appear, and click the field name in the Select variables column. For
example:

${sys_class_name} ${number} with ${risk} risk has been assigned to you.


Message Enter the content of the email template message. You can use the HTML editor toolbar to format the HTML, and you can include
HTML variables from the Select variables column. Variables map to column names available from the notification table, its parent tables, and
reference tables. Use variables to include values from a record in the table such as an incident's short description or comments and work
notes.
Notes:
When a template is applied to a notification, the contents of this field are used if you selected HTML and plain text or HTML in the
Content Type field in the Email Notification form.
You cannot use HTML code to control the appearance of the contents in the ${comments} variable.
If you want to include a link to the record that triggered the notification, see Enabling Links to ServiceNow Records.

Message Enter the notification message to send in plain text.


Text Note: When a template is applied to a notification, the contents of this field are used if you selected HTML and plain text or Text in the
Content Type field in the Email Notification form.

SMS Create a different message to be delivered to the recipient's SMS device. You might want a brief message, showing the most important
alternate information only. If this message field is blank, the contents of the Message Text field are used for the SMS message.
Note: The message in this field is used when the message is sent to a device configured as SMS.

Applying a Template to an Email Notification


If you are using an earlier version, see the previous version information.
1. Navigate to System Policy > Email > Notifications.
2. Open the email notification record that should use the template.
3. Navigate to the What it will contain section.
4. From the Email template field, select the appropriate template.
5. Click Update.

Overriding a Template Value


You can customize an email notification to override a specific value without changing the basic information
contained in the template, starting with the Dublin release. If you are using a version prior to Dublin, see the
previous version information.
1. Navigate to System Policy > Email > Templates.
2. Open an email template.
3. Enter a new value for the field you want to override.
For example, you might change the subject line to read The risk level of ${sys_class_name} ${number} has
been raised to ${risk}. This would not change the basic information about the change request contained in the
template, but would make the email notification appropriate for the change manager who needs to know when
risk levels are escalated above a certain threshold.
4. Click Update.
Email Templates 51

Creating Templates in Versions Prior to Eureka


Click the plus for instructions on creating, applying, and overriding templates with versions prior to the Eureka
release

To create a new template:


1. Navigate to System Policy > Email > Templates.
2. Click New.
3. Complete the form as follows:
Name: Enter a unique name for the template. For example, change.update.risk.
Table: Select the name of the table involved. For example, Change Request [change_request].
Subject: Enter a subject line that explains the purpose of the email. Select the appropriate variables for your
subject line from the fields available from your selected table. Place the cursor where you want the variable to
appear, and click the field name from the Select variables column. For example, enter:

${sys_class_name} ${number} with ${risk} risk has been assigned to you.

Message: Construct a message that includes all the information you think the recipients need to know. Select
the appropriate variables for your message from the fields available from your selected table. Place the cursor
where you want the variable to appear, and click the field name from the Select variables column. The special
character, <hr/>, creates a manual break in the message that sets off the Comments section. For example, we
can create a message using the following variables:
Short Description: ${short_description}
Click here to view request: ${URI}
Priority ${priority}
<hr/>
Work Notes:
${work_notes}
Note: You can construct the message using HTML, or add individual HTML tags to change the font or color
of the text, including the contents of the variables. The only exception to this is the appearance of the contents
of the ${comments} variable, which cannot be controlled by HTML.
SMS alternate: Create a different message to be delivered to your SMS device. You might want a brief
message, showing the most important information only. If this message field is blank, the contents of the
Message field are used for the SMS message.
The template should look like this:

4. To apply the template, select it in the Email template field of an email notification record.
Email Templates 52

5. To override a template value, enter a new value for the field you want to override. For example, you might
change the subject line to read The risk level of ${sys_class_name} ${number} has been raised to ${risk}. This
would not change the basic information about the change request contained in the template, but would make the
email notification appropriate for the change manager who needs to know when risk levels are escalated above a
certain threshold.

Note: Use HTML tags to format the email body for readability. For example, you can use <br/> to insert a line break, or you can
wrap paragraphs in <p> ... </p> tags to format paragraph text.

Working with Existing Email Templates


New email templates are created in the rich HTML format (starting with the Eureka release). You can convert
template content that was created in a pre-Eureka version to rich HTML so it can be edited in the WYSIWYG editor.
To convert an email template to rich HTML:
1. Navigate to System Policy > Email > Templates.
2. Open the email template you want to convert.

3. Click Switch to Rich HTML Editor.


When content is converted, these changes are made to the content:
HTML Editor: Any raw HTML in the Message field is rendered as WYSIWYG text in the Message
HTML field. The content can be edited in a feature-rich HTML editor.
Simplified Mail Scripts: Any mail scripts in the body are automatically saved to the Email Script
[sys_script_email] table and are replaced in the notification body with an embedded script tag. This makes
the template body easier to read and makes it easier to reuse scripts in multiple email templates.
Email Templates 53

4. Modify the message text, as needed, using the WYSIWYG editor or by editing the underlying HTML.

Note: The letter "P" at the bottom of the screen shows the location of your cursor within the Message field. In this case, the cursor is
in a line containing an HTML <p> tag.

Note: Email templates that are already formatted with rich HTML do not show the Switch to Rich HTML Editor button.

Best Practice for Creating Templates


Whether you are working with templates converted from earlier versions of ServiceNow or creating new templates
in the rich HTML format, it is a best practice to write mail scripts in System Policy > Email > Notification Email
Scripts. When the scripts are completed, a ${mail_script:script name} embedded script tag should be
added to the email template body. This makes it easy to use the same scripts in multiple email templates. All that
needs to be copied and pasted from one template to the next is the embedded script tag.
If you manually enter a mail script in the body of a new or converted email notification or template, and then attempt
to save the record, a message asks whether the mail script should be converted. Unconverted mail scripts often fail to
run from inside the HTML editor. If you select Yes, the script is added to the Email Script [sys_script_email] table
and is automatically replaced in the body with an embedded script tag.
You can view the mail scripts in their original form by opening the email template and clicking the Show
Notification Scripts related link.

Calendar Integration
With email notifications, you can use import export maps to leverage information about records and integrate with
Outlook or another calendar. For example, an email notification can create a calendar event based on the planned
start and end dates of a change request. To integrate with a calendar, add one or more of the following iCalendar [1]
variables to an email template message and reference the email template from the notification. The variables must be
added to the Message Text field starting with the Eureka release.
Email Templates 54

Variable Name Description

${dtstart} Start Date

${dtend} End Date

${alarm_time} Alert or reminder time

${description} Description

${location} Location

Note: In order for the calendar integration to work, iCalendar variables must be added to an email template. The integration does
not work if the variables are added directly to the email notification.

By default, the ServiceNow system computes the value of iCalendar variables using import export maps for the
following tables:
Appointment [itil_appointment]
Change Request [change_request]
Incident [incident]
Reminder [reminder]
Each import export map can specify a different set of iCalendar fields.
For example, the icalendar.change_request import export map only
maps two iCalendar fields.
Import export maps

ServiceNow uses the External Name as the variable name in the email
template. For example, the icalendar.change_request import export
map defines the dtstart and dtend variables.
Sample mappings for the dtstart and dtend
variables

External Name Associated Variable Name Table Field Mapped Field Label

dtstart ${dtstart} change_request start_date Planned start date

dtend ${dtend} change_request end_date Planned end date

Mapping Date Fields to iCalendar Variables


You can specify what fields provide the date information in calendar invitation notifications by changing the field
mappings of the dtstart and dtend variables in the import export map for the iCalendar invitation.
1. In the navigation filter, enter sys_impex_map.list.
2. Open the icalendar.change_request map or the map you want to edit.
3. In the Field Maps related list, click either the end_date or start_date mapped field to change the mapping for
dtstart or dtend, as needed.
4. Change the Database Field to the ServiceNow field you want to use to set the start date or end date.
5. Click Update.
Email Templates 55

Creating iCalendar Invitations for Custom Tables


If you want to generate iCalendar invitations that use field values from custom tables, you must create an import
export map that computes the values of the iCalendar fields.
1. Create the custom table and fields.
Use the Date/Time (glide_date_time) field type for fields that will map to the ${dtstart} and
${dtend} variables.
2. Create an import export map that maps the fields from the custom table to iCalendar fields.
3. Create an email template that defines what to include in the iCalendar invitation.
4. Create an email notification that references the template.

Create the Import Export Map


1. In the navigation filter, enter sys_impex_map.list.
2. Click New.
3. Set the following fields:
Name: Use the following naming convention: icalendar.<table name>. For example,
icalendar.u_my_custom_table.
Table: Select the custom table you created.
Type: Select icalendar.
4. Right-click the form header and click Save.
5. In the Field Maps related list, click New.
6. In the Mapping Entry Wizard, select Mapping to a Database Field.
7. Create field mappings for dtstart and dtend. These variables are required.
For example, map the External Name dtstart to the u_meeting_start_time field in
u_my_custom_table.
8. Click Submit.
9. Create field mappings for any other iCalendar fields as necessary.
10. Click Update.
Sample field mapping dtstart Here are sample field mappings between iCalendar variables and
custom fields in a custom table, u_my_custom_table:

External Name Database Field Type Map

dtstart u_meeting_start_time field icalendar.u_my_custom_table

dtend u_meeting_end_time field icalendar.u_my_custom_table

description u_meeting_description field icalendar.u_my_custom_table


Email Templates 56

Create the Email Template


After you create the import export map, create an email template that defines what to include in the iCalendar
invitation. On the Email Template form, set the Table field to the custom table you created. In the Message text
(starting with the Eureka release) or Message field, use the following format to define the iCalendar invitation.

Note: Mail script is not allowed or processed in meeting invitation email templates.

BEGIN:VCALENDAR
PRODID:-//Service-now.com//Outlook 11.0 MIMEDIR//EN
VERSION:2.0
METHOD:REQUEST
BEGIN:VEVENT
ATTENDEE;ROLE=REQ-PARTICIPANT;RSVP=TRUE:MAILTO:${to}
DTSTART:${dtstart}
DTEND:${dtend}
UID:${sys_id}
DTSTAMP:${dtstamp}
DESCRIPTION:${description}
SUMMARY:${u_meeting_summary}
END:VEVENT
END:VCALENDAR

Click the plus to view details about each line of the iCalendar invitation template.
Email Templates 57

iCalendar Template Line Notes


Required?

BEGIN:VCALENDAR Yes

PRODID:-//Service-now.com//Outlook 11.0 MIMEDIR//EN Yes

VERSION:2.0 Yes

METHOD:REQUEST Yes

BEGIN:VEVENT Yes

ATTENDEE;ROLE=REQ-PARTICIPANT;RSVP=TRUE:MAILTO:${to} Yes

DTSTART:${dtstart} Yes You must use the import export map to map dtstart
to a start time field on the custom table.

DTEND:${dtend} Yes You must use the import export map to map dtend to
an end time field on the custom table.

UID:${sys_id} Yes You must provide the name of a field that uniquely
identifies the record, such as the sys_id or the record
number field.

DTSTAMP:${dtstamp} Yes

DESCRIPTION:${description} No To include a multiple line description, you must use the


import export map to map description to a text
field on the custom table. The field mapping ensures
that the system encodes line breaks correctly for the
iCalendar file format.

SUMMARY:${u_meeting_summary} No To include a summary from a text field on the custom


table, provide the name of the field, such as
u_meeting_summary. The summary field value
must not contain line breaks. You do not need to create
a field mapping.

END:VEVENT Yes

END:VCALENDAR Yes

Create the Email Notification


After you create the email template, create an email notification to trigger the iCalendar invitation. On the Email
Notification form, under Related Links, click Advanced view. Ensure the following fields are set accordingly:
Table: Select the custom table.
Type: Select Meeting Invitation.
Content type: Select Plain text only.
Email template: Select the template you created.
Email Templates 58

Troubleshooting
For more information about troubleshooting email templates, see the following posts in the ServiceNow community:
Div tags messing with your email client templates? [2]
Extra line spacing with paragraph tags in email client [3]

References
[1] http:/ / en. wikipedia. org/ wiki/ ICalendar
[2] https:/ / community. servicenow. com/ community/ blogs/ blog/ 2014/ 12/ 05/ email-client-template-script-not-working
[3] https:/ / community. servicenow. com/ community/ blogs/ blog/ 2014/ 12/ 12/ extra-line-spacing-with-p-tags-in-email-client

Notification Examples

Overview
The following examples illustrate the process of composing email and SMS messages for ServiceNow notifications.
The two processes are identical, with the exception of the length and content of the message. SMS messages do not
permit user response to links and are limited to 140 characters. Use the SMS alternate field in the Email Template
and Email Notification forms to create a brief text message for SMS devices.
The examples on this page are:
Example 1: Simple Reminder
Example 2: Approval Request Notification
Example 3: Priority 1 Incident Update Notification

Example 1: Simple Reminder


In this example, we set up a very simple reminder that sends a user an email at a specified time, based on
information in an incident.
We will create the following:
A custom date/time field on the Incident form
A business rule to define an event based on our new field
An email notification to react to that event
Notification Examples 59

Creating a Date/Time Field


Create a custom Date/Time field on the Incident form labeled Reminder, with a field name of u_reminder. For
instructions on adding custom fields to a form, see Adding Fields.

Define a Scheduled Event


Now define an event that is triggered when the Reminder field gets a value. We create an event called
incident.reminder that is triggered at a specific time. We use the gs.eventQueueScheduled() function, which is
similar to the standard event creation function, but can pass a parameter to specify when the event is triggered. In
this case, the event is triggered at the date and time specified in the new Reminder field.

Note: Be sure to register your new event. If you do not, the system will not know to look for it.

gs.eventQueueScheduled("incident.reminder", current, gs.getUserID(),


gs.getUserName(), current.u_reminder);
Notification Examples 60

Create a notification
Now create an email notification record that reacts to the new incident.reminder event. This brief notification
message is suitable for SMS as well.

Note: This is a very simple reminder. There is no condition in place to delete or reschedule the reminder event if the incident is
deleted or if the date and time in the Reminder field is changed. The business rule, as presented, will schedule a new event every time
the Reminder field is updated. Nothing is configured to display a reminder that is currently scheduled for an incident. However, this
reminder is very simple and can be set up in just a few minutes.

Example 2: Assignment Notification


In this exercise, we will enhance the To Do application to send an email notification when someone is assigned a
task. The email notification is triggered by an event, which is triggered by a business rule. For information on
creating notifications, see Notifications.

Register the Event


Events can be triggered by business rules and, in turn, reacted to elsewhere. This event will be triggered by the
business rule we create in the next procedure and will, in turn, trigger the email notification.
1. Navigate to System Policy > Event Registry.
2. Click the New to create a new event registry record.
3. Select the To_Do table.
4. Type A To Do has been assigned in the Description field.
Fired by is basically a comment to remind you where the events come from. We select Business Rule.
Notification Examples 61

5. Click Submit.

Create a Business Rule to Trigger the Event


This business rule creates a to_do.assigned event whenever the Assigned to party is inserted or updated.
1. Navigate to 'System Definition > Business Rules.
2. Click New to create a new business rule
3. Fill in the fields as follows:
Name: To Do Assigned
Table: to_do
Run at: server
When: after
Insert: true
Update: true
4. Enter a condition to trigger the business rule whenever the Assigned to field is changed or initially populated:

<font face="Courier">
current.u_assigned_to.changes()
</font face="Courier">

5. Enter a script to add a to_do.assigned event.


6. In addition to the event name and the current record, specify two additional parameters (users ID and Name).

<font face="Courier">
gs.eventQueue("to_do.assigned", current, gs.getUserID(),
gs.getUserName());
</font face="Courier">
Notification Examples 62

7. Click Submit.
8. Test that the business rule is creating the event as follows:
a. Change the value in the Assigned to field of an existing To Do record or create a new record and specify an
Assigned to.
b. Navigate to System Policy > Event Log and look for an event with the name to_do.assigned.
c. To make this easier, you can sort the event log in descending order by created.

Create an Email Notification


Next, we will create a notification triggered by the event we just created.
1. Navigate to System Policy > Email Notifications.
2. Click New to create an email notification.
3. Fill in the following fields:
Name: To Do Assigned
Event name: to_do.assigned
Table name: to_do
The User field specifies to whom the email should be sent. In this case, we will send it to the Assigned to
user.
4. In User field, enter u_assigned_to.
Sometimes, you do not want notifications to be sent to the person who triggered the notification. In this case,
clear the Send to event creator check box. For our purposes, we will check this box and see all the
notifications whether we triggered them ourselves or not.
5. Enter the Subject of the email as To Do Assigned.
6. Under Select variables, click Due Date.
You will see text added to the message text box which causes the value of the due date to be inserted. You can
change the label (Due Date in this case) which was provided automatically. Use the same method to add two
more variables to the message text: Priority and Short Description.
Notification Examples 63

7. Click Submit.

Test the Email Notification


If you are working on your own Glide instance, you must configure Glide to use a mail server.

Warning: Do not use your own POP server for this exercise. You should have a test account set up on your mail server (see the
administrator of your mail system). It may download the contents of your POP account. You may choose to skip configuring
Glide to use an email server and just check the Glide email log instead of sending an actual email (see final step below).

1. Navigate to System Properties > Email.


2. Under SMTP Server Settings, enter the outgoing mail server, outgoing mail address, the mail server password,
and outgoing mail display name.
3. If you are using a POP server, enter the POP server, incoming POP mail account name (do not include the @ and
server name here), and incoming POP mail account password.
At the bottom of the form is a space where a test email account can be provided to direct emails to it instead of
the actual email addresses. Rather than test emails sent to the test users, place your own email address here.
Notification Examples 64

4. Click Save.
5. Test the assignment notifications.
a. Assign some To Do records.
b. Navigate to System Logs > Email to see that status of generated emails.
If you managed to configure your mail settings correctly, you should receive email notifications in a few
moments.

Example 3: Approval Request Notification


In this notification, a change request approval is requested, which results in an update to the Approval
[sysapproval_approval] table. The approval events Business Rule is executed which creates the approval.inserted
event. The Approval Request email event is configured to process the approval.inserted event, which uses the
change.itil.approve.role email template. This is part of an automatic response that enables the recipient to click a
link in the email to send a pre-formatted response back to the system to either approve or reject the change request
automatically.
The base email notification looks like this:

The change.itil.approve.role template called from the notification looks like this:
Notification Examples 65

The combination of the notification and template generates an email that looks something like the following:

Notice that the receiver of this email has the following links in the mail:
A link to view the approval record
A link to view all the details of the change request
A link that will generate an automatic email response to approve the change
A link that will generate an automatic email response to reject the change

Example 4: Priority 1 Incident Update Notification


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.
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.
Notification Examples 66

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 Leave this field blank. We will cover the construction and use of templates in another exercise.
template

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 Select this check box to send the notification to the person who performed the action that started the notification process if the person
event is also specified in the Users/groups in fields, Users, or Groups field. If the event creator is not specified in one of these fields, the
creator event creator does not receive a notification regardless of the setting in this field.

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 example, we 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.

SMS Enter an abbreviated version of the email message that eliminates such things as the ${URI} link that requires recipient interaction
alternate and the ${comments} field. SMS messages can only display 140 characters.

Your email notification record should look like this:


Notification Examples 67

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:
Notification Examples 68
69

Subscribing to Notifications

Subscription Based Notifications Plugin


Overview
ServiceNow provides an enhancement to its standard recipient-based notification system that enables users to filter
out or unsubscribe entirely from messages that they could not previously control. The subscription based notification
mechanism allows users to proactively subscribe to notifications that interest them. In addition, users can specify
additional notification devices, such as cell phones, that each of their notifications can be configured to use.
The subscription based notification feature is available by default for new instances. For configuration instructions,
see Setting Up Subscription Based Notifications. To use the filter and subscribe to notifications, see Using
Subscription Based Notifications.

How It Works
The notification system has two parts: the standard recipient-based notifications, and subscription based
notifications.

Standard Recipient-Based Notification


The standard recipient-based notification is configured by an administrator. In the standard notification flow, the
only available notification device is email. The following is an example of this type of notification.
Jerrod Bennett calls the service desk with an issue, and an incident is created with Jerrod as the Caller.
Jerrod receives the Incident opened for me notification message because the notification is set to send a
notification to the incident's Caller.

Subscription-Based Notification
Subscription-based notification enables users with the appropriate role to subscribe to notifications that are marked
as Subscribable and configure conditions and schedules for those notifications. When a notification is subscribable,
the system sends the message to users who have subscribed to that notification. The system checks the user's
notification preference for any filter and schedule settings relevant to the message. If the preferences permit delivery,
the system sends the notification to the device specified (email or cell phone).
The following is an example of a subscription-based notification.
Jerrod Bennett calls the service desk again, and the service desk employee creates another incident.
The service desk employee adds a comment to the incident. This triggers a custom subscribable notification called
Incident commented by San Diego service desk employees, which the San Diego service desk manager uses to
monitor quality.
The system sends the following notifications:
Jerrod receives the Incident opened for me notification message because he is the incident Caller.
The San Diego service desk manager receives the Incident commented by San Diego service desk
employees notification message because he has subscribed to it.
Subscription Based Notifications Plugin 70

Note: Subscription preference information is stored on the Notification Message [cmn_notif_message] table.

Getting Started
To set up and use subscription based notifications for email and SMS notifications, complete the following tasks.

Task 1: Set Up Notifications


Set up the email and SMS notifications to deliver to your users. See Email Notifications for details about creating
messages for email and SMS and configuring them to be delivered when certain events occur. Determine which
notifications are mandatory (messages from which users cannot unsubscribe). Messages also can be created using
templates.

Task 2: Add Notification Devices


Create the user's primary email address and any SMS devices in their user record using one of these methods:
Configure the User record to display the Notification Devices related list.
Use the Notifications Preferences UI action to create notification devices.

Task 3: Associate Notifications with Devices


After creating the devices, associate these devices with the notifications to deliver. This is accomplished by using
one of these methods:
Configure the User record to display the Notification Messages related list.
Use the Notifications Preferences UI action to add notifications for the devices to deliver.

Task 4: Subscribe or Unsubscribe to Notifications


To subscribe or unsubscribe to a notification, see Using Subscription Based Notifications. A user cannot unsubscribe
from a notification that an administrator has configured as mandatory.

Troubleshooting Subscription Based Notifications


To see if users are able to subscribe to a notification, check that the notification has the Subscribable option
selected. If you do not see this option on the Notification form, configure the form and add it. If the Subscribable
option is not selected on the form, the users listed on the Who will receive tab are the only users who can receive the
notification. Even if a notification is not marked Subscribable, users can still add it to a device on their user
preferences, thereby subscribing to it; however, they still do not receive that notification unless they are specified on
the Who will receive tab. The Subscribable option must be selected for the subscription feature to work. See
Troubleshooting email notification failures in ServiceNow [1] for additional information.
Subscription Based Notifications Plugin 71

References
[1] https:/ / hi. service-now. com/ kb_view. do?sysparm_article=KB0538135

Setting Up Subscription Based Notifications


Overview
Before your users can manage the notifications that are sent to them, you must create email notifications to which
users can subscribe, select service providers for delivery devices, and create the filters users can select to control how
and when certain messages are delivered. You can also configure mandatory notifications that users cannot block.
After installing the plug-in, perform the following procedures, based on your organization's needs.

Accessing the Interface


You can access the subscription based notifications interface from a user record (User Administration > Users) using
either of two methods:
Related Links: The Notification Preferences interface features simplified navigation and streamlined controls
that provide more at-a-glance information than the previous method.
Related Lists: You can still access your subscription based notification records from two standard ServiceNow
related lists: Notification Device and Notification Messages. To use this method, you must configure your user
forms to use these related lists.

Related Links - Notification Preferences


Select Related Links > Notification Preferences in a user record to view or configure that user's preferences. Click
New Device to create a notification device for this user. For detailed instruction on using this interface, see Using
Subscription Based Notifications.
The following shows notification preferences starting with the Fuji release.
You can perform the following
notification tasks in this screen:
View all notifications: All
notifications sent to this user and
subscribed to by this user appear in
this screen, listed under the
appropriate delivery devices.
Add or remove notifications:
Click the remove icon to
unsubscribe the user from that
Notification preferences starting with the Fuji release notification. Notifications that were
sent to you or that are mandatory
are marked with a gray X and cannot be deleted.
Add or edit devices: Click New Device to add a new notification device. Click an existing device to edit that
device. All users receive a Primary email device by default.
Apply schedules and filters: Click an individual notification to set or edit its schedule and filter.
Setting Up Subscription Based Notifications 72

Unsubscribe from notifications: To unsubscribe from a notification, click the toggle to the off position. Users
cannot unsubscribe from a mandatory (locked) notification when they access this form.
The following shows notification preferences prior to the Fuji release.

Click the plus icon to see the preferences prior to Fuji.

Notification preferences for versions prior to Fuji

You can perform the same tasks as you can for the Fuji release, with these exceptions or differences:
Add or remove notifications: Click a red X to remove the notification from that user. Notifications that were sent to you or that are mandatory
are marked with a gray X and cannot be removed.
Unsubscribe from notifications: To unsubscribe from a notification, click the Off button.

Related Lists
To enable Related Lists for subscription-based notifications, you must configure the User form and your task forms.

Add Related Lists to User Forms

Note: If you are using Notification Preferences from Related Links to manage notifications, this step is not necessary.

To use Related Lists for subscription-based notifications, add the Notification Devices and Notification Messages
lists to your user form.

Add Related Lists to Task Forms


Add any of the following related lists to your task forms: Affected CIs, Affected Cost Centers, Affected Groups,
Affected Locations

Making a Notification Mandatory


You can flag a notification message as being mandatory, which will prevent users from manipulating the message
with notification preferences. To make a notification mandatory:
1. Navigate to System Policy > Email > Notifications.
2. Open the appropriate notification, and select the Mandatory check box.
That notification is now locked in user preferences, preventing the user from unsubscribing to the notification,
filtering it, or changing the schedule. In Related Links > Notification Preferences, the control button for the
mandatory notification is disabled and set to On.
Setting Up Subscription Based Notifications 73

Adding an
Unsubscribe Link to an
Email Message
You can add an Unsubscribe link to
the bottom of any email body by
A locked notification that cannot be turned off or deleted
pasting in the following text. Be sure
to change the values in arrow brackets
to suit your environment. For instructions on creating email messages, see Email Notifications and Email Templates.
<mail_script>

template.print('<a href="' + gs.getProperty('glide.servlet.uri') + 'unsubscribe.do?sysparm_notification=' + email_action.sys_id + '"> Unsubscribe </a><br />\n');

</mail_script>

Selecting a Service Provider


You can configure service providers for your SMS devices and associate them with a user's device notification
preference. Administrators have the option of configuring how a device's service provider affects the construction of
the device's email address.
To configure a service provider:
1. Navigate to User Administration > Users and open any user's record.
2. Click Notification Preferences, and then then click an SMS notification device.
3. If no SMS device is present, click New Device and configure one.
4. Select the appropriate service provider, and then click the reference icon for the Service provider field. The
service providers are saved in the Notification Service Provider [cmn_notif_service_provider] table. Only active
providers are visible.

This opens the Notification Service Provider record from the Notification Service Provider table.

The Notification Service Provider form provides the following fields:


Setting Up Subscription Based Notifications 74

Field Input Value

Name Configured name of the service provider.

Type Type of device - in this case SMS.

Active Enables or disables this notification device.

Advanced Removes all the previous options and displays the Advanced script field.
notification

Advanced Used for custom notifications that run a script rather than construct a traditional SMS/email. This is generally used when all
script outbound SMS messages must run through a central SMS hub, as opposed to being sent directly from the ServiceNow instance to
the SMS provider. Advanced users can construct a script in this field that will send a notification to an old style numeric pager that
cannot receive SMS communications. This field is rarely used and employs advanced scripts. See Advanced Notification Scripts
for examples of what you can use in the script.

Construct Removes the prefix and suffix options and displays the Construction script field
address
manually

Construction Allows you to script the email address construction as you would in a business rule. For example, abc + current.phone_number +
script [email protected] would construct an email address of [email protected]. NOTE: Current is a reference to the device,
not the service provider, hence the current.phone_number variable that uses the device's phone_number value.

SMS Provider Places the provided text before the device's specified phone number (e.g. [email protected]).
Email Prefix

SMS Provider Places the provided text after '@' sign (e.g. 2223334444@SUFFIX)
Email suffix

Notification Additional, optional attributes of an SMS device used inside an SMS service provider's Advanced script. This is generally used
Device to deliver SMS notifications to an internal SMS distribution technology. This is an advanced scripting procedure and is not
Variables necessary for configuring external SMS providers.

Advanced Notification Scripts


You can use these objects and their attributes in your advanced notification scripts:
Object current email device Example attributes
current.number
current.assigned_to
current.company
current.state
email.notify
email.sourceTable
email.contentType
email.attachments
email.HTML
email.dataVersionHeader
email.UID
email.allowSavingNoRecipientEmail
email.recipients
email.ignore
email.save
email.headers
email.sysID
email.attachmentLimits
Setting Up Subscription Based Notifications 75

email.class
email.sysId
email.textBody
email.hashCode
email.weight
email.equals
email.logEmail
email.reset
email.wait
email.body
email.SMSText
email.watermark
email.textBodyLegacy
email.sourceHeader
email.subject
email.instance
email.importance
device.service_provider
device.group
device.order
device.sys_id
device.sys_updated_by
device.sys_created_by
device.primary_email
device.schedule
device.name
device.sys_created_on
device.email_address
device.active
device.phone_number
device.sys_mod_count
device.sys_updated_on
device.user
device.sys_meta
device.type
Setting Up Subscription Based Notifications 76

Notification Filters
Notification filters enable a user to control the delivery of messages by creating special conditions on multiple tables
in a single, reusable filter. For example, you can create a filter that controls message delivery when active incidents,
problems, and change requests for network issues reach a critical state. Notification filters are available for selection
in the Filter field of a user's Notification Preferences form.

Note: The system applies the user's filter conditions after the administrator's conditions have been evaluated. If the administrator's
conditions fail, the system ignores notification filters.

To create a notification filter:


1. Navigate to System Policy > Email > Notification Filters and create a new record.
2. In the Notification conditions related list of the new record, create and submit filter conditions on one or more
tables.

3. Repeat the procedure to create additional conditions on other tables for this filter.
Using Subscription Based Notifications 77

Using Subscription Based Notifications


Overview
ServiceNow provides an enhancement to its standard recipient-based notification system that enables users to filter
and schedule the notifications they receive. This subscription-based notification mechanism enables users to
proactively subscribe to items that interest them and unsubscribe from messages that are not mandatory. Users can
also specify additional notification devices, such as cell phones, that each of their notifications can be configured to
use.
See Subscription Based Notifications and SMS Notifications for information on configuring these messages.

Managing Notifications
Subscription-based notifications can be managed by adding notification devices, subscribing to and unsubscribing
from messages, and setting the filters and schedules that control how and when messages are delivered.

Setting up Notification Devices


As a user, the first step in setting up subscription-based notifications is to set up notification devices. Every new user
receives a primary email device automatically, but you can also add more devices or add devices for existing users.
You can add as many notification devices as you need.

Note: Notification devices such as cell phones and pagers must be able to receive SMS notifications. To receive email notifications
on an old style, numeric pager, you must construct an advanced script in the service provider record.

1. Navigate to Self-Service > My Profile to open your user profile.


2. Click Notification Preferences under Related Links.
The Notification Preferences screen displays all your devices, such as your email accounts, voice messaging
systems, and phones that can receive SMS messages.
Notifications are listed under the
device configured to receive
them.
If the notification is
subscribable, you can click
it to select a filter or a
delivery schedule from
predefined lists.
If the notification is
mandatory, the On/Off
User notification preferences button or toggle is
disabled, and you cannot
unsubscribe to the notification or modify its delivery in any way.
3. Do one of the following (see the table for field descriptions):
To add a device to the list, such as your cell phone or secondary email address, click New Device.
To edit an existing device, click on the device.
Using Subscription Based Notifications 78

4. Click Submit.
Your new device is listed below
your primary email device and is
ready to configure.

Creating a new notification device

Field Description

Name Enter a name for the device.

Type Select the type of device: Email, SMS, or Voice.

Phone number Enter the phone number to which SMS notifications should be sent.
This field is available if you selected SMS or Voice in the Type field.

Email address Enter the email address to which the notifications should be sent.
This field is available if you selected Email in the Type field.

Service provider Enter the name of the SMS service provider.


This field is available if you selected SMS in the Type field.

User Enter the name of the user who should receive notifications. By default, this shows the name of the user configuring the device.

Order Enter a number to determine where the device appears in the list. The lower the number, the higher it appears in the list.

Active Select this check box to activate the device.

Adding Service Providers


Administrators can send SMS messages only if the phone's service provider can accept emails to an address such as:
<phone number>@<sub-domain name>.<top-level domain> (for example, [email protected]).
The Service Provider field determines the domain name that is added to the phone number to create the address.
Administrators can add a new domain by creating a new service provider record with the domain name that must be
used when sending emails as SMS messages.

Filtering Device Notifications Using a Schedule


Administrators can associate devices, such as Email, SMS, and Voice, to schedules that define when the devices
should and should not receive notifications (starting with the Eureka release). Notifications that are triggered outside
of the scheduled days and times for the device are not queued up for delivery at a later time.
For example, if an administrator selects the Weekdays schedule for an email device, the device receives email
notifications triggered between Monday and Friday. If notifications are triggered on Saturday, they are not delivered
to the device.
To add a schedule to a device:
1. Define schedules as needed using System Scheduler > Schedules > Schedules.
2. Add or edit a device.
3. Configure the New Device for System Administrator form and add the Schedule field.
4. In the Schedule field, select the schedule for the device.
5. Click Submit.
Using Subscription Based Notifications 79

Subscribing to Messages and Configuring Preferences


After setting up your devices, you are ready to subscribe to new messages or manage messages you have already
received. If you have subscribed to messages, your list of notification messages can build over time. You can create
preferences for how and when these messages are delivered, or unsubscribe to messages that are not configured as
mandatory.

Note: Filters that you apply to messages do not override the original filters that the administrator created for the notifications. Your
filter conditions are evaluated after the original conditions are met. If the administrator's notification filter fails, your filter conditions
are not evaluated. If neither an advanced filter nor a predefined filter is selected, you see all notifications that match the
administrator's original filter conditions.

To subscribe to notification messages:


1. Navigate to Self-Service > My Profile.
2. Click the Notification Preferences related link.
3. On the Notification Preferences page, click the green plus icon.
4. Fill in the fields as described in the table.
If you do not specify a schedule or filter, the message is delivered when the event occurs and when the filter
condition defined by the administrator is met. You can select a delivery schedule that is more convenient,
create conditions that refine the notifications you receive, or select a predefined filter intended for reuse. For
example, the default filter for a notification might send you a message when a high priority incident is opened
for a particular CI. You can refine the message delivery options and add a filter that notifies you when those
incidents are assigned to a particular assignment group.
5. Click Save.

Field Description

Notification Select a message from the list. Related fields appear for certain notifications. For example, if you select CI affected or Location
Message affected, a field appears for selecting the CI or the location. Duplicate messages are not permitted on a device.

Device Select the notification device for the message. The device that you are adding a notification for is selected by default, but you can
change the device, if appropriate.

Schedule Select a schedule for message delivery.

Filter Select a notification filter to refine the notifications that you receive. For example, you might select a filter whose conditions send
notifications when an incident with a priority of 1 - Critical is opened for a network issue. The system evaluates the conditions in
this filter after the conditions in the administrator's notification filter. This field is not available when an advanced filter is
configured.
Using Subscription Based Notifications 80

Advanced Select the check box to enable the condition builder and select the table to use. When you select the check box, the Filter field is
filter replaced by the Table and Conditions fields.

Table Select the table for the notification. For example, if you select the CI affected notification message, you might select the Incident
[incident] or Change Request [change_request] table. This field appears when you check the Advanced filter check box.

Conditions Define as many conditions as needed to refine the notification.

To edit the schedule or filter of an existing notification message:


1. In the Notification Preferences screen, click the message to edit.
You cannot edit any attributes of a mandatory message.
2. Make the appropriate changes in the form.
3. Click Update.
81

Performing Tasks from Inbound Email

Inbound Email Actions


Overview
Inbound email actions enable an administrator to define the actions ServiceNow takes when receiving email.
Inbound email actions are similar to business rules, using both conditions and scripts. The inbound email action
checks the email for a watermark that associates it with a task and checks for other conditions. If the conditions are
met, the inbound email action runs the script.
By default, if an email has no identifiable watermark, an inbound email action attempts to create a new incident from
the message. If the email has a watermark of an existing incident, an inbound email action updates the existing
incident according to the action's script. For detailed examples of email actions that interact with incidents, problems,
and change requests, see Examples of Inbound Email Actions.
The system ignores the domain that the inbound email action record is in when it creates a record based on the
inbound email action. Keep inbound actions in the global domain. For example, if your inbound email action creates
an incident, the system creates the incident in the same domain as the user in the Caller field. If that user is not in the
User [sys_user] table, the incident is in the global domain.

Creating an Inbound Email Action


To add an inbound email action:
1. Navigate to System Policy > Email > Inbound Actions.
2. Click New.
3. Complete the fields on the form (see table).

The Create Incident inbound action

Note: You might need to personalize the form to see all the fields below.
Inbound Email Actions 82

Field Description

Name Enter a descriptive name for this email action.

Target Select the table where the action will add or update records.
table

Type Select the message type required to run the action. The action runs only if the inbound email is of the selected type. Available types
are:
New: An email that is not recognized as a reply or forward.
Reply: An email with a watermark with an In-Reply-To email header, or whose subject line begins with a recognized reply prefix.
Forward: An email whose subject line begins with a recognized forward prefix, even if the email also contains a watermark or
In-Reply-To header.
Note: By default, inbound emails of the Forward type always generate new incidents regardless of the presence of a
watermark. If this behavior does not match your business logic, you can change the recognized reply and forward prefixes to
treat forwards like replies.

Condition [Optional] Enter a statement that determines when the inbound email action runs. If a condition is entered, the action runs only when
the condition statement evaluates to true. For example:

email.subject.startsWith("chg:")
Active Select this check box to enable the action. Clear the check box to disable the action.

From [Optional] Select the user required to run the action. If a user is selected, the action runs only when the email sender matches the user
name. Leave this field blank to perform the action for all users.

Script Enter the script the action runs. Typically, this script uses the validators script include and email variables.

Description Enter a detailed explanation of what this inbound email action does.

Other fields

Order Enter a number to define the order in which this email action should be processed. Actions with lower numbers are processed first. For
more information, see Ordered Email Processing. This field is not installed by the Ordered Email Processing plugin.

Note: For sample scripts, see the Useful Scripts portal.

Matching Incoming Email to an Inbound Action Type


ServiceNow uses the following logic to match an email to a specific inbound action type.

How ServiceNow matches email to an inbound


action type
Inbound Email Actions 83

Inbound Email Required Matching Criteria Name of Default Result of


Action Type Action (Incident table) Default
Action

Forward The email contains the following conditions: Create Incident Create new
1. A subject starting with a recognized forward prefix (even if a watermark or an (Forwarded) record
In-Reply-To header is present).
2. From <user email> appears anywhere in the email body.

Reply The email contains one of the following conditions and the table specified in the Update Incident (BP) Update
email matches the table of the inbound action: existing record
1. A valid watermark that matches an existing record.
2. An In-Reply-To email header (when no watermark is present) that matches an
existing record.
3. A subject line starting with a recognized reply prefix (when neither a watermark
nor an In-Reply-To header is present) and a valid record number that matches
an existing record.

New The email does not meet the conditions for either a reply or forward type inbound Create Incident Create new
email action record

If more than one inbound action is available for a particular type, ServiceNow uses the Table field to match the
email to a particular table. If there is also more than one action for the inbound action's table, ServiceNow uses the
Order field to determine the order in which the actions run.

Specifying Recognized Reply Prefixes


When no watermark or In-Reply-To email header is present, ServiceNow recognizes email containing a prefix from
the glide.email.reply_subject_prefix property as reply email. Emails with these prefixes trigger
inbound email actions of the type reply. Set this property if your email system uses non-standard reply prefixes.

Property Description

glide.email.reply_subject_prefix Specifies the list of prefixes (comma-separated) in


the subject line that identify an email reply.
Type: string
Default value: re:,aw:,r:
Location: Add to the System Properties
[sys_properties] table

Note: Prefixes are case insensitive.


Inbound Email Actions 84

Specifying Recognized Forward Prefixes


ServiceNow recognizes any email whose subject line contains a prefix from the
glide.email.reply_subject_prefix property as forwarded email. Emails with these prefixes trigger
inbound email actions of the type forward. Set this property if your email system uses non-standard forward prefixes
or you want forwards to behave like replies.

Property Description

glide.email.forward_subject_prefix Specifies the list of prefixes (comma-separated) in


the subject line that identify a forwarded email.
Type: string
Default value: fw:,fwd:
Location: Add to the System Properties
[sys_properties] table

Note: Prefixes are case insensitive.

Processing Forwards as Replies


You can force inbound actions to process forwarded mail as replied mail by modifying the subject prefix properties
as follows.

Property Value Needed

glide.email.reply_subject_prefix re:,aw:,r:,fw:,fwd:

glide.email.forward_subject_prefix [any text that is not a forward prefix]

This causes all forwarded and replied to mail to be processed by the Update Incident inbound action.
The glide.email.forward_subject_prefix property must contain some text in order for the forwarded
email to be processed as a Reply. It can be any text except a forward prefix (that is, fw:,fwd:).

Matching Incoming Email to Existing Records


To understand how the instance matching incoming email to existing records, see this graphic.
The instance searches for watermarks in the email subject line first, then in the email body. If no watermark is
present, the instances searches for an In-Reply-To email header that matches an existing record. If that is not found,
the instances searches the subject line for a recognized reply prefix.

Note: Some versions of Microsoft Exchange Server require a hotfix to support the "In-Reply-To" header when replying to email that
originates from outside the organization.
Inbound Email Actions 85

Examples of Matching Watermarks in the Subject Line or Body


The following examples illustrate how ServiceNow matches watermarks in an email's subject line or body.

Subject Line or Body Matching results


Contents

Ref:MSG0000008 ServiceNow recognizes this as a watermark and searches the Email Watermarks [sys_watermarks] table for a record
with the number MSG0000008. If this watermark exists, ServiceNow matches the email to the associated record. If this
watermark does not exist, ServiceNow uses the inbound action for new emails to create a new incident, and associates
the new incident with the email.

Ref:MSGWTR0000008 ServiceNow recognizes this as a watermark and searches the Email Watermarks [sys_watermarks] table for a record
with the number MSGWTR0000008. If this watermark exists, ServiceNow matches the email to the associated record.
If this watermark does not exist, ServiceNow uses the inbound action for new emails to create a new incident, and
associates the new incident with the email.

Ref:WTR0000008 ServiceNow recognizes this as a watermark and searches the Email Watermarks [sys_watermarks] table for a record
with the number WTR0000008. If this watermark exists, ServiceNow matches the email to the associated record. If this
watermark does not exist, ServiceNow uses the inbound action for new emails to create a new incident, and associates
the new incident with the email.

MSG0000008 ServiceNow does not recognize this as a watermark because it does not start with the Ref: prefix. It uses the inbound
action for new emails to create a new incident, and associates the new incident with the email.

Examples of Matching Record Numbers in the Subject Line


The following examples illustrate how ServiceNow matches record numbers in an email's subject line to an existing
record when no watermark is present.

Subject Line Matching Results


Contents

RE: Example ServiceNow recognizes this subject line as a reply and recognizes the INC prefix as belonging to the incident table.
INC0005574 ServiceNow searches the incident table for an existing record INC0005574. If this incident exists, the email is associated with
this incident. If this incident record does not exist, ServiceNow uses the inbound action for new emails to create a new
incident, and associates the new incident with the email.

RE: Example The instance recognizes this subject line as a reply but does recognizes the "INC prefix as belonging to the Incident table
"INC0005574" because of the quotation mark. The same error occurs for any character other than a space before the record number. The
RE: Example instance instead uses the inbound action for new emails to create an incident, and associates the new incident with the email.
*INC0005574

RE: "Example The instance recognizes this subject line as a reply and recognizes the INC prefix as belonging to the Incident table. The
INC0005574" instance searches the Incident table for an existing record INC0005574", which it will not find because of the quotation mark.
RE: Example The same error occurs for any character other than a space at the end of the record number. The instance instead uses the
INC0005574* inbound action for new emails to create an incident, and associates the new incident with the email.

RE: CHG0008593 ServiceNow recognizes this subject line as a reply and recognizes one, but not both, of the number prefixes. There is no way
and INC000576 to predict which prefix ServiceNow will match first. Whichever prefix it matches, it searches the corresponding table for a
matching record. If the record exists, the email is associated with the table. If the record does not exist, ServiceNow uses the
inbound action for new emails to create a new incident and associates the new incident with the email.
Note: ServiceNow does not support processing email with multiple numbers in the subject line because there is no way to
predict which record ServiceNow will match first. For this reason, ServiceNow does not recommend creating notifications
that include more than one $number variable.

FW: Example ServiceNow recognizes this subject line as a forward because of the FW: prefix and uses the inbound action for forwarded
INC0005574 emails to create a new incident, and associates the new incident with the email.

Example ServiceNow recognizes this subject as a new email because it does not contain a matching reply or forward prefix. It uses the
INC0005574 inbound action for new emails to create a new incident, and associates the new incident with the email.
Inbound Email Actions 86

Matching Email to Existing Users


When ServiceNow receives an email message, the system searches for an existing user record with the same email
address as the sender. For example:

Value of email.from variable Matching User ID Email address Name

[email protected] [email protected] [email protected] Michael Tossi

"Michael Tossi" <[email protected]> [email protected] [email protected] Michael Tossi

"Tossi, Michael" <[email protected]> [email protected] [email protected] Michael Tossi

"Tossi" <[email protected]> [email protected] [email protected] Tossi

Note: This functionality requires that you activate the Email Automatic User Creation plugin. For more information on the plugin,
see Upgrading the User Creation Method to Use the Full Email Address.

Inbound Email Action scripts no longer support the gs.createUser() method. Use either the automatically-generated
email variables or the gs.GetUserID() method instead.

Impersonating Users to Run Inbound Actions


If the sender of an incoming email matches an existing user, the instance impersonates the matching user to complete
any inbound email actions. If the sender does not match an existing user, the instance impersonates the Guest user to
complete any inbound email actions. If the impersonated user is locked out, the inbound email action fails.

Note: If inbound email comes from an untrusted domain, the instance impersonates the Guest user unless you explicitly prevent users
from untrusted domains from triggering inbound actions.

Creating Users from Incoming Email


ServiceNow can automatically create users from incoming email. If the search does not find a user with a matching
email address, ServiceNow can create a new user with the User ID [sys_user.user_name] set to the sender's full
email address.

Value of email.from variable User ID created Email address Name

[email protected] [email protected] [email protected] New User

"New User" <[email protected]> [email protected] [email protected] New User

"User, New" <[email protected]> [email protected] [email protected] New User

"User" <[email protected]> [email protected] [email protected] User


Inbound Email Actions 87

Enabling Automatic User Creation


To enable the automatic creation of user records from email, you must set two email properties.
1. Navigate to System Properties > Email.
2. Select the check box for Automatically create users for incoming email from trusted domains
(glide.pop3readerjob.create_caller).
3. Enter the list of trusted domains in Trusted domains for creating
users from incoming emails
Enable the property to create users from email
(glide.user.trusted_domain).

4. Click Save.

List of trusted domains

Note: When the property glide.pop3readerjob.create_caller is set to false, ServiceNow runs inbound actions from
users who do not match an existing user by impersonating the Guest user. You may want to prevent untrusted users from triggering
inbound actions by locking out the Guest user.

Upgrading the User Creation Method to Use the Full Email Address
You can upgrade the method ServiceNow uses to create users by activating the Email Automatic User Creation
plugin. The plugin makes the following changes:
Sets the property glide.email.create_userid_from_email to true.
Increases the width of the User ID [sys_user.user_name] column to accommodate email addresses.
After activating the plugin, enable automatic user creation from email.

Warning: ServiceNow, Inc. strongly recommends reviewing your existing user records to reconcile any that contain identical
email addresses. If you activate the plugin prior to reconciling email addresses, your instance cannot distinguish between users
with identical email addresses and will randomly select one of the users with the matching email address.

Accessing Email Objects with Variables


An inbound email action script has access to various pieces of an inbound email through script variables.

Variable Contents

email.to Contains a comma-separated list of email addresses in the To: and Cc: boxes.

email.direct Contains a comma-separated list of email addresses in the To: box.

email.copied Contains a comma-separated list of email addresses in the Cc: box.

email.body_text Contains the body of the email as a plain text string.

email.body_html Contains the body of the email as an HTML string.

email.from Contains an email address according to the following conditions. If the address listed in the email Headers field matches an
existing user's Email address, this variable contains the user's Email address. If the address listed in the email Headers
field does not match an existing user's Email address, this variable contains the address listed in the email Headers field
(starting with Eureka Patch 5) or the Guest user's Email address (in versions prior to Eureka Patch 5).
Inbound Email Actions 88

email.from_sys_id Contains the Sys ID of the user who sent the email to the instance.

email.origemail Contains the email sender's address as listed in the email Headers.

email.subject Contains the email's subject as a plain text string.

email.recipients Contains a comma-separated list of recipient addresses.

email.recipients_array Contains the recipient addresses as an array.

email.content_type Contains the MIME content type of the email (for example, text/plain; charset="us-ascii" or text/html;
charset="us-ascii").

email.headers Contains details about the sender, route, and receiver as a plain text string in the format of the sending email client.

[1]
Note: ServiceNow follows RFC 2822 (Internet Message Format), which requires multiple email addresses in a group to be
separated by commas, not semicolons. ServiceNow can set the values of the email.to, email.direct, and email.copied
variables only if email addressed to groups follow the expected RFC format.

Processing Recipients in Inbound Email


The recipients variables allow processing of inbound email based on the email recipients:
email.recipients: returns a comma-separated list of recipient addresses as a plain text string.
email.recipients_array: returns the recipient addresses as an array.
For example, create a script to process email based on the array values:

var rarray = email.recipients_array;


for (var i = 0; i < rarray.length; i++) {
var recipient = rarray[i];
// do something with it
}

Setting Field Values from the Email Body


Values in an inbound email can set field values in a task record. Any name:value pair in an inbound email body gets
parsed into a variable/value pair in the inbound email script. The name:value pair must be on its own line. Note that
most email clients limit the number of characters allowed per line and may truncate excessively long name:value
pairs. To populate a reference field use setDisplayValue() instead. See Redirecting Emails for an example of
using setDisplayValue() in an inbound email action.

Note: The action always generates a lowercase variable name. Note also that this functionality does not work on reference fields.

For example, if an email body contains this line:

Foo:bar

The inbound email script creates the variable email.body.foo with the value of bar. You can use these variables to
create conditions such as:

if(email.body.foo != undefined) {
current.[field] = email.body.foo;
}
Inbound Email Actions 89

In this example, the script sets the value of [field] to the value bar.

Matching the Sender's Email Address to a User


When processing an email, ServiceNow sets the current user to the user whose email address matches email.from.
Inbound actions can then reference that current user. For example, the base system inbound action Create Incident
sets the incident's caller_id to the value returned by gs.getUserID().
If multiple users have the same email address, the instance first searches for an active user with the email address.
The instance does not match inactive users.

Warning: You should have a unique email addresses for each user record. Otherwise, the instance can not reliably match the
email to the correct user and unpredictable matches may occur.

If providing a unique email address to each user is not possible, ServiceNow recommends only having one active
user with the shared email address. This configuration guarantees that ServiceNow always matches incoming email
from this address to the active user.

Note: The Email Automatic User Creation plugin must be active.

Assignment of Tasks via Email


The name:value example shows a useful email capability; that is, the ability to set a field in a record. For example,
the change.itil.approve.role email template lists several fields in the outbound notification.

Notice the line in the template that shows Priority:${sysapproval.priority}. When replying to this
email, the approver can change the value of the Priority field directly from the email. For example, the approver
could set the priority to 4 Low:

Priority:4
Inbound Email Actions 90

Redirecting Emails to Different Assignment Groups


By default, the POP Reader scheduled job checks for new email every 2 minutes. It connects to the mail server and
account specified in email properties. The POP Reader downloads any email waiting on the mail server and creates
email.read events. After the instance processes the events, the inbound email actions run.
The POP Reader shows the number of emails processed during the reader's last run. The message shows the number
of emails the reader processed or 0 processed if no emails were available. The reader resets the status each time it
runs.
While it is not possible to specify more than one POP3 account for the instance, you can have other mailboxes
forward to the designated POP3 account. Add this script to the Create Incident inbound email action to differentiate
the content based on the original recipient and then set an assignment_group value.

if (email.direct.indexOf('[email protected]') > -1)


current.assignment_group.setDisplayValue('Facilities Management');

Update the email address, original recipient, and assignment group name accordingly.

Attachments
If an inbound email contains one or more email attachments, the inbound email action adds the attachments to the
first record the action produces.

Character Encoding
ServiceNow checks the MIME type of incoming email to verify the character encoding. If the email encoding is
ASCII-7 or UTF-8, inbound email actions preserve the character encoding in any associated task records they
produce. If the email encoding is ISO-8859-1, the inbound email action attempts to convert the email to Windows
1252. Inbound email actions convert any other encodings (for example, Mac OS Roman) to plain text, which may or
may not be readable.

Setting Maximum Body Size


In some situations, an email message may contain more information in the body than the instance's data policy
permits a field to write to the database. By default, an inbound email action can process only up to 16MB worth of
information in the message body. If the email body exceeds this limit, the instance truncates the message body.
A system property controls the maximum size of a message body before the instance stops processing inbound email
actions. The default value is set to match the data policy write limit of 16MB. You cannot set a higher value without
conflicting with the write data policy limit. If you want to set a lower limit, you can add this system property. Ensure
the limit is well below the maximum total email size.
Inbound Email Actions 91

Property Value

Name com.glide.email.max_body_bytes

Description Specify the maximum size of an email message body in bytes. The size cannot exceed the default value of 16MB.

Type Integer

Value 16777216

Note: Email attachments have separate size limits. For more information, see Email Attachment Limits.

Preventing Untrusted Users from Triggering Inbound Actions


Administrators can prevent users from untrusted domains from triggering inbound actions. For example, you can
prevent email from users outside your company domain from creating incidents.
1. Enable automatic user creation and add a list of trusted domains. For example, add your company domain
example.com.
2. Navigate to User Administration > Users.
3. Select the user guest.
4. Select the Locked out field to disable the guest account. Locking out a user record prevents ServiceNow from
processing inbound actions.
When a user from a trusted domain sends an email to the instance, ServiceNow either matches the email to an
existing user or creates a new user. Since the incoming email matches a user record (either an existing or new one),
the email can trigger an inbound action.
When a user from an untrusted domain sends an email to the instance, ServiceNow attempts to impersonate the guest
user. Since the guest user is locked out, the impersonation fails and the incoming email cannot trigger an inbound
action.

Warning: Allowing locked out users to trigger inbound actions also allows untrusted users to trigger inbound actions.

Allowing Locked Out Users to Trigger Inbound Email Actions


Administrators can allow locked out users to trigger inbound actions by setting the system property
glide.pop3.process_locked_out. This allows users who need to reset their password to send an email
message to an instance asking for assistance.

Warning: Enabling this feature also enables users from untrusted domains to trigger inbound actions.

Property Description
Inbound Email Actions 92

glide.pop3.process_locked_out Enables (true) or disables (false) the ability for locked out users to trigger inbound actions.
Type: true | false
Default value: false
Location: Add to the System Properties [sys_properties] table

Using sys_email
You can use the global variable sys_email with inbound email actions. This lets you access the received
sys_email record that triggered the inbound email action. It can be used to reference fields on the email record, such
as uid, sys_id, content_type, and so on.

Troubleshooting
The following solution to this common inbound email error is useful for troubleshooting email actions. For more
information, open the ServiceNow Knowledge Base and access the following two articles:
For troubleshooting inbound email, see KB0524472 [2].
For troubleshooting outbound email, see KB0521382 [3].

Error or Symptom Solution

Email from Outlook produces an Configure the local Outlook client or Exchange server to not send Rich Text formatted (RTF) data to
empty Incident record containing an ServiceNow instances. To prevent Windows email from containing a winmail.dat file, see Microsoft KB
attachment named winmail.dat. [4] [5]
278061 for information on configuring Outlook or Microsoft KB 138053 for information on
configuring Exchange.

Logging
See the email logs for a description of what you can see in the system log.
Starting with the Dublin release, you can use these GlideSystem error messages to display messages:
For an information message:
gs.log("<INSERT LOG MESSAGE HERE>", "EMAIL." + sys_email.sys_id);
For a warning message:
gs.logWarning("<INSERT LOG MESSAGE HERE>", "EMAIL." + sys_email.sys_id);
For an error message:
gs.logError("<INSERT LOG MESSAGE HERE>", "EMAIL." + sys_email.sys_id);

References
[1] http:/ / www. rfc-editor. org/ info/ rfc2822
[2] https:/ / hi. service-now. com/ kb_view. do?sysparm_article=KB0524472
[3] https:/ / hi. service-now. com/ kb_view. do?sysparm_article=KB0521382
[4] http:/ / support. microsoft. com/ kb/ 278061
[5] http:/ / support. microsoft. com/ kb/ 138053
Examples of Inbound Email Actions 93

Examples of Inbound Email Actions

Note: The body and message fields on the Notification form were changed to body_html, body_text, message_html,
and message_text in the Eureka release.

Overview
These examples show how to create new task records with inbound email actions. The following examples are
shown:
Incident
Problem
Change Request

Creating an Incident
Inbound Email Actions allow users to log or update incidents on an instance via email. The Inbound Email Action
parses the email and responds using a script. Out-of-box, an email received by the instance creates a new incident,
and the body of the email is added to the Additional Comments text box. More refined Inbound Email Actions can
create incident tickets with more data, thus saving the incident management team valuable time.

Defining an Inbound Email Action for Replies


The following Inbound Email Action affects email replies. Normally, when a user responds to an email sent by the
instance, the inbound email action matches the watermark to an existing incident, and updates the incident rather
than creating a new record. However, if the watermark is missing, this Inbound Email Action attempts to match a
reply to the original incident.
To define an inbound email action for replies:
1. Navigate to System Policy > Inbound Actions and click New.
2. Populate the Form as follows:
Name: Update Incident
Type: Reply
Target Table: Incident [incident]
Script: Insert the following:

gs.include('validators');

//Note: current.caller_id and current.opened_by are already set to the


first UserID that matches the From: email address

if (current.getTableName() == "incident") {
current.comments = "reply from: " + email.origemail + "\n\n" +
email.body_text;

if (email.body.assign != undefined)
Examples of Inbound Email Actions 94

current.assigned_to = email.body.assign;

if (email.body.priority != undefined &&


isNumeric(email.body.priority))
current.priority = email.body.priority;

if (email.body.category != undefined)
current.category = email.body.category;

if (email.body.short_description != undefined)
current.short_description = email.body.short_description;

current.update();
}

Creating a Problem
There are no Problem Management Inbound Email Actions provided in the base system. Below is an Inbound Email
Action for logging a problem.

Defining an Inbound Email Action for Logging a Problem


To define an inbound email action for logging a problem:
1. Navigate to System Policy > Inbound Actions and click New.
2. Populate the Form as follows:
Name: Log Problem
Type: New
Active: True
Target Table: Problem [problem]
Condition:

email.subject.indexOf("Problem: ") == 0

Script: Insert the following:

current.description = email.body_text;
current.short_description = email.subject.toString().substring(9);

current.assignment_group.setDisplayValue("Development");

if (email.body.assign != undefined)
current.assigned_to = email.body.assign;

current.insert();
Examples of Inbound Email Actions 95

Creating a Change Request


There are no Change Management Inbound Email Actions provided in the base system. Below is an Inbound Email
Action for requesting a change.

Defining an Inbound Email Action for Requesting a Change


1. Navigate to System Policy > Inbound Actions and click New.
2. Populate the Form as follows:
Name - Request Change
Type - New
Active - True
Target Table - Change Request [change_request]
Condition -

email.subject.indexOf("Change Request: ") == 0

Script - Insert the following:

current.comments = email.body_text;
current.short_description = email.subject;

current.notify = 2;

if (email.body.assign != undefined)
current.assigned_to = email.body.assign;

if (email.body.priority != undefined)
current.priority = email.body.priority;

if (email.body.category != undefined)
current.category = email.body.category;

current.insert();
96

Reference

Out-of-Box Email Notifications


Overview
The table on this page includes a description of each email notification included in the baseline ServiceNow system
and the event that triggers it. Also listed are the business rules that define the conditions under which events are
fired. Some events listed here do not appear in a business rule and are fired by other conditions in the platform. Some
events are hardcoded and are not user configurable.

Notification Descriptions
Email Description Triggering Event Business Rule
Notification Controlling
Event

Appointment itil_appointment.inserted Global business


Type: Meeting Invitation Adds a meeting invitation to the recipients
Invite [1] rule
calendar by sending an iCalendar formatted email

Appointment itil_appointment.updated Global business


Type: Meeting Invitation Updates an existing meeting in the recipients
Update [1] rule
calendar by sending an iCalendar formatted email

Approval Type: EMAIL An approval has been rejected includes the approvers approval.rejected approver events
Rejected name.

Approval Type: EMAIL An approval has been rejected includes the approvers approval.rejected.by.other approval events
Rejected by Other name.

Approval Request Type: EMAIL Sends an an email for the recipient to reply with an approval.inserted approver changes
approval decision. In the approval email, the recipient selects a link that
builds the appropriate reply email. See Approvals

Catalog Approval Type: EMAIL A catalog request has been rejected includes the request.approval.rejected approval events
Rejected approvers name.

Catalog Approval Type: EMAIL A catalog request for which you were an approver has request.approval.cancelled approver changes
Request been cancelled.

Catalog Approval Type: EMAIL A catalog request for which you are an approver has been request.approval.inserted approval events
Request made.

Certificate Type: EMAIL Notification that the ServiceNow X.509 certificate has certificate.expired certificate events
Expired expired.

Certificate Type: EMAIL Notification that the ServiceNow X.509 certificate is certificate.expiring certificate events
Expiring expiring in N days.

Change approved Type: EMAIL A change request has been approved. change.approved Change events and
task events

Change assigned Type: EMAIL A change request has been assigned to you. change.assigned Change events
to me

Change assigned Type: EMAIL A change request has been assigned to your group. change.assigned.to.group Change events
to my group
Out-of-Box Email Notifications 97

Change Type: EMAIL A comment has been added to a change request. The change.commented Change events
commented (to person assigned to the change request receives an email notification.
assignee)

Change Type: EMAIL A comment has been added to a change request. The change.commented Change events
commented assignment group assigned to the change request receives an email
(unassigned) notification.

Change Type: EMAIL Notification of a change in the fields label in a form. label.notify
Notification

Change rejected Type: EMAIL A change request has been rejected. change.rejected Change events and
task events

Change Task Type: EMAIL A work note has been added to a change task. The change_task.worknoted Change task
worknoted assignment group assigned to the change task receives an email events
(unassigned) notification.

Change Task Type: EMAIL A work note has been added to a change task. The person change_task.worknoted Change task
worknoted (to assigned to the change task receives an email notification. events
assignee)

Change Task Type: EMAIL A change task has been assigned to your group. change_task.assigned.to.group Change task
assigned to my events
group

Change Task Type: EMAIL A change task has been assigned to you. change_task.assigned Change task
assigned to me events

Change Type: EMAIL A work note has been added to a change request. The change.worknoted Change events
worknoted (to person assigned to the change request receives an email notification.
assignee)

Change Type: EMAIL A work note has been added to a change request. The change.worknoted Change events
worknoted assignment group assigned to the change request receives an email
(unassigned) notification.

Email assigned to Type: EMAIL An incident has been assigned to you (the recipient of the incident.assigned incident.events
email).

Email assigned to Type: EMAIL A task has been assigned to you (the recipient of the sc_task.assigned.to.user sc_task_events
(sc_task) email).

Note: This email notification was used for the legacy


Delivery Plan system of email notifications. In order to
use this email notification with a workflow, the
work_start field needs to be set by the workflow using a
Set Value activity.

Email assigned Type: EMAIL An incident has been assigned to an assignment group of incident.assigned.to.group incident events
To Group which you are a member (the recipient of the email).

Email assigned to Type: EMAIL A Service Catalog task has been assigned to an sc_task.assigned.to.group sc_task_events
group (sc_task) assignment group of which you are a member (the recipient of the
email).

Incident Closed Type: EMAIL An incident opened by you (the recipient of the email), incident.updated incident events
has been closed.

Incident Type: EMAIL An incident opened by you (the recipient of the email) incident.commented incident events
Commented has had comments added. This notification uses a template for an
employee self-service (ESS) user.

Incident Type: EMAIL An incident assigned to you (the recipient of the email) incident.commented incident events
Commented has had comments added. This notification uses a template for an ITIL
user.
Out-of-Box Email Notifications 98

Incident Opened Type: EMAIL An incident has been opened for you (the recipient of the incident.inserted incident events
email) by someone else. This notification uses a template for an
employee self-service (ESS) user.

Incident Opened Type: EMAIL An incident has been opened and is unassigned. This incident.inserted incident events
& Unassigned notification uses a template for an ITIL user.

Incident Resolved Type: EMAIL An incident opened by you has been resolved, and incident.updated incident events
feedback is required to determine if the incident should be closed.

Knowledge Type: EMAIL A contributors submission to the Knowledge Base was kb.submission.closed_created KB event
Closed Created accepted and an article was created.

Knowledge Type: EMAIL A contributors submission to the Knowledge Base was kb.submission.closed_duplicate KB event
Closed Duplicate determined to be a duplicate, and no article was created.

Knowledge Type: EMAIL A contributors submission to the Knowledge Base was kb.submission.closed_invalid KB event
Closed Invalid determined to be invalid (unusable).

Notify Change change.calendar.notify change events


Type: Meeting Invitation Notifies the recipients of the schedule for a
Calendar change request and exports the schedule to the Microsoft Outlook
[1]
calendar. The email is in the format of iCalendar formatted email

Notify Change Type: Meeting Invitation Notifies the recipients that a scheduled change change.calendar.notify.remove change events
Calendar Remove has been closed or assigned to someone else and removes the entry from

the Microsoft Outlook calendar. The email is in the format of iCalendar


[1]
formatted email

Problem Task Type: EMAIL A problem task has been assigned to you. problem_task.assigned Problem task
assigned to me events

Problem Task Type: EMAIL A problem task has been assigned to your group. problem_task.assigned.to.group Problem task
assigned to my events
group

Problem Task Type: EMAIL A work note has been added to a problem task. The problem_task.worknoted Problem task
worknoted (to person assigned to the problem task receives an email notification. events
assignee)

Problem Task Type: EMAIL A work note has been added to a problem task. The problem_task.worknoted Problem task
worknoted assignment group assigned to the problem task receives an email events
(unassigned) notification.

Problem Type: EMAIL A work note has been added to a problem. The person problem.worknoted Problem events
worknoted (to assigned to the problem receives an email notification.
assignee)

Problem Type: EMAIL A work note has been added to a problem. The problem.worknoted Problem events
worknoted assignment group assigned to the problem receives an email
(unassigned) notification.

Reminder Insert Type: Meeting Invitation Creates a calendar reminder regarding an open reminder.notify
[1]
task. The email is in the format of iCalendar formatted email

Reminder Insert reminder.notify.delete


Type: Meeting Invitation A task has been closed or deleted. This
notification removes the task reminder from Outlook. The email is in
[1]
the format of iCalendar formatted email

Reminder Insert Type: EMAIL Sends the recipient a reminder email about a specific reminder.notify.email
Email task.

Request Type: EMAIL A Service Catalog request, opened by the recipient, has sc_request.approved sc_request events
Approved been approved.

Request Assigned Type: EMAIL A Service Catalog request has been assigned to the sc_request.assigned sc_request events
recipient.
Out-of-Box Email Notifications 99

Request Type: EMAIL A Service Catalog request, opened by the recipient, has sc_request.updated sc_request events
Completed been completed.

Request Item Type: EMAIL An item requested from the Service Catalog has been sc_req_item.assigned sc_request events
Assigned assigned to you.

Request Item Type: EMAIL An item requested from the Service Catalog by the sc_req_item.delivery sc_request events
Delivery recipient is being delivered.

Request Opened Type: EMAIL A Service Catalog request has been opened on behalf of sc_request.requested_for sc_request events
on Behalf the recipient.

Reset Password Type: EMAIL The recipients password has been reset as requested. reset.password

Scheduled Import Type: EMAIL A scheduled import set has completed. scheduled_import_set.completed
Completed

System Upgraded Type: EMAIL The recipients ServiceNow system has been upgraded. system.upgraded

Task approved Type: EMAIL An ITIL task has been approved. task.approved Change events and
task events

Text Index Type: EMAIL A scheduled system index has completed. text_index.complete
Completed

Unscheduled Type: EMAIL A named configuration item has changed, and no active cmdb.unscheduled.change
Change change request exists.

Scripting for Email Notifications


[1]
Note: The latest release this documentation applies to is Fuji. For the Helsinki release, see Scripting for Email Notifications .
[2]
Documentation for later releases is also on docs.servicenow.com .

Overview
Mail scripts [1] allow for business rule-like scripting within an outbound email message. With mail scripts, you can
dynamically change the email output of your system based on different criteria. Mail scripts allow you to perform
simple tasks, such as displaying incident data, and complex ones, such as making advanced database queries.
Create mail scripts in System Policy > Email > Notification Email Script starting with the Eureka release. Then
add a ${mail_script:script name} embedded script tag to the body of the email notification [3] or
template [4], replacing script name with the name of the script you created. This makes it easy to use the same
scripts in multiple email notifications or templates.
Mail scripts are added directly in the Message field when creating email notifications or email templates in versions
prior to Eureka.
Scripting for Email Notifications 100

Using JavaScript in Emails


To embed JavaScript in the Email Notification form, use ${mail_script:script name}, and refer to the
notification script. To print text into the body of the message, use the template.print("a string")
function.

Parm1 and Parm2


The event.parm1 and event.parm2 parameters that come from the originating event can also be used within
the <mail_script>. To use these, enter event.parm1 or event.parm2 in the mail script.

Enabling Links to ServiceNow Records


Adding the special ${URI} parameter to an outbound email body or template creates a link to a specific
ServiceNow record. When a user clicks on the word LINK, the instance prompts the user to log in if not already
logged in, and then redirects the user to the record specified in the URI.
The ${URI} parameter has an extension called the ${URI+}
format to specify additional arguments in the email link, such as
sysparm terms, in addition to the automatically created URI. For
example:
Link displayed by ${URI} parameter

${URI+&sysparm_scriptlet=current.assigned_to=gs.getUserID()
&sysparm_scriptlet_condition=current.assigned_to.nil()
&sysparm_view=incident_active}

This example executes the JavaScript:

current.assigned_to=gs.getUserID()

when the condition of

current.assigned_to.nil()

is satisfied. Additionally, the script sets the view to incident_active.


Scripting for Email Notifications 101

Changing the Link Text


To show the display value of the record as the link text instead of the word LINK, use the ${URI_REF} parameter
instead of the ${URI} parameter.
For example, if the URL displays an incident record, the link text is the
incident number, which is the display value for incidents. If the URL
displays a user record, then the link text is the user name.

Link displayed by ${URI_REF} parameter

Linking to Related Records


A notification can link to a related record by specifying a reference field in front of the ${URI} or ${URI_REF}
parameters. Format the related record link as follows:
${<reference field that contains the related record you want to
display>.URI}
${<reference field that contains the related record you want to
display>.URI_REF}
For example:

Related Record to Provide Link to Notification record table Reference Field Samples

Related task record to be approved from an approval Approval Approval for ${sysapproval.URI}
notification [sysapproval_approver] [sysapproval] ${sysapproval.URI_REF}

Related problem record in an incident notification Incident Problem [problem_id] ${problem_id.URI}


${problem_id.URI_REF}

For example, the following notification template produces the email links in the picture below:

Click here to view Incident: ${URI_REF}


Click here to view Related Problem: ${problem_id.URI_REF}

Linking to Content Pages


Example related record links
You can create links to content management pages using the following
format:

${CMS_URI+<site>/<page>}
For example, to link the email recipient to a page called Incident in the content site ESS, with the current incident as
the target document, use the following format:
${CMS_URI+ess/incident_detail}
The resulting email URL has this format:
https://<instance
name>.service-now.com/ess/incident_detail.do?sysparm_document_key=incident,46e18c0fa9
Scripting for Email Notifications 102

Examples

Simple Text String


A simple text string is the most basic example of the way a mail script works. This script prints out "Incident number
- INC00001".

template.print("Incident number - " + current.number);

Summary of Requested Items


More advanced scripts, like the one below, can be found by browsing through the base system email templates.

template.print("Summary of Requested items:");


var gr = new GlideRecord("sc_req_item");
gr.addQuery("request", current.sysapproval);
gr.query();
while(gr.next()) {
var nicePrice = gr.price.toString();
if (nicePrice != ) {
nicePrice = parseFloat(nicePrice);
nicePrice = nicePrice.toFixed(2);
}
template.print(gr.number + ": " + gr.quantity + " X " +
gr.cat_item.getDisplayValue() + " at $" + nicePrice + " each");
template.print(" Options:");
for (key in gr.variables) {
var v = gr.variables[key];
if(v.getGlideObject().getQuestion().getLabel() != '') {
template.space(4);
template.print(' ' +
v.getGlideObject().getQuestion().getLabel() + " = " +
v.getDisplayValue());
}
}
}

Overriding Email Fields


To dynamically change field values within an email, use the following functions within <mail_script> syntax:

...
email.setFrom(current.caller_id.email);
email.setReplyTo("[email protected]");
email.setSubject("This is the new subject line");
email.setBody("This is the new body");
...
Scripting for Email Notifications 103

Attachments Sent in Notifications


Using the instance_name property ensures that the notification still works when migrated between instances.
dothis();

function dothis() {
var gr = new GlideRecord('sys_attachment');
gr.addQuery('table_sys_id',current.sys_id);
gr.query();
while (gr.next()) {
template.print('Attachment: <a href="https://' + gs.getProperty('instance_name') + '
.service-now.com/sys_attachment.do?sys_id=' + gr.sys_id +
'">' + gr.file_name + '</a>');
}
}

Adding CC and BCC Recipients


You can specify copied and blind copied recipients by using the email object within a mail script.

//email.addAddress(type, address, displayname);


email.addAddress("cc", "[email protected]","John Roberts");
email.addAddress("bcc", "[email protected]","John Roberts");

The following is an example script to add users from watch_list as copied recipients.

if (!current.watch_list.nil()) {
//get watch list addresses and add to cc
var watcherIds = current.watch_list.split(",");

//get user records


var user = new GlideRecord("sys_user");
user.addQuery("sys_id", watcherIds);
user.addQuery("notification", 2); //email
user.addQuery("email", "!=", "");
user.query();

while (user.next()) {
//add to cc list
email.addAddress("cc", user.email, user.getDisplayValue());
}
}
Scripting for Email Notifications 104

Mail Script API


The following variables are available when processing mail_script scripts.

Variable Object Description

template Handles printing from the mail script to the email message.
template.print("message"); //outputs message to the email body.
template.space("number of spaces"); //outputs spaces to the email body.

email_action GlideRecord object for the email notification (sysevent_email_action).

event GlideRecord object for the event that fired the notification (sysevent).

email EmailOutbound object


Available methods:
addAddress(String type, String address, String displayname): type can be cc or bcc.
setFrom(String address): override the sender address.
setReplyTo(String address): override the reply to address.
setSubject(String subject): override the subject of the message.
setBody(String message): override the body of the message.
The email address that is passed by setFrom and setReplyTo needs to be in a valid form such as '[email protected]' or 'Display
Name <[email protected]>'. If the email address includes a 'Display Name', then that value overrides the instance's display name.

References
[1] https:/ / docs. servicenow. com/ bundle/ helsinki-servicenow-platform/ page/ script/ server-scripting/ concept/
c_ScriptingForEmailNotifications. html
[2] http:/ / docs. servicenow. com
[3] https:/ / docs. servicenow. com/ bundle/ helsinki-servicenow-platform/ page/ administer/ notification/ reference/ notifications. html
[4] https:/ / docs. servicenow. com/ bundle/ helsinki-servicenow-platform/ page/ administer/ notification/ concept/ c_EmailTemplates. html
Article Sources and Contributors 105

Article Sources and Contributors


System Mailboxes Source: http://wiki.servicenow.com/index.php?oldid=243717 Contributors: CapaJC, Fuji.publishing.user, G.yedwab, Guy.yedwab, Joseph.messerschmidt, Peter.smith,
Rachel.sienko, Steven.wood, Vhearne

Notifications Source: http://wiki.servicenow.com/index.php?oldid=249064 Contributors: CapaJC, Emily.partridge, Fuji.publishing.user, G.yedwab, George.rawlins, Ishrath.razvi, Joe.Westrich,
Joe.zucker, Joseph.messerschmidt, Phillip.salzman, Publishing.user, Rachel.sienko, Steven.wood

Configuring Email Properties Source: http://wiki.servicenow.com/index.php?oldid=74619 Contributors: Aburruss, CapaJC, Cheryl.dolan, David Loo, David.Bailey, Don.Goodliffe,
Emily.partridge, Fuji.publishing.user, G.yedwab, Guy.yedwab, Joseph.messerschmidt, Neola, Phillip.salzman, Rachel.sienko, Steven.wood, Suzanne.smith, Vaughn.romero, Vhearne, Wallymarx

Enabling the Email Client Source: http://wiki.servicenow.com/index.php?oldid=249055 Contributors: CapaJC, Chuck.tomasi, David Loo, Don.Goodliffe, Emily.partridge, Fuji.publishing.user,
G.yedwab, Guy.yedwab, Jay.berlin, Jessi.graves, Joseph.messerschmidt, Phillip.salzman, Rachel.sienko, Steven.wood, Suzanne.smith, Vaughn.romero, Vhearne

Events and Email Notification Source: http://wiki.servicenow.com/index.php?oldid=247121 Contributors: CapaJC, Chuck.tomasi, Emily.partridge, G.yedwab, Grant.hulbert, Guy.yedwab,
Ishrath.razvi, Jgrinter, Joe.Westrich, Joseph.messerschmidt, Mark.stanger, Neola, Phillip.salzman, Rachel.sienko, Steven.wood, Vaughn.romero, Vhearne

Email Notifications Source: http://wiki.servicenow.com/index.php?oldid=249105 Contributors: Bow, CapaJC, Cheryl.dolan, Christen.mitchell, David Loo, Emily.partridge,
Fuji.publishing.user, G.yedwab, Gareth.robertson, Grant.hulbert, Guy.yedwab, Ishrath.razvi, Jay.berlin, Jerrod.bennett, Jessi.graves, Joe.Westrich, John.roberts, Joseph.messerschmidt,
Myla.jordan, Neola, Pat.Casey, PaulMorrison, Peter.smith, Phillip.salzman, Publishing.user, Rachel.sienko, Ray.lee, Richard.motteram, Rob.woodbyrne, Steven.wood, Suzanne.smith,
Vaughn.romero, Vhearne

Email Templates Source: http://wiki.servicenow.com/index.php?oldid=244612 Contributors: Emily.partridge, Fuji.publishing.user, G.yedwab, Guy.yedwab, Joe.zucker, Joseph.messerschmidt,
Mark.stanger, Neola, Publishing.user, Rachel.sienko, Steven.wood, Suzanne.smith, Vaughn.romero

Notification Examples Source: http://wiki.servicenow.com/index.php?oldid=247587 Contributors: G.yedwab, Joseph.messerschmidt, Phillip.salzman, Rachel.sienko, Steven.wood,
Vaughn.romero

Subscription Based Notifications Plugin Source: http://wiki.servicenow.com/index.php?oldid=82800 Contributors: CapaJC, Dawn.bunting, Dkearney, Emily.partridge, Fuji.publishing.user,
G.yedwab, Gadi.yedwab, Guy.yedwab, Ishrath.razvi, Jerrod.bennett, Jessi.graves, Joseph.messerschmidt, Mark.stanger, Phillip.salzman, Publishing.user, Rachel.sienko, Steven.wood,
Vaughn.romero, Vhearne

Setting Up Subscription Based Notifications Source: http://wiki.servicenow.com/index.php?oldid=247869 Contributors: Annmarie, Emily.partridge, Fuji.publishing.user, G.yedwab,
John.roberts, Joseph.messerschmidt, Phillip.salzman, Rachel.sienko, Roy.lagemann, Steven.wood

Using Subscription Based Notifications Source: http://wiki.servicenow.com/index.php?oldid=247947 Contributors: Emily.partridge, Fuji.publishing.user, G.yedwab, Guy.yedwab,
Ishrath.razvi, Joe.Westrich, Joe.zucker, Joseph.messerschmidt, Kenny.gabel, Peter.smith, Phillip.salzman, Rachel.sienko, Roy.lagemann, Steven.wood

Inbound Email Actions Source: http://wiki.servicenow.com/index.php?oldid=249709 Contributors: Anat.kerry, Bsweetser, CapaJC, Cheryl.dolan, David Loo, David.Bailey, Emily.partridge,
Fuji.publishing.user, G.yedwab, Gflewis, Grant.hulbert, Guy.yedwab, Jessi.graves, Joe.Westrich, John.roberts, Joseph.messerschmidt, Julie.phaviseth, Nick.roberts, Peter.smith, Phillip.salzman,
Publishing.user, Rachel.sienko, Steven.wood, Suzanne.smith, Vaughn.romero, Vhearne

Examples of Inbound Email Actions Source: http://wiki.servicenow.com/index.php?oldid=247462 Contributors: G.yedwab, Guy.yedwab, Joseph.messerschmidt, Neola, Phillip.salzman,
Rachel.sienko, Steven.wood, Vaughn.romero

Out-of-Box Email Notifications Source: http://wiki.servicenow.com/index.php?oldid=145192 Contributors: David Loo, G.yedwab, Guy.yedwab, Joe.Westrich, Joseph.messerschmidt, Neola,
Rachel.sienko, Steven.wood, Suzanne.smith, Vaughn.romero

Scripting for Email Notifications Source: http://wiki.servicenow.com/index.php?oldid=249894 Contributors: Anat.kerry, CapaJC, David Loo, Emily.partridge, G.yedwab, George.rawlins,
Guy.yedwab, Jerrod.bennett, Jessi.graves, Joe.Westrich, Joe.zucker, Joey.mart, John.roberts, Joseph.messerschmidt, Mark.stanger, Myla.jordan, Neil.narvaez, Neola, Phillip.salzman,
Rachel.sienko, Rob.woodbyrne, Steven.wood, Vaughn.romero, Vhearne, Voytek.blonski
Image Sources, Licenses and Contributors 106

Image Sources, Licenses and Contributors


Image:SystemMailboxes1.png Source: http://wiki.servicenow.com/index.php?title=File:SystemMailboxes1.png License: unknown Contributors: CapaJC, Steven.wood
Image:Warning.gif Source: http://wiki.servicenow.com/index.php?title=File:Warning.gif License: unknown Contributors: CapaJC
Image:email_configuration_standard.png Source: http://wiki.servicenow.com/index.php?title=File:Email_configuration_standard.png License: unknown Contributors: Vaughn.romero
Image:email_configuration_standard_custom_email.png Source: http://wiki.servicenow.com/index.php?title=File:Email_configuration_standard_custom_email.png License: unknown
Contributors: Vaughn.romero
Image:email_configuration_custom_smtp.png Source: http://wiki.servicenow.com/index.php?title=File:Email_configuration_custom_smtp.png License: unknown Contributors:
Vaughn.romero
Image:email_configuration_custom_pop.png Source: http://wiki.servicenow.com/index.php?title=File:Email_configuration_custom_pop.png License: unknown Contributors: Vaughn.romero
Image:email_configuration_custom_smtp_and_pop.png Source: http://wiki.servicenow.com/index.php?title=File:Email_configuration_custom_smtp_and_pop.png License: unknown
Contributors: Vaughn.romero
Image:Email Client Dictionary Entry.gif Source: http://wiki.servicenow.com/index.php?title=File:Email_Client_Dictionary_Entry.gif License: unknown Contributors: Steven.wood,
Vaughn.romero
Image:Email client3.png Source: http://wiki.servicenow.com/index.php?title=File:Email_client3.png License: unknown Contributors: CapaJC, Don.Goodliffe, Peter.smith, Vaughn.romero
Image:Email client4.png Source: http://wiki.servicenow.com/index.php?title=File:Email_client4.png License: unknown Contributors: CapaJC, Don.Goodliffe, Vaughn.romero
Image:email_client_toolbar.png Source: http://wiki.servicenow.com/index.php?title=File:Email_client_toolbar.png License: unknown Contributors: Vaughn.romero
Image:email_client_autocomplete_01.png Source: http://wiki.servicenow.com/index.php?title=File:Email_client_autocomplete_01.png License: unknown Contributors: Vaughn.romero
Image:email_client_window_from_template.png Source: http://wiki.servicenow.com/index.php?title=File:Email_client_window_from_template.png License: unknown Contributors:
Vaughn.romero
Image:EmailClient2.png Source: http://wiki.servicenow.com/index.php?title=File:EmailClient2.png License: unknown Contributors: CapaJC, Fuji.publishing.user
Image:email_client_autocomplete_02.png Source: http://wiki.servicenow.com/index.php?title=File:Email_client_autocomplete_02.png License: unknown Contributors: Vaughn.romero
Image:EmailClient3.png Source: http://wiki.servicenow.com/index.php?title=File:EmailClient3.png License: unknown Contributors: Jay.berlin, Vaughn.romero
Image:email_properties_from_address.png Source: http://wiki.servicenow.com/index.php?title=File:Email_properties_from_address.png License: unknown Contributors: Vaughn.romero
Image:Email from0.png Source: http://wiki.servicenow.com/index.php?title=File:Email_from0.png License: unknown Contributors: Don.Goodliffe, Guy.yedwab
Image:Email from3.png Source: http://wiki.servicenow.com/index.php?title=File:Email_from3.png License: unknown Contributors: CapaJC, Don.Goodliffe, Vaughn.romero
Image:email_client_reply_to.png Source: http://wiki.servicenow.com/index.php?title=File:Email_client_reply_to.png License: unknown Contributors: Vaughn.romero
Image:quick_message.png Source: http://wiki.servicenow.com/index.php?title=File:Quick_message.png License: unknown Contributors: Phillip.salzman, Vaughn.romero
Image:Incident Events.png Source: http://wiki.servicenow.com/index.php?title=File:Incident_Events.png License: unknown Contributors: Steven.wood
Image:Change Request Global.gif Source: http://wiki.servicenow.com/index.php?title=File:Change_Request_Global.gif License: unknown Contributors: Steven.wood
image:Email_notification_id.png Source: http://wiki.servicenow.com/index.php?title=File:Email_notification_id.png License: unknown Contributors: Maintenance script, Publishing.user
Image:Caution-diamond.png Source: http://wiki.servicenow.com/index.php?title=File:Caution-diamond.png License: unknown Contributors: John.roberts, Publishing.user
Image:email_notification_when.png Source: http://wiki.servicenow.com/index.php?title=File:Email_notification_when.png License: unknown Contributors: Emily.partridge, Publishing.user,
Vaughn.romero
Image:weight_notifications.png Source: http://wiki.servicenow.com/index.php?title=File:Weight_notifications.png License: unknown Contributors: Publishing.user, Vaughn.romero
Image:advanced_condition.png Source: http://wiki.servicenow.com/index.php?title=File:Advanced_condition.png License: unknown Contributors: Maintenance script, Publishing.user,
Vaughn.romero
Image:email_notification_who.png Source: http://wiki.servicenow.com/index.php?title=File:Email_notification_who.png License: unknown Contributors: Emily.partridge, Publishing.user,
Vaughn.romero
Image:email_notification_what_v2.png Source: http://wiki.servicenow.com/index.php?title=File:Email_notification_what_v2.png License: unknown Contributors: Maintenance script,
Publishing.user
image:Unconverted.png Source: http://wiki.servicenow.com/index.php?title=File:Unconverted.png License: unknown Contributors: Maintenance script, Publishing.user
image:Converted.png Source: http://wiki.servicenow.com/index.php?title=File:Converted.png License: unknown Contributors: Maintenance script, Publishing.user
image:Invalid_Mail_Script.png Source: http://wiki.servicenow.com/index.php?title=File:Invalid_Mail_Script.png License: unknown Contributors: Maintenance script, Publishing.user
image:Newlines_to_HTML.png Source: http://wiki.servicenow.com/index.php?title=File:Newlines_to_HTML.png License: unknown Contributors: Maintenance script, Publishing.user
image:HTML_source_editor.png Source: http://wiki.servicenow.com/index.php?title=File:HTML_source_editor.png License: unknown Contributors: Maintenance script, Publishing.user
Image:emailURI.jpg Source: http://wiki.servicenow.com/index.php?title=File:EmailURI.jpg License: unknown Contributors: Publishing.user, Vaughn.romero
Image:emailURIREF.jpg Source: http://wiki.servicenow.com/index.php?title=File:EmailURIREF.jpg License: unknown Contributors: Publishing.user, Vaughn.romero
Image:related_record_link.png Source: http://wiki.servicenow.com/index.php?title=File:Related_record_link.png License: unknown Contributors: Publishing.user, Vaughn.romero
Image:Watermark_Prefix.png Source: http://wiki.servicenow.com/index.php?title=File:Watermark_Prefix.png License: unknown Contributors: Maintenance script, Publishing.user,
Steven.wood
Image:Change Risk Template Callout.png Source: http://wiki.servicenow.com/index.php?title=File:Change_Risk_Template_Callout.png License: unknown Contributors: Maintenance script,
Steven.wood
image:Template_not_converted.png Source: http://wiki.servicenow.com/index.php?title=File:Template_not_converted.png License: unknown Contributors: Maintenance script
image:Template_converted.png Source: http://wiki.servicenow.com/index.php?title=File:Template_converted.png License: unknown Contributors: Maintenance script
Image:import_export_maps.png Source: http://wiki.servicenow.com/index.php?title=File:Import_export_maps.png License: unknown Contributors: Vaughn.romero
Image:icalendar_change_request_mappings.png Source: http://wiki.servicenow.com/index.php?title=File:Icalendar_change_request_mappings.png License: unknown Contributors:
Vaughn.romero
Image:import_export_field_map.png Source: http://wiki.servicenow.com/index.php?title=File:Import_export_field_map.png License: unknown Contributors: Vaughn.romero
Image:Reminder1.png Source: http://wiki.servicenow.com/index.php?title=File:Reminder1.png License: unknown Contributors: CapaJC, Steven.wood
Image:Reminder2.png Source: http://wiki.servicenow.com/index.php?title=File:Reminder2.png License: unknown Contributors: CapaJC, Steven.wood
Image:Reminder3.png Source: http://wiki.servicenow.com/index.php?title=File:Reminder3.png License: unknown Contributors: CapaJC, Steven.wood
image:event registry.gif Source: http://wiki.servicenow.com/index.php?title=File:Event_registry.gif License: unknown Contributors: CapaJC
image:business rule to to assigned.gif Source: http://wiki.servicenow.com/index.php?title=File:Business_rule_to_to_assigned.gif License: unknown Contributors: CapaJC
image:email notification.gif Source: http://wiki.servicenow.com/index.php?title=File:Email_notification.gif License: unknown Contributors: CapaJC
image:email setup.gif Source: http://wiki.servicenow.com/index.php?title=File:Email_setup.gif License: unknown Contributors: CapaJC
Image:InboundEmailActions2.png Source: http://wiki.servicenow.com/index.php?title=File:InboundEmailActions2.png License: unknown Contributors: CapaJC, Steven.wood,
Vaughn.romero
Image:InboundEmailActions3.png Source: http://wiki.servicenow.com/index.php?title=File:InboundEmailActions3.png License: unknown Contributors: CapaJC, Publishing.user,
Steven.wood, Vaughn.romero
Image:InboundEmailActions4.png Source: http://wiki.servicenow.com/index.php?title=File:InboundEmailActions4.png License: unknown Contributors: CapaJC, Steven.wood
Image:Incident Email Notification2.png Source: http://wiki.servicenow.com/index.php?title=File:Incident_Email_Notification2.png License: unknown Contributors: Steven.wood
Image:Email Sent.png Source: http://wiki.servicenow.com/index.php?title=File:Email_Sent.png License: unknown Contributors: Steven.wood
Image Sources, Licenses and Contributors 107

Image:user_notificationsUI15.png Source: http://wiki.servicenow.com/index.php?title=File:User_notificationsUI15.png License: unknown Contributors: Phillip.salzman


Image:Notification Preferences New1.png Source: http://wiki.servicenow.com/index.php?title=File:Notification_Preferences_New1.png License: unknown Contributors: Steven.wood
Image:mandatory_preference.png Source: http://wiki.servicenow.com/index.php?title=File:Mandatory_preference.png License: unknown Contributors: Phillip.salzman
Image:Notification_Device_Cell.png Source: http://wiki.servicenow.com/index.php?title=File:Notification_Device_Cell.png License: unknown Contributors: Fuji.publishing.user,
Steven.wood
Image:Notification_Service_Provider.png Source: http://wiki.servicenow.com/index.php?title=File:Notification_Service_Provider.png License: unknown Contributors: Fuji.publishing.user,
Steven.wood
Image:Notification_Condition2.png Source: http://wiki.servicenow.com/index.php?title=File:Notification_Condition2.png License: unknown Contributors: Fuji.publishing.user, Steven.wood
Image:Notification_Filter2.png Source: http://wiki.servicenow.com/index.php?title=File:Notification_Filter2.png License: unknown Contributors: Fuji.publishing.user, Steven.wood
Image:New_Device.png Source: http://wiki.servicenow.com/index.php?title=File:New_Device.png License: unknown Contributors: Phillip.salzman
Image:Notification_Adding.png Source: http://wiki.servicenow.com/index.php?title=File:Notification_Adding.png License: unknown Contributors: Fuji.publishing.user, Steven.wood
Image:inbound_email_action_Eureka.png Source: http://wiki.servicenow.com/index.php?title=File:Inbound_email_action_Eureka.png License: unknown Contributors: Maintenance script,
Publishing.user
Image:inbound_email_action_type.png Source: http://wiki.servicenow.com/index.php?title=File:Inbound_email_action_type.png License: unknown Contributors: Peter.smith,
Publishing.user, Vaughn.romero
Image:create_users_from_email.png Source: http://wiki.servicenow.com/index.php?title=File:Create_users_from_email.png License: unknown Contributors: Publishing.user, Vaughn.romero
Image:trusted_domains.png Source: http://wiki.servicenow.com/index.php?title=File:Trusted_domains.png License: unknown Contributors: Publishing.user, Vaughn.romero
Image:JavaScript in Templates.png Source: http://wiki.servicenow.com/index.php?title=File:JavaScript_in_Templates.png License: unknown Contributors: Maintenance script, Steven.wood

You might also like