Enhancing Notification Content

Notification content can be generated in process scripts. However, in this context the recipient is often not available; as a result, generated content must be generic to all recipients. If content specific to the recipient is required, xMatters allows for the definition of a presentation script to enhance content. At this point, content generation can include things such as the recipient name or time zone. The following figure illustrates the part of the event flow in which content can be enhanced:

This section describes these scripting contexts.

Script Inputs

The presentation script inputs are:

Script Package Structure

Script Packages can contain multiple presentation scripts. A presentation script can be used to create content for multiple notifications.

Execution Context

Presentation scripts are executed during the notification process. They provide the ability for users to customize the notification content for a specified recipient. The execution of this script will occur when generating content for Devices, Users (voice, browser) and Groups (voice, browser). The content generated overrides content that is created in the notification during the Process Event stage.

The content script object contains a number of script variables that are used when sending a notification to a Device:

Other variables may be used depending on the Device type; for a complete list, see Content Object.

Example

Example: Enhancing Content Based on Device Type

This example initiates the main business process to continue upon the receipt of a successful delivery event:

1   main:

2   IF ($content.deviceclassification == "email")

3      $content.message = "Hello Email World!"

4      $content.subject = “Hello World”

5   ELSE-IF ($content.deviceclassification == "text_pager")

6      $content.message = "Hello Pager World!"

7   ELSE-IF ($content.deviceclassification == "browser")  

8      $content.message = "Hello Browser World!"

9   ENDIF

Annotation:

2.  Based upon the inputted content script object, determines the type of Device for which to generate content. In this example, the script is checking for “email”.

3.  Customizes the message that is sent to an Email Device.

4.  Email Device engines can process additional content fields such as “subject”.

5.  Checks for Text Pager Devices

6.  Customizes the message that is sent to a Text Pager Device.

7.  Checks for “browser” Devices. Browser Device content is displayed to the user when they login to the web site.

8.  Customizes the browser message.

There is a cost to defining presentation scripts. For example, when working with a large Group; if a presentation script is not defined, content generation occurs only once. If a presentation script is defined, content generation occurs many times depending on the number of Users in the Group and which Devices Group members possess. For this reason, it is recommended that if high throughput is a priority for a particular deployment, presentation scripts should be used infrequently.

 

Next topic: Outbound Voice Scripting