WAZZUP Help

Variables in Salesbot

Salesbot variables allow you to automatically populate your message templates with data retrieved from amoCRM. Using a variable, you can substitute a contact’s name, number or ID, a deal’s ID, amount, date, tag, etc. in your text.

How to declare a variable in Salesbot

A variable is a command enclosed with two curly brackets from both sides. You need to use it during the Salesbot creation stage in the message input field. The variable can be entered manually or selected from the list. Enter “[” to call the list of variables.

If you have entered a contact’s name in a card and want the bot to address your client by their name, insert the {{contact.name}} variable into the text:

When sending the message, the {{contact.name}} variable will be replaced with the contact’s name.

Common variables and actions

CommandVariable
Contact name{{contact.name}}, {{name}}
Deal ID{{lead.id}}
Contact ID{{contact.id}}
Customer ID{{customer.id}}
Deal source (telegram, vk, viber, facebook){{origin}}
The message from the client in the answer logical block{{message_text}}
Setting a custom deal field value
(use the additional field id instead of #custom_field_id#)
{{lead.cf.#custom_field_id#}}
Setting a custom contact field value
(use the additional field id instead of #custom_field_id#)
{{contact.cf.#custom_field_id#}}
Setting a custom company field value
(use the additional field id instead of #custom_field_id#)
{{companies.cf.#custom_field_id#}}
The name of the employee responsible for the deal{{lead.responsible.name}}
Phone number of the responsible employee{{lead.responsible.phone}}
The e-mail of the responsible employee{{lead.responsible.email}}
The e-mail if it is present in the client's text{{message_text.email}}
The phone if it is present in the client's text{{message_text.phone}}
The deal's budget{{lead.price}}
Current date{{current_date}}

Where to find the additional field’s id?

From a card

Open any deal and press “Setup”:

Fields settings will open. Click on the field you need to open its settings. In the upper left corner, there will be this field’s ID:

From the console

Open any deal or contact and find the field you would like to use a value from.

Right-click the field and choose “Inspect” or “View source”:

A window will open containing the code of the chosen field. Find CFV*. The contents of the square brackets are the field id you need.

*CFV — custom field value.

To set the value of a contact’s or deal’s custom field, replace the #custom_field_id# with the id itself.