Variables and constants in automation rules

We have added variables and constants to CRM. They greatly simplify calculations in fields and work on scenarios, such as profit calculation.

How to create variables and constants

Go to the Automation rules page. On the top menu, select Variables or Constants.

The constant value can only be changed manually by editing the item. A variable can also be changed by the Variable change automation rule.

In the slider, you will see a table with a list of items. If necessary, you can choose which fields to display and hide. To do this, click on the gear.

Click Create variable and fill in the field values in the slider. Save your changes.

The Visibility field value determines where variables and constants can be used. Items with the Everywhere value can be used in smart processes, workflows, tasks.
Type, Multiple, and Visibility field values cannot be changed after creation.

How to use variables and constants

Constants and variables can be used in automation rules.

Items will be displayed only in the sections to which they are attached.
If the Visibility field is set to CRM, the variables and constants will not be displayed in tasks. If it is set to Leads, the variables and constants will not be displayed in deals.

Example of using constants and variables in automation rules

For example, we have a warehouse in Boston. After the client makes an order in our online store, we send them an email with the information about the approximate delivery time. The order picking at the warehouse never takes more than 1 day. However, the order delivery period is different: within the city, the delivery is done within 1 day, but it can take up to 3 days to deliver an order across the region.

Thus, we can specify the order picking as a constant, and the order delivery as a variable. Their default value will be 1 day.

In the Picking and shipping stage we add the following automation rules:

We use both Perform math operations automation rules to calculate the number of days required to deliver an order in the city and region. The calculated value will be saved to the Order shipping variable.

If the delivery is done within the city, we add 1 day to the order-picking period.

In the same way, we add 3 days in case of the delivery across the region.

Then we can use the Order shipping variable in the text of an email in the Send email to customer automation rule.

It is important to enable the after the previous automation rule option as it is required to calculate the value of the variable before sending an email.

The variable will be replaced by the calculated number of days, and our client will be aware of the approximate delivery time.

Was this information helpful?
Integration specialist assistance
That's not what I'm looking for
Complicated and incomprehensible text
The information is outdated
It's too short. I need more information
I don't like the way this tool works
Go to Bitrix24
Don't have an account? Create for free
Related articles
Triggers in CRM Sales automation page in CRM Helper automation rules Profit calculation Delete automation rules in CRM and Online Store Automation rules in CRM Automation rules for employees Conditions in automation rules Create QR code automation rule and Scan QR code trigger Edit variable and Math operations