-
Print
-
DarkLight
-
PDF
How to configure the system process for sending event notification emails to users
List of Corezoid events for which notification emails are sent
There are seven types of system messages in Corezoid:
- Password recovery;
- Registration confirmation;
- Invite a user to a company;
- Object sharing;
- Changing a user's password;
- Object download;
- Task download;
- Task upload error.
After installing the system, you need to create and configure a process that sends these system messages. You can configure the process to send all types of messages or only some of them.
Depending on the action, an object with different parameters is sent to the process, among them there will always be two mandatory parameters:
- type - email type;
- recipients : [{email}] - users’ emails for mailing.
Optional parameter:
- lang - user language - depending on it, you can prepare email templates in different languages. If a user has not selected a language, the default value will be lang = en:
Message | Task parameters |
---|---|
Password recovery |
|
Registration confirmation |
|
Invite a user to a company |
|
Object sharing |
|
Changing a user password |
|
Object download |
|
Task download |
|
Task upload error |
|
Process example
-
Add a Condition node after a Start node (1). In the Condition node, configure branching conditions for sending two types of messages: Invite a user to a company (type = invite) and Object sharing (type = share);
-
Add an API Call node (2.1, 2.2) for every message type.
Example of API Call node configuration:
- You can add an array processing sequence if an email has to be sent to multiple users;
3.1 After the Condition node (1), add a Code node that will process the array of emails and decrease it each time a task is passed through this node (3). Paste the following code into the code editor (language: JavaScript):
if (data.index == undefined) {
data.index = 0;
} else {
data.index = data.index + 1;
}
data.length_recipients = data.recipients.length - 1;
data.email = data.recipients[data.index].email;
3.2 Connect the Code node (3) to the API Call node (2.2);
3.3 After the API call node (2.2), add another Condition node (4) to check the length of the array:
3.4 Connect the API Call node (2.2) to the Condition node (4):
- Also, you can separate the sequence of sending emails that notify on downloading various objects and make object-specific texts for them.
To do this, add additional constituent conditions to node 1, and add the following nodes to the process: 2.3, 1.4, 2.4:
You can supplement the process with individual sequence of nodes necessary for sending emails.
Adding a process ID to the settings
After completing the process configuration, add the process ID to the capi_user_notify_conv setting of the Superadministrator menu, Settings section. To do that, open the Superadministrator menu:
Open the Settings and scroll to the capi_user_notify_conv setting and enter the process ID in the setting field: