Versions Compared

Key

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

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.

Notification rules


Notification rules are used when you need to set up notification sending rules, depending on various conditions, or in case of the event happened.

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

Tip

Role required: notification_admin.

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 Exit to apply changes.
Info

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

  1. Open the hamburger menu .
  2. Proceed to Configure → Notification Rules.
  3. Click New and fill in the fields.
  4. Click Save or Save and Exit 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 an notification rule as below:

FieldValue
NameNew employee
TableEmployee
Active

True

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

company-group@example.com 

Tooltip
onlyIcontrue
appendIconinfo-filled
iconColorblue

This address represents a mailing list.


What will Contain
SubjectNew employee in the ${current.department} department
Message${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 mail script developed by using the Notification Scripts functionality.


Tip

The called script name should note 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}


$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


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

Scripts

Notification scripts


Email Notification 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,

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 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 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 → Records.
  2. Click on the funnel icon  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.


Table of Contents
absoluteUrltrue
classfixedPosition