Bitrix24

Connect the bot to CRM Bitrix and learn to create custom fields

The constructor is not able to get data from Bitrix24, but you will be able to transfer it using our IP methods from Bitrix24, which are described in the API constructor.

Also, there are some methods to work with Bitrix24 .They are described in API in the calculator :

How to connect Bitrix

To integrate with CRM Bitrix, you must configure both CRM and Salebot

Install the Salebot app from the marketplace.Link to the app:https://vk.com/away.php?to=https%3A%2F%2Fwww.bitrix24.ru%2Fapps%2F%3Fapp%3Dsalebot.chatter&cc_key=

Search for the App

Authorization

The domain must be taken from the Bitrix address bar. It is unique for each CRM.

For example, http://testsalebot.bitrix24.ru, we are interested in the text "testsalebot" here .

Then we go to the section "Integration with CRM" on the site salebot.pro. Enter our domain and regional zone as it is shown.

Click on the "Connect Bitrix24" button. The integration is finished. It is very easy.

The example

Let’s consider an example. For example, we create a pipeline that asks a person for an address and sends a request to Bitrix

And go to the pipeline in any messenger

And this request is automatically sent to the Bitrix. The Lead is created, then the Bitrix creates a Deal based on this Lead

Additionally, you can set up email notifications

And notifications will be sent to the email

The name of the client is written to his contact, if the dialogue box is filled with the name of the phone or email in the input field , they will also go to the contact.

How to set an operating mode:

There are two operating modes of CRM : Simple CRM and Classic CRM

When Bitrix is first connected to a project in project settings -> Common variables, a variable will be added with your CRM bitrix_crm_mode enabled

1 - Classic mode (Lead mode)

2 - Simple mode (no Leads)

How to Fill Deal and Lead Fields

You can also fill in the Bitrix custom fields as well as the built-in deals and leads. Each field is specified with a new line. First comes the field code in Bitrix24, then the variable name in Salebot, which will be written in it. For a built-in field, simply specify its name, for example UTM_SOURCE

List of standard Bitrix fields, you can see:

for leads: https://dev.1c-bitrix.ru/rest_help/crm/leadsm_fields.php

for deals: https://dev.1c-bitrix.ru/rest_help/crm/cdeals/crm_deal_fields.php

for contacts: https://dev.1c-bitrix.ru/rest_help/crm/contacts/crm_contact_fields.php

Column Field

How to Find out Custom Field ID

To know the ID of the field you have already created, you must:

  • open your Bitrix 24;

  • go to the CRM → Settings → Form and Report Settings → Custom Fields → Lead(List Box);

in the list find your field and click;

in the search box, at the end of the URL, you will see the value of UF_CRM_XXXXXXXX

https://Bash-domain.bitrix24.ru/crm/configs/fields/CRM_LEAD/edit/UF_CRM_XXXXXXXX/ Here UF_CRM_XXXXXXXXXX - this is the ID

If you do not have a custom field yet, you need to create it first, and then you can find out its ID.

How to Create a Custom Field

To create your custom field, you must:

• open Your Bitrix 24;

• go to the CRM → Form and Report Settings → Custom Fields → Lead (Add Field);

• specify the field name;

• check the box for «Show in list»;

• it is better to use the field type «String»;

• save

Only after you create a custom field you find out its ID.

Examples of custom Bitrix fields are shown

How to Connect Open Channels Bitix24

You can communicate with clients from Open Channels. To do this, you must enable the "Connect to Open Channels" switcher in the connection window

If you switch to Salebot from a different platform, the old dialogues will not work because the Open Channel was created by the previous platform. You will need to write the first again to create a dialogue in the Salebot

There is no need to configure anything else. The screens below are showing the work.

How to Assign a Responsible person creating an Open Line

Go to Contact Center, find Salebot and choose an Open Line to connect Salebot.pro

Now, here we assign the responsible people

Also responsible can be changed in the calculator

Possible connection errors

How to Disable Messages from Bitrix24

If you find messages such as "You will get the first available operator." or «Rate the quality of the service" then you need to make changes in the Open Line settings.

To do this, in the Bitrix24 menu, find Contact Center. Go to this section and click on the Salebot icon:

Then, select the channel to connect to Salebot and click Configure:

In the settings on this channel, disable unnecessary items and enable the necessary items

How to write first in Whatsapp

Fill in the required fields Name, Last name, and of course we need the phone number:

Press Save

Next click twice on the contact to write and right in the menu click on the button "Write to Whatsapp":

By clicking on it, the menu of the Salebot application will open:

If the contact has more than one phone number, then the Salebot application will ask you to choose one of them.

If you have several WhatsApp numbers connected to the project on Salebot, you also have a choice of which ones to write with.

After entering the message and selecting the desired parameters, press the "Send message" button.

After a successful sending we get a message: Message sent! Close this tab and go to the client dialogue.

And at the top right we get a pop-up message that a new line is opened with a contact. If we click on it we go to the chat with the client.

You can write first in/ by/ from Bitrix 24 only in WhatsApp

How to Configure Webhook in Bitrix24

All the necessary webhooks are set up in Automation rules

Next, press any of the buttons 'Add'

Then add a webhook or edit an existing one

Automation rules are used to transfer any data from the Bitrix to the Salebot

domain.bitrix24.ru - replace with your domain in Bitrix.

If you have Open lines enabled:

URL webhook for Leads: https://chatter.salebot.pro/bitrix_webhook/domain.bitrix24.ru/robots_webhook?line={{{Contact Open Line}}

URL webhook for Deals (before data transfer to Bitrix by yellow block): https://chatter.salebot.pro/bitrix_webhook/domain.bitrix24.ru/robots_webhook?line={{{Contact: Open Line Contact}}

URL webhook for Deals (after data transfer to Bitrix by yellow block): https://chatter.salebot.pro/bitrix_webhook/domain.bitrix24.ru/robots_webhook?contact_id={{{{Contact: ID}}

If Open lines are disabled, then use the following URL:

URL webhook for Leads: https://chatter.salebot.pro/bitrix_webhook/domain.bitrix24.ru/robots_webhook?lead_id={{{ID}}

URL webhook for Deals: https://chatter.salebot.pro/bitrix_webhook/domain.bitrix24.ru/robots_webhook?_deal_id_{{{ID}}

Or https://chatter.salebot.pro/bitrix_webhook/domain.bitrix24.ru/robots_webhook?contact_id={{Contact: ID}}

This is the obligatory part to determine who the callback came from , then you can send the necessary data , which will be added to the deal in Salebot.

The data is transmitted as follows: &name of variable={{value}}

Example of a link transmitting variables: https://chatter.salebot.pro/bitrix_webhook/b24-b4qrod..{{Contact: Contact Open Line }}&stage={{{Deal Stage}}&={Deal Creator}

Take a look at the example of Lead stage or Deal stage transfer to Salebot.

How to start a bot when the Deal status is changed

To receive notifications about the change of the Lead or Deal status, you need to install Webhook for the desired stage in the settings of the robots.

Add the variable to the address : &stage={{Status}} - it will add the stage to the client variable with the stage name.

Example of using the Leads:

Be sure to press both buttons Save!

Example of using the Deals:

This webhook must be copied to each stage, if you want to see its information in the chat and in the variables

After changing the status of the project, a notification will come with text as if the client sent it (but this message will be visible only in the interface Salebot.pro): bitrix_stage Stage name

The rest of the data will be recorded to the client:

Then, you can use this message as a condition of the block in the editor and send the user a message corresponding to this transition.

How to respond to the client when changing the Deal/Lead stage

Messages are configured in the menu Automation rules

At the desired stage, click Add -> Client communication -> Send via Open Channel

Write a message template. Also, on the right by clicking on three points, you can insert the necessary data, e.x. a name.

After the message is ready, click Save twice.

When it enters this phase, the client will receive your message.

How to start a bot with Bitrix robot

Robots are used to run a Bitrix bot to a Salebot. To do this, you need to adjust the robot to the Bitrix.

URL webhook for Leads (Classic CRM - with Leads):

https://chatter.salebot.pro/bitrix_webhook/domain.bitrix24.ru/robots_webhook?call=1&lead_id={{{ID}&phone={{Office number}}&{Lead name}}&whatsapp_id=19786&text=start

URL webhook for Leads (Simple CRM - Lead mode):

https://chatter.salebot.pro/bitrix_webhook/domain.bitrix24.ru/robots_webhookbackcall=1&deal_id={{ID}&contact_id={{Contact: ID}}&Phone={Contact=Office number}}}&name={{Contact: Name}}&whatsapp_id=19786&text=start

Required data:

callback - leave as it is

lead_id - leave as it is

or

deal_id and contact_id - leave as it is

domain.bitrix24.ru - replace by your domain in Bitrix

phone - variable where the client number is, in the example you take office number {{Contact: Office number}}

whatsapp_id - whatsapp bot identifier (in example 19786)

Optional variables:

name - will sign as the name of the client in the Salebot (if you do not transfer, the phone number will be recorded)

text - the text of the notification that will come to the dialogue (if you do not transfer, by default callback bitrix robot)

The structure of the variable in the URL address is as follows:

&phone={{{Contact: Office number}} & ampersand sign, to indicate to the browser what is next the name of the variable phone - name of the variable = - indication that next is the value of the variable {{Contact: Office number}} - the value of the variable

So, if you do not need to transmit the text , for example, you should delete this part from the URL address: &text=start

To insert the desired value (variable) from bitrix

1.Put the cursor in the place where the variable is

2.Press the tro to open the menu

3.Select the desired variable

When everything is configured, you can configure the pipeline to send a message to a received notification. For example, if you send a standard notification text from the bitrix, you can configure it as follows:

Last updated