Methods for Generating Notifications
The notification generation process for both event-driven interaction and REST API calls is the same. Below is the description for an event.
Sending Notification, Event Contract: qun-notification-create
| Parameter | Name | Type |
|---|---|---|
| NotificationRecipient | Notification Recipient | NotificationRecipient |
| channelProtocolLinkList | List of Dispatch Channels | Array of ChannelProtocolLinkList |
| attachments | List of attachments files | Array of Attachments |
| createdBy | Notification Author | string |
| id | Notification Record ID | integer($int64) |
| message | Message Text | string |
| messageHTML | Message text in HTML | string |
| messageType | Message type | string |
| notificationAttributes | Message Attributes | string |
| notificationAttributesJson | Message Attributes in JSON. This field is used if the attributes are not specified in the notificationAttributes | object |
| objectId | Process object ID in which the notification was sent | string |
| objectNumber | Process object number in which the notification was sent | string |
| objectType | Process object type in which the notification was sent | string |
| recipientGroupId | ID of recipient group | integer($int64) |
| recipientGroupSystemName | System name of recipient group | string |
| soundAlarm | Indication of an audible signal when sending a notification | bool |
| templateId | Notification Template ID | integer($int64) |
| templateSystemName | System name of notification template | string |
| type | Notification Type | integer($int64) |
| typeSystemName | System name of notification type | string |
| useCurrentUserMail | Indicates whether the current user's email address is being used to send notifications | bool |
Sending Notification, Event Contract: qun-notification-command
| Parameter | Name | Type |
|---|---|---|
| NotificationRecipient | Notification Recipient | Array of NotificationRecipient |
| channelProtocolLinkList | List of Dispatch Channels | Array of ChannelProtocolLinkList |
| createdBy | Notification Author | string |
| id | Notification Record ID | integer($int64) |
| message | Message Text | string |
| notificationAttributes | Message Attributes | string |
| recipientGroupId | Recipient Group ID | integer($int64) |
| templateId | Notification Template ID | integer($int64) |
| type | Notification Type | integer($int64) |
Object Schemas
NotificationRecipient
Notification Recipient
| Parameter | Name | Type |
|---|---|---|
| externalSystemId | Recipient's system name. It can be used to send an email address | string |
| id | Recipient Record ID | integer($int64) |
| name | Recipient Name | string |
| recipientId | Recipient ID (role ID, employee ID, department ID) | integer($int64) |
| systemName | Recipient's System Name (role/system login of employee/department system name) | string |
| type | Recipient Type: • 1 - Employee (employee); • 2 - Department (department); • 3 - User role (role); • 4 - Recipient group (group); • 5 - Telegram chat (TELEGRAM_CHAT); • 6 - Email (EMAIL); • 7 - Phone number (PHONE_NUMBER); • 8 - Application instance token (APPLICATION_INSTANCE_TOKEN); • 9 - Participant (PARTICIPANT). | integer($int64) |
ChannelProtocolLinkList
List of Dispatch Channels
| Parameter | Name | Type |
|---|---|---|
| attachments | List of attachments files | Array of Attachments |
| channelSysName | Dispatch Channel System Name | string |
| message | Message Text Template for the Channel | string |
| messageHTML | HTML Format Message Text Template for the Channel | string |
| messageType | Message Type | integer |
| subject | Email Subject | string |
Attachments
List of attachments files
| Parameter | Name | Type |
|---|---|---|
| contentType | File Content type | string |
| file | The name of the file with the path in the file storage | string |
| fileID | File ID in the file storage | string |
| fileInfoId | File Info ID in the file storage | integer($int64) |
| fileName | File name with the extension | string |
| isBase64 | Indication of base64 encoding | bool |
| storage | File storage location in the file storage | string |
Event Formation Options for Sending Notifications
A notification can be formed in two ways:
- Independently create a notification without using a template. In this case, the following parameters need to be specified:
- channelProtocolLinkList - list of channels for sending;
- notificationRecipient / recipientGroupId - notification recipient or the identifier of the distribution group (which includes the list of recipients);
- type - notification type;
- message - notification text template (static text);
- notificationAttributes - message attributes if a parameterized text template was specified in
message. - notificationAttributesJson - message attributes in JSON format, if a parameterized text template was specified in the
message. Used if attributes are not specified in the notificationAttributes field.
- Form a notification using a template. In this case, the following parameters need to be specified:
- templateId - notification template identifier;
- notificationAttributes - message attributes if a parameterized text template was specified in the template.
- notificationAttributesJson - message attributes in JSON format, if the template specified a parameterized text template. Used if attributes are not specified in the notificationAttributes field.
Examples of forming notifications in the process designer editor will be presented below.
Sending Static Text
| Variable | Type | Example | ||||||
|---|---|---|---|---|---|---|---|---|
| channelProtocolLinkList | Groovy Script | [["channelSysName": "email", "message": "Test1"]] | ||||||
| message | String or Expression | "Notification about created task" | ||||||
| type | String or Expression | 1 | ||||||
| notificationRecipient | Map |
|

Sending a template notification text with parameterization
When filling in the value of the notificationAttributes variable, line breaks can be made. Line break is made after the "+" sign.
One of the variables notificationAttributes OR notificationAttributesJson' is filled in. When filling in both fields, the values are used from the notificationAttributes` field.
| Variable | Type | Example | ||||||
|---|---|---|---|---|---|---|---|---|
| notificationAttributes | Groovy Script | def text = "{\"taskId\": \"" + response.content.stream().findFirst().get().id.toString() + "\", \"startDate\": \"" + startDate + "\", \"endDate\": \"" + endDate + "\", \"statusName\": \"" + statusName + "\", \"fullName\": \"" + responseEmployee.fullName + "\", \"url\": \"" + url + "\"}"; text | ||||||
| notificationAttributesJson | String or Expression | {"taskId" : ${taskId}} | ||||||
| channelProtocolLinkList | Groovy Script | [["channelSysName": "email"]] | ||||||
| message | Groovy Script | "Subordinate created a vacation request. It needs to be confirmed through user task №${taskId}" | ||||||
| type | String or Expression | 1 | ||||||
| notificationRecipient | Map |
|
An example of setting up sending a parameterized notification with business process attributes.

An example of configuring the sending of a parameterized notification with attributes in JSON format is a business process.

Sending Notification with Template Parameters
| Variable | Type | Example |
|---|---|---|
| notificationAttributes | Groovy Script | def text = "{\"taskId\": \"" + response.content.stream().findFirst().get().id.toString() + "\", \"startDate\": \"" + startDate + "\", \"endDate\": \"" + endDate + "\", \"statusName\": \"" + statusName + "\", \"fullName\": \"" + responseEmployee.fullName + "\", \"url\": \"" + url + "\"}"; text |
| templateId | String or Expression | 1 |
An example of setting up sending notifications with template parameters through a business process.

An example of setting up sending notifications with parameters in JSON format using a template through a business process.
