Skip to content

Notification scripts

Introduction to notification scripts

Administrators can create email notifications to announce events and send status reports automatically. Some of these notifications may benefit from the use of scripts to split arrays or perform calculations on data within the system.

Scripts created in this module are referenced with a short variable in the body of a notification, e.g. ${script__scriptname}. This system keeps the body of notifications tidier and easier to read.

Administration > Notifications > Notification Scripts will take you to the Manage Notification Scripts page, which displays a list view of all scheduled notifications.

Table 1: List view contents

Columns Description
Title Title of the notification script
Description Description of the script
Data Model Data model the script references
Created Date Date the script was created
Last Updated Date the script was last updated

Create a new notification script

  1. Navigate to Administration > Notifications > Notification Scripts
  2. Click Create Notification Script
  3. Fill in the following and click Create:

Table 2: New notification script properties

Field Description
Title Title of the script. Title will show wherever the script appears in the UI.
Name Reference name for queries and scripts. The name can contain only letters, numbers, and underscores.
Description Description of the script. Description is searchable from the list view search bar.
Data Model Data model the script references.
Script Groovy script for use in a notification. Scripts can be used in the body of notifications that use the same data model as the script.

Scripts can also include HTML structure for the notification.
Accessible From Specifies whether this script will be available to all Brinqa applications or only the application you are currently administrating.

Using scripts

To use a script in a notification, the notification must reference the same data model the script was created with.

Above each message field, there will be a drop down menu labeled "Select notification script". From this drop down menu, select the script to be used in your notification. The script name will appear in the body of the message as a variable, ${script__scriptname}.

Place the script wherever its contents should appear in the message.

Edit or delete a notifcation script

Existing notification scripts can be edited or deleted by clicking the Actions button that appears to the right on mouseover of the entry on the list view.