At the bottom of the trigger settings you will find the Add action button. Triggers are used to automate the sending of notifications, e-mails, SMS messages, and the setting of tasks according to pre-specified rules.
Multiple actions can be created within one trigger. The compatibility table] lists which actions are allowed for which events.
Let's take a closer look at a few actions.
When you select the "Send email with template" option, the "Template" field appears, where you need to select the email template that will be sent when the trigger is executed. Please note that the trigger event must be "Sending email when order is changed".
Below the template selection, a notification is displayed stating that it is possible to check if the customer is unsubscribed from the mailing list by means of a Twig expression. The expression itself is presented in the same notification as a hint. If the customer is unsubscribed from the mailing list, they will not be sent an email
The code suggested in the tooltip depends on the object available for the selected trigger event.
With the "Send SMS with template" option, you need to follow the same process as the "Send email by template" option previously mentioned. Please note that the trigger event must be "Sending SMS when order is changed".
If you select the "Send message to chat with template" option, the "Template" field will appear, where you must select a message template that will be sent to the customer when the trigger is executed.
If the message fails to be sent to the chat, the system can automatically send the customer an SMS. To do this, fill in the "SMS template" field in the selected chat template.
Please note that after sending the template, the dialogue will not be automatically created. The dialogue is created only after the customer replies to the template message.
This action allows you to assign a task to a specific manager. When creating an action, first select a responsible manager, then add text and comments to the task, and select the time during which the manager will receive the reminder.
This action is used to transfer information from the system to an external service or to initiate the execution of an external script. Please note that the trigger only sends the request. The response to the request is not processed by the trigger.
Please note that in order to perform this action, you must have an active telephony system (this action does not work with such telephonies as "Prostie Zvonki" (Simple Calls) and "OnlinePBX").
The "Call to customer" action allows you to initiate a call for the responsible or specific manager. The responsible manager is selected in the "User to whom the call is made" option.
The phone number to be called is taken from the customer or order card, depending on the selected event in the trigger itself. If you select "Order change"- the phone number is taken from the order, and if you select "Change of customer information" - the phone number is taken from the customer card.
If a corporate customer is selected, the phone number is taken from the contact person bound to the order.
Please note that this action is available only if the "Order change" event is selected.
In the condition, specify on what the trigger will be executed. In our example, the trigger will be executed on order creation.
After specifying the condition, select the cost item that will be created by the trigger, and the sum. In our example, this is an employee bonus for the amoutn of £100
It is also possible to use expressions in the "Sum" field. For example, the expression
order.totalSumm * 0.01 is used to calculate a manager bonus depending on the sum of the order.
The sum is specified as a number without adding a currency. The currency is set automatically based on the default one in the system. In the "Date" field, you can specify the date when the cost item was created. If no date is specified, then the date when the trigger was executed will be used by default.
You can also use expressions in the "Date" field. For example, the date in the cost item can be "bound" to the order creation date by calling
order.createdAt call or "bound" to another date in the order.
In the "User" field, you can specify which manager will appear in the cost item.
In the comment it is possible to use objects available in the trigger filter. Only text is allowed here, not html.
Clicking on the title of the article will open the editing window.
For more information on how to work with finances, see the related article.
For information on how to create a template for an email, see the "E-mail templates" section.
For information on how to create a template for an SMS message, see the section “SMS templates”.
For information on how to create a notification template, see the section "Creating a notification template".