Use CRM variables in Automation
Variables in Automation are used to access CRM data through automated flows. They allow you to insert current values from deals and contacts into messages, filters, or actions, automatically update data in the CRM system, or send it to external tools.
In this article, we’ll talk about how to use CRM variables in automated flows.
Basics
Data points in automated actions are transferred using system and custom variables.
System variables appear automatically when a deal or contact is added or when its status is updated.
Custom variables can be created manually. To do this, go to CRM > Contacts > Settings > Fields and add a new field.
In Automation, deal variable values include the _deal suffix, which helps tell deal variables apart from contact variables. These variables sync with CRM deal fields, while variables without this suffix sync with contact fields. For example, the budget_deal variable transfers its value to the Budget field of your selected pipeline and deal.
Field mapping in the Create or update contact and Create deal actions is optional. By default, the system creates contact or deal variables with the same names as the variables in your flow. Contacts don't need field mapping, since variables without a suffix are saved to the contact automatically.
We recommend mapping fields when you create deals. If your flow variables don't have the _deal suffix, the system creates the deal without them. If a mapped variable has no suffix and the contact has a variable with the same name, the value is saved to the contact, not the deal.
You can update CRM contact variables both in Automation and in the CRM system. For CRM deals, you can update variables only within the flows where the change occurs. If you update a deal field, the new value applies to all subsequent elements in that flow.
To use variables, make sure your flow includes a CRM trigger.
Your selected trigger determines available variables, such as deal variables (_deal), contact variables, or product variables. This lets you send accurate data through messages, webhooks, or other actions in Automation.
In triggers
The Deal field update trigger starts a flow when the value of any CRM deal field changes. Suppose your sales manager updates a deal price. You can then send a message to your client or create a task to confirm the details.
You can choose to run your flow based on any field update or set a specific value.
To send a variable value to an existing CRM deal field, enter the exact field name, including its letter case. If you enter a different field name or the field has a different data type, the system will create a new field instead.
In message texts
You can add variables to emails and messages using Email, SMS, Viber, Push, or Messaging app elements.
Use variables to personalize messages for customers or sales teams. In a text element, click the variable icon and select one from the list.
To give you an idea, use the {{firstName}} system variable to make your email templates more personal. You can also add the {{address_deal}} custom deal variable to confirm the delivery address if this field exists.
To save a variable value to the contact's first name in CRM (the firstName field) when your flow creates a contact or deal, give the variable in your event or mailing list one of these names: firstname, first_name, name, Nom, Nome, Nombre, Ad, ім'я, or имя. To add a last name, use lastname or last_name.
These variables sync without field mapping. If your variables have other names, map their fields in the Create or update contact or Create deal action.
In other elements
Using various elements, you can set conditions, filter data, update or transfer variables, create new records, and send messages.
| Filter |
Use this element to check variable values and create branches in your flow. Examples:
|
| Action |
Use this element to add values to new records or pass data to contact and deal fields. Examples:
|
Use all elements within a single flow to build a complete scenario. For instance, filter contacts using a specific tag, send them an offer, and assign a task for a team member to follow up later.
When exporting data to a file, all CRM flow variables are included. You can then use them in reports and external analytics tools.
or