Salebot.ai
Search…
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

First you need to install the application in Bitrix and then connect it to the SaleBot. If you do it vice versa then the card does not appear in the contact center.
To integrate with CRM Bitrix, you must configure both CRM and Salebot
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)
If you connect the Bitrix to the Salebot and changed the CRM mode to Bitrix, be sure to change it in the project settings to the Salebot (bitrix_crm_mode)

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:
Column Field
Only fields with String type can be written by name
The fields: TITLE, COMMENTS, NAME, LAST_NAME, SOURCE_ID, ASSIGNED_BY_ID, STAGE_ID, TYPE_ID, IS_RETURN_CUSTOMER, CONTACT_ID - are service fields and their filling automatically

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
When working in advanced mode, the variables will be written in the deal field, where the dialogue takes place, rather than in the lead. As it happens in extended mode without Open Channels
Be sure, that the new lead will be created, if the necessary information is received to return the response to the client. If the client has contacted via a social network or external messenger (i.e. when there is smth, where to write back the answer), the Lead will be created. If the client writes to the channel and does not specify any data about himself, and then leaves the site, it will be impossible to respond him, the client simply does not receive any message, so such Lead CRM will not fix
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
Open line name change is prohibited! Irretrievable changes will occur
After sending data to a yellow or red block in the Salebot, the person whose identifier is specified in the bitrix24 connection settings to the Salebot will be responsible
Also responsible can be changed in the calculator

Possible connection errors

Open line name change is prohibited! Irretrievable changes will occur
If you have duplicate messages from bitrix24, you need to do the following:
  1. 1.
    Disable bitrix24 in all Salebot projects
  2. 2.
    Disable Salebot integration into bitrix24
  3. 3.
    Salebot re-integrate into bitrix24
  4. 4.
    Connect bitrix24 to one Salebot project
If the connection goes to 2 or more Salebot projects - duplicates and problems with requests are possible

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

This feature can be connected only by Bitrix24 administrator
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}}
Attention! If 2 or more parameters are passed simultaneously for some reason, the priority is the following:
1.line
2.contact_id
3.lead_id
4 4.deal_id
For example, deal_id and and contact_id are given simultaneously , the system will search for the user by contact_id, as the priority is higher, and deal_id will ignore the request.
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.
Names of the variables reserved by system: line, lead_id, deal_id, bitrix_lead_id, bitrix_deal_id, bitrix_id, bitrix_contact_id
You can’t name the variables like that, the data just will be not recorded

How to start a bot when the Deal status is changed

For other situations , the same way
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

For other situations , the same way
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.
Works only for WhatsApp
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:
Copy link
On this page
How to connect Bitrix
Authorization
The example
How to set an operating mode:
How to Fill Deal and Lead Fields
How to Find out Custom Field ID
How to Create a Custom Field
How to Connect Open Channels Bitix24
How to Assign a Responsible person creating an Open Line
Possible connection errors
How to Disable Messages from Bitrix24
How to write first in Whatsapp
How to Configure Webhook in Bitrix24
How to start a bot when the Deal status is changed
How to respond to the client when changing the Deal/Lead stage
How to start a bot with Bitrix robot