Page tree

SAYMON документация

Skip to end of metadata
Go to start of metadata

Notification templates provide the possibility to configure all types of notifications that are sent to users by the system.

The tab is available for users with the permission to manage system configuration.

It is possible to set up the option notification_buffering_period in the section Server of the server configuration file. Due to this option server will be able to hoard the notifications and send them in one message, instead of sending each of the notifications. 

Templates for the group notifications are customized individually.

When SMS-notifications are used, text of a single event passes to the script as the 5th argument, text of a grouped event passes as the 7th one.

Templates editor

View of the notifications is set in the editor. Each type of notifications is customized individually, the type is selected in the Templates list to the left of the editor.

The Notification pack slider allows to switch between templates for single and group notifications:

  • Yes | the template for the group notification is in the editor;
  • No | the template for the single notification is in the editor.

The button cancels all of made changes and returns the default template.

The button opens the hint window with the list of all of the possible variables, which are available for the selected notification type.

Basic variables

These variables can be used in any type of notifications:

  • entityName - element name; 
  • entityId - element ID; 
  • entityType - element type (object / link);
  • entityUrl - element URL; 
  • stateName - name of the state;
  • stateData - information about the state;
  • changedStateText - state transition text ("has passed to");
  • hasRootCause - indicates that transition is caused by a child element;
    • returns true, if the new state has been inherited from a child object;
    • returns false, if the state has been changed because of other reason;
  • rootCauseEntityName - name of the child root-cause element;
  • rootCauseEntityUrl - URL of the child root-cause element;
  • rootCauseEntityId - ID of the child root-cause element;
  • condition - information about the triggered state change condition;
  • conditionDescription - description of the triggered condition;
  • eventTime - the time when the event occured;
  • breadcrumbs - the path to the element which the notification comes about.

These variables also can be used within the variable breadcrumbs:

Paramaters of the variable breadcrumbs (each parameter by default is equal to 0):

  • multi-break - whether to stop on a multi-parent (0 - no, 1 - yes);
  • depth - amount of displayed levels (0 - no limit);
  • length - the largest number of symbols (0 - no limit). 

Variables for group notifications 

In addition to the basic variables there are some special ones which can be used in group notifications:

  • eventsCount - quantity of the events;
  • uniqueCount - quantity of the unique events;
  • fromTime - timestamp of the first event in the group;
  • toTime - timestamp of the least event in the group.

Additional variables for email-notifications

There are some additional variables for email-notifications:

  • stateLabel - the coloured label of the state;
  • entityLink - name-URL to the element;
  • rootCauseEntityLink - name-URL to the child root-cause element;
  • goToObjectButton - button to open the element.

Notification language

The notification templates related to user registration or restoring access:

  • Forgot password,
  • Forgot password subject,
  • Registration,
  • Registration subject,
  • Registration with password,
  • Registration with password subject,

can contain information in different languages. Users will receive notifications in their language, depending on selected user language

It can be set using the variable lang.

In case there is no template in user's language, the template in English is used.

Examples

General using

To use SomeVar variable its name must be written in double braces:

{{SomeVar}}

If-else operator

It is also possible to use if-else operators:

if:
{{#SomeVar}}
      ...
    {{/SomeVar}}
else:
{{^SomeVar}}
      ...
    {{/SomeVar}}

Cycles

The same way is used for cycles:

for-loop:
{{#SomeVar}}
      ...
    {{/SomeVar}}

Lang

Three languages are available for using with this variable:

  • en - English,
  • it - Italian,
  • ru - Russian.
{{#lang=ru}}
Создание учетной записи.
{{/lang=ru}}

{{#lang=en}}
Account creation
{{/lang=en}}

Breadcrumbs

html

{{#breadcrumbs multi-break=1 depth=3 length=30}}<a href='{{entityUrl}}'>/{{entityName}} (ID {{entityId}})</a>{{/breadcrumbs}}

markdown

{{#breadcrumbs multi-break=1 depth=3 length=20}}/[{{entityName}} {{entityId}}]({{entityUrl}}){{/breadcrumbs}}
  • No labels