You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 45 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:

  1. Navigate to the System Notification - Notification;
  2. Click New, fill in the form and click Save.

Role required: notification_admin.

Notification rules form fields

FieldDescription
NameDisplayed notification name.
TableChoose the target table for notifications. For example, if you are creating a notification for some Incident, then select the Incident table.
ActiveSelect this checkbox if you need to activate this notification.
When to Send tab
ConditionIn 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.
InsertedSelect this checkbox to send the notification when a record is inserted into the table specified in the Table field.
UpdatedSelect this checkbox to send the notification when a record is updated in the table specified in the Table field.
EventEvent 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.
Send when

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 above),

Who Will Receive tab
UsersIn this field, you can list the users who will receive the notification within this rule.
OtherIn this field, you can add contacts to subscribe to the incident activities. It can be email-addresses separated by semicolon (for example, user@domain.com; example@example.com, or it can be defined by notification variables.
Send self

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:

  1. Emails with no recipient address populated (the To field is empty) are created with the Ignored state.
  2. A notification rule meeting the following criteria will create an email with the Ignored state:
    1. Send self attribute= False.
    2. The letter has one recipient, and he is a caller for this notification as well.
What Will Contain tab
SubjectThe displayed notification subject. Notification variables and placeholders are supported there.
MessageThe notification body in plain text. Notification variables and placeholders are supported there.
Message HTML

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


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:

  1. Navigate to the System Notification → Notification Templates;
  2. Click New, fill in the form and then click Save.

Notification template form fields

FieldDescription
NameDisplayed notification template name.
Subject

Notification template subject. Notification variables and placeholders are supported there.

TableIf the table is specified, then the template will be applicable only for this table; otherwise, it will be applicable for all tables.
Message HTML

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 textThe 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

VariableDescriptionExample
${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}

Display 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} Output: Click here to view the issue: https://api.simpleone.ru

${URI_REF} Source: Click here to view the inquiry ${URI_REF}

${URI_REF} Output: Click here to view the inquiry: INQ0005555

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 or template body. This makes it easy to use the same scripts in multiple email notifications or templates.

To create an email script, please complete the steps below:

  1. Navigate to System Notification → Notification Scripts;
  2. Click New, fill in the fields and click Save.

Notification Scripts form fields

FieldDescription
NameDesirable script name for later usage in notifications and templates.
ScriptEnter the mail script using SimpleOne server-side API, particularly, the SimpleEmailOutbound and SimpleTemplatePrinter classes.

  • No labels