Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Notifications keep you updated on the new records, changes, and events in SimpleOne platform. Changes in any field of a task or a whole table may trigger outgoing notification emails. Use notification rules described below to define who receives information about particular changes in the system, and the scope of that information.
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, complete the steps below:
- Navigate to the System Notification → Notification Rules.
- Click New and fill in the fields.
- Click Save or Save and Exit to apply the changes.
Info |
---|
You can also create a notification rule through a form or a related list:
|
Use cases
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:
Field | Value | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
Name | New employee | |||||||||
Table | Employee | |||||||||
Active | True | |||||||||
When to Send tab | ||||||||||
Send when | Record inserted or updated | |||||||||
Inserted | True | |||||||||
Who will Receive | ||||||||||
Other recipients |
| |||||||||
What will Contain | ||||||||||
Subject | New 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, complete the steps below:
- Navigate to the System Notification → Notification Templates.
- Click New and fill in the fields.
- Click Save or Save and Exit to apply the changes.
Notification variables
Specify a notification variable using this syntax:
${variable-name.variable-parameters}
Notification variables
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). | ||
${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.
| ${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 | ||
${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} SourceOutput: 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:
- Navigate to System Notification → Notification Scripts.
- Click New and fill in the fields.
- Click Save or Save and Exit to apply changes.
Note |
---|
To locate where notification scripts are used, perform search against the version list. To do this, complete the steps below:
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 | ||||
---|---|---|---|---|
|