You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 55 Next »
Notification rules
Notification rules are used when you need to set up notification sending rules, depending on various conditions, or in the case of the event happened.
You can create new notification rules, or modify existing ones. To create a notification rule, please complete the steps below:
- Navigate to the System Notification - Notification Rules.
- Click New and fill in the form.
- Click Save or Save and Exit to apply changes.
Role required: notification_admin.
Notification rules form fields
Field | Mandatory | Description |
---|---|---|
Name | Y | Displayed notification name. |
Table | Y | Choose the target table for notifications. For example, if you are creating a notification for some Incident, then select the Incident table. |
Active | N | Select this checkbox if you need to activate this notification rule. |
Inherited | N | Select this checkbox if this notification rule should be applied to child tables of the selected table. For example, if you select the Task table, then this rule applies to the Incident, Problem, Change Request and other child tables of this table. |
When to Send tab | ||
Condition | N | In this field, you can specify a condition to meet before sending the notification. Use the Condition Builder to build a filter that will fit your needs the best. |
Send when | Y | The option-driven field providing the choice when the notification should be sent. Available choice options: Record inserted or updated - when choosing this option, notification will be sent after record inserting or updating in the table specified. Relevant checkboxes must be marked. Event is fired - when choosing this option, notification will be sent after an event is fired (see below), |
Inserted | N | Select this checkbox to send the notification when a record is inserted into the table specified in the Table field. |
Updated | N | Select this checkbox to send the notification when a record is updated in the table specified in the Table field. |
Event | Y | Event is a special record used by the system to log when specified conditions met and to take some kind of action in response to the conditions. This field appears when the Event is fired option is selected in the Send when field. |
Who Will Receive tab | ||
Users | N | In this field, you can list the users who will receive the notification within this rule. |
Other | N | In this field, you can add contacts to subscribe to the incident activities. It can be email-addresses separated by semicolon or comma (for example, user@domain.com; example@example.com, test@example.com), or it can be defined by notification variables. |
Send self | N | Select this checkbox to send the notification to the person who initiate notification sending if the person in recipient list. There are some nuances about this functionality:
|
What Will Contain tab | ||
Subject | N | The displayed notification subject. Notification variables and placeholders are supported there. |
Message | N | The notification body in plain text. Notification variables and placeholders are supported there. |
Message HTML | N | The notification template in rich-text format. This field supports HTML tags, placeholders, notification variables. You can also use notification variables ${URI} and ${URI_REF} there. Their usage is described below. |
Notification template | N | Select relevant notification template from the list. |
Notification template
Notification templates are beneficial to pattern the notification process, being a very flexible tool; they provide a possibility to develop templates for different tasks and cases.
To create a notification template, please complete the steps below:
- Navigate to the System Notification → Notification Templates.
- Click New and fill in the form.
- Click Save or Save and Exit to apply changes.
Notification template form fields
Field | Mandatory | Description |
---|---|---|
Name | Y | Displayed notification template name. |
Subject | Y | Notification template subject. Notification variables and placeholders are supported there. |
Table | Y | If the table is specified, then the template will be applicable only for this table; otherwise, it will be applicable for all tables. |
Message HTML | N | The notification template in rich-text format. This field supports HTML tags, placeholders, notification variables. You can also use notification variables ${URI} and ${URI_REF} there. Their usage is described below. |
Message text | N | The notification template in plain text format. Notification variables and placeholders are supported there. |
Notification variables
Specify a notification variable using this syntax:
${variable-name.variable-parameters}
Notification variables form fields
Variable | Description | Example |
---|---|---|
${current} | This variable refers to the current record in the table specified. | ${current.caller} - for example, if this variable was used in the Notification Rule in the Other field in the Who will receive tab, then the notification will be sent to the caller (the originator of the issue). |
${script} | This variable runs the specified mail script developed by using the Notification Scripts functionality. | ${script:add_an_attachment} |
${template} | This variable is used to link the notification template table (sys_notification_template) and the notification rule table (sys_notification_rule). When using it, you can stuff the template fields to the relevant notification rule fields. | ${template.template_name} - for example, if this variable was used in the Subject field, then the subject line stored in the template will be applied to the relevant field. |
${URI} ${URI_REF} | Displays a link to the record. URI: The link text is the unclickable link to the record. URI_REF: The link text is the display value of the record. | ${URI} Source: Click here to view the issue: ${URI} ${URI_REF} Source: Click here to view the inquiry ${URI_REF} |
Scripting for notifications
Email scripts allow for business rule-like scripting within an outbound email message.
With them, you can change the email output of your system based on various criteria, Mail scripts allow performing simple tasks, such as displaying issue data, and the complex ones, like making advanced DB queries,
Add a ${script:script_name} embedded script tag to the notification rule or to related template record body. The fields below are available for the script embedding:
- Subject
- Message
- Message (HTML)
- Other
Adding embedded script tag allows using the same scripts in multiple email notifications or templates.
To create a notification script, please complete the steps below:
- Navigate to System Notification → Notification Scripts.
- Click New and fill in the form.
- Click Save or Save and Exit to apply changes.
Notification Scripts form fields
Field | Mandatory | Description |
---|---|---|
Name | Y | Desirable script name for later usage in notifications and templates. |
Script | Y | Enter the mail script using SimpleOne server-side API, particularly, the SimpleEmailOutbound and SimpleTemplatePrinter classes. |
To locate where notification scripts are used, perform search against the version list. For this, please complete the steps below:
- Navigate to Configuration Pack → Records.
- Click on the funnel icon on the top to open the Condition Builder.
- Create a filter containing the conditions listed below:
- JSON Copy CONTAINS script:script_name
- Table Name IS NOT sys_notification_script
- Is Current IS Yes.
In step 3a, specify your script name after the "script:" declaration. For example, "script:stop_notifications".
The selection example is given on the screenshot below.
- No labels