Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Notification

Notification keep you updated on new records, changes, and specific events. Customize notifications to your needs.

SimpleOne has a set of out-of-the-box notifications: see the Available Notifications article to learn about them.

rules

Notification rules are used when you need to set up notification sending rules, depending on various conditions, or in case of the event happenedset up in such a way that when conditions are met or some event happens, the emails are sent to interested parties.

You can create new notification rules, or modify existing ones. 

Tip

Role required: notification_admin.

Create a rule


To create a notification rule, please complete the steps below:

  1. Navigate to the System Notification → Notification Rules.
  2. Click New and fill in the fields.
  3. Click Save or Save and Exitexit to apply the changes.
Info

You can also create a notification rule through a form or a related list:

  1. Open the hamburger burger-menu .
  2. Proceed to Select Configure → Notification Rules.
  3. Click New and fill in the fields.
  4. Click Save or Save and Exitexit to apply changes.

Use case

We need to configure a basic notification for the Employee table, which implements the following logic:

  • When a new employee is added, all employees receive a notification.

We create a notification rule as below:

Notification Rule form fields

company-group@example.com 

FieldMandatoryDescription
NameYSpecify a notification rule name.
TableYSelect the target table for notifications. For example, to create a notification for some incidents, select the Incident table.
ActiveNSelect this checkbox to activate the notification rule.
InheritedNSelect this checkbox to apply this notification rule to child tables of the selected table. For example, if you select the Task table, this rule is also applied to the Incident, Problem, and other child tables of this table.
FieldValue
NameNew employee
TableEmployee
Active

True

When to Send tab
Send whenY

Specify when the notification should be sent. Available choice options:

  • Record inserted or updated – notification is sent after record inserting or updating in the table specified. Select the relevant checkboxes.
  • Event is fired – notification is sent after an event is fired.
InsertedTrue
Who will Receive
Other recipients
Tooltip
onlyIcontrue
appendIconinfo-filled
iconColorblue

This address represents a mailing list.

What will ContainSubjectNew employee in the ${current.department} departmentMessage${current.display_name} is in our team!

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 and fill in the fields.
  3. Click Save or Save and Exit to apply changes.

Notification variables

Specify a notification variable using this syntax:

${variable-name.variable-parameters}

Notification variables

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).${event}

This variable refers to the specified event context in case if the notification was triggered by some event.

So, as you have got this context, you can get the values of the fields within the Event (sys_event) table related to this event.

${event.param_1}${script}

This variable runs the specified script developed by using the Notification Scripts functionality.

Tip

The called script name should not contain spaces. They are not allowed to use within the structure like shown in the example.

${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.Variables that allow displaying links to current record

${URI}

The link text is the unclickable link to the record.

${URI} Source: Click here to view the task: ${URI}

${URI} Output: Click here to view the task: https://instance.example.com/record/task/160525805616015648

NSelect this checkbox to send the notification when a record is inserted into the Table.
UpdatedNSelect this checkbox to send the notification when a record is updated in the Table.
Event registerY

Specify an event. It is used by the system to register when specified conditions are met and to take some actions in response to the conditions.

This field appears when the Event is fired option is selected in the Send when field.

ConditionsN

Specify conditions to meet before sending the notification. Use the condition builder to build a filter that meets all the necessary requirements.

Info

An empty condition always returns true.


Who will Receive tab
Other recipientsN

Add contacts who will receive the notification. Available values in this field:

  • One or more email addresses separated by comma or semicolon (for example, johndoe@example.com; janedoe@example.com, johnroe@example.com).
  • A template string containing reference to the current user or email objects. For example, ${current.caller}${current.requestor.personal_email}. These template strings support the dot-walking.
  • A template string containing reference to a record in Notification Script (sys_notification_script) table. For example, ${script:callerManagerEmail}

The value in this field can combine the options above. For example: ${current.caller.personal_email}; ${script:callerManagerEmail}

Tip

Check your template strings before using them within the system. For example:

The ${current.caller.manager.email} template string will not work properly because the Caller field of the User table does not have the Manager attribute.


UsersN

Select the users who will receive the notification within this rule.

Info

If a user's email is also specified in the Other recipients field, the system sends only one notification.


Send to selfN

Select this checkbox to send the notification to a person that initiated notification sending if this person is in the recipient list. Otherwise, the notification initiator address will be excluded from the To field of the notification email.

Note

Note that:

  1. Emails without a recipient's address (the To field is empty) are not sent. They are in the Ignored state.
  2. If the Send to self attribute is false, and the email has only the notification caller as a recipient, the notification rule creates an email with the Ignored state.


Exclude delegatesNSelect this checkbox to ignore the notification rule for delegates.
What will Contain tab
SubjectNEnter a notification subject. Notification variables and placeholders are supported here.
Notification templateNSelect a relevant notification template from the list.
MessageNType a notification body in plain text. Notification variables and placeholders are supported here.
Message HTMLN

Type a notification template in rich text format. This field supports HTML tags, placeholders, notification variables.

Tip

You can also use notification variables ${URI} and ${URI_REF} here. Their usage is described in the Notification Templates article.



Note

The server-side business logic may not work for system tables if the creation or updating of records is initiated by the backend. For example, an Import Set is created as part of loading an Import Source, or an Email is created as a result of a notification rule, and so on.

A list of table examples for which the server-side business logic may not work:

  • Main Log (sys_log)
  • Script Log (sys_log_script)
  • Exception Log (sys_log_exception)
  • Record Deletion Log (sys_record_deletion_log)
  • Import Set (sys_import_set)
  • Activity Feed Item (sys_activity_feed_item)
  • Email (sys_email)

Use case


You need to configure a basic notification for the Employee table. When a new employee is added, all employees receive a notification.

To implement this logic, create the following notification rule:

FieldValue
NameNew employee
TableEmployee
Active

True

When to Send tab
Send whenRecord inserted or updated
InsertedTrue
Who will Receive tab
Other recipients

company-group@example.com 

Tooltip
onlyIcontrue
appendIconinfo-filled
iconColorblue

This address represents a mailing list.


What will Contain tab
SubjectNew employee in the ${current.department} department
Message${current.display_name} is in our team!
${URI_REF}The link text is the display value of the record.

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

${URI_REF} Source: Click here to view the task: TSK0005555

Notification scripts

Notification scripts allow you to get email values or set them using the SimpleEmailOutbound class. 

Add a ${script:script_name} embedded script tag to the notification rule or to the related notification template. 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 notification templates.

To create a notification script, please complete the steps below:

  1. Navigate to System Notification → Notification Scripts.
  2. Click New and fill in the fields.
  3. Click Save or Save and Exit to apply changes.
Note

To locate where notification scripts are used, perform search against the version list. For this, please complete the steps below:

  1. Navigate to Configuration Pack → VCS Records.
  2. Click on the funnel icon Image Removed on the top to open the Condition Builder.
  3. Create a filter containing the conditions listed below:
    1. JSON Copy CONTAINS script:script_name
    2. Table Name IS NOT sys_notification_script
    3. 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.

Image Removed


Table of Contents
absoluteUrltrue
classfixedPosition