Notification variables

Use notification variables to display dynamic information in the body of a notification such as a field value, a link to a record, or a link to system preferences.

Syntax

Specify a notification variable using this syntax:

${variable-name+variable-parameters}

The variable-name portion is always required. Not all notification variables support the variable-parameters portion. When available, most variable parameters are optional. See the list of available notification variables for variable names and available parameters.

Available variables

The system provides these notification variables.

Table 1. Available notification variables
Variable Description Available parameters Example
${field-name} Display the value of the specified field. None

Source: Incident ${number} - comments added

Output: Incident INC1000001 - comments added

${image-field-name} Display an image associated with a record. This variable is typically used with HTML to specify the source of an image element. None

Source: <img src='${picture}?t=medium'/>

Output:
  • ${URI}
  • ${URI_REF}
Display a link to the current record.
  • URI: The link text is the word LINK.
  • URI_REF: The link text is the display value of the record.
Any valid sysparm URL parameter. For example:
  • sysparm_scriptlet
  • sysparm_view

${URI} Source: Click here to view incident: ${URI}

${URI} Output:

${URI_REF} Source: Click here to view incident: ${URI_REF}

${URI_REF} Output:
  • ${reference-field.URI}
  • ${reference-field.URI_REF}
Display a link to the record listed in a reference field.
  • URI: The link text is the word LINK
  • URI_REF: The link text is the display value of the record.
Any valid sysparm URL parameter. For example:
  • sysparm_scriptlet
  • sysparm_view
Source:
Click here to view Incident: ${URI_REF}
Click here to view Related Problem: ${problem_id.URI_REF}
Output:
${CMS_URI} Display a link to the specified record within a CMS page. <CMS-site>/<CMS-page>: The required relative path to the CMS page.

Source: ${CMS_URI+ess/incident_detail}

Output: a link to a target CMS page such as https://<instance name>.service-now.com/ess/incident_detail.do?sysparm_document_key=incident,46e18c0fa9fe19810066a0083f76bd56

${notification:body} Display the body contents of an email template or email notification. Use this notification variable to specify where to display body content in an email layout. None
Source:
Output:
${mail_script:script-name} Run the specified mail script. None
${NOTIF_UNSUB} Display a link unsubscribe from this notification. link_text: specify the text to display as a link within quotation marks.
${NOTIF_PREFS} Display a link to set notification preferences. link_text: specify the text to display as a link within quotation marks.