Bitrix24
Due to the integration with Bitrix24, you can create leads and deals from a ticket card, as well as view information about a current status of your clients and deals on them directly in Usedesk.
Content
Integration connection
Setting up a local app
At the moment, the integration only works with Bitrix in a classic mode. You can find instructions on how to change a mode here.
First you need to set up the integration in Bitrix 24. To do this in your Bitrix24, go to «Applications» → «Developer resourses» in the left menu:
Select the «Other» section:
Then — «Local application»:
Set up an appeared window as follows:
- Application type: Server
- Your handler path: https://bitrix-integrations.usedesk.ru/api/getAuthCode
- Path for initial installation: leave blank
- Script only (no user interface): yes
- Rights setup: CRM (crm), Users (user), Business processes (bizproc)
Click «Save».
Сreating an outbound webhook
You need to set up an outbound webhook in the «Applications» section → «Developer resourses» → «Other» → «Outbound webhook»:
Set up a webhook as follows:
- Your handler URL: https://bitrix-integrations.usedesk.ru/api/webhook
- Events:
- Lead created (ONCRMLEADADD)
- Lead updated (ONCRMLEADUPDATE)
- Lead deleted (ONCRMLEADDELETE)
- Deal created (ONCRMDEALADD)
- Deal updated (ONCRMDEALUPDATE)
- Deal deleted (ONCRMDEALDELETE)
- Adding a user field in deals (ONCRMUSERFIELDADD)
- Updating a user field in deals (ONCRMUSERFIELDUPDATE)
Click «Save»:
Creating a business process for converting leads to deals
To create a business process, go to the CRM section in the left menu:
Next «More» → «Settings» → «CRM settings»:
Then «Automation» → «Business processes»:
In the «Lead» section click «Add template»:
In the appeared window set up a template as follows:
- Name: UsedeskConvert
Important: template name should be exactly like this; - Start automatically: deselect «When added» and «When changed», select «Don't show in manual start menu».
Click «Save».
Next, a window for creating a business process will open:
Click the triangular button between the «Start» and «End» blocks:
Then move your cursor over the «CRM» item:
Click «Create using source»:
In the «Create using source» block click the gear icon:
In the appeared window select «Deal» in the «Create using source» item and leave the other items as they are:
In Usedesk it will be possible to convert a lead to a deal. A deal will go into a pipeline, which is specified in the «Deal pipeline» field.
First click «Save» in the window:
Then click «Save» here:
Creating a business process for adding an additional deal to a contact
To create a business process, go to «CRM» section in the left menu:
Next, «More» → «Settings» → «CRM settings»:
Then «Automation» → «Business processes»:
In the «Lead» section click «Add template»:
In the opened window set up a template as follows:
- Name: UsedeskAddDealByLead
Important: template name should be exactly like this; - Start automatically: deselect «When added» and «When changed», select «Don't show in manual start menu».
Then go to the «Parameters» tab and add a new parameter.
Set the parameter as shown below and click «OK»:
By analogy, you need to add two more parameters. They will be optional, i. e., uncheck the «Mandatory» option when creating them.
- ID – CONTACT_ID, Name – contact id
A reminder: untick the «Mandatory» checkbox. - ID – COMPANY_ID, Name – company id
A reminder: untick the «Mandatory» checkbox.
It should look like this:
Click «Save».
Next, a window for creating a business process will open:
Click the triangular button between the «Start» and «End» blocks:
Move your cursor over the «CRM» item:
Click «Get CRM data»:
Click the gear icon of a created block:
In the opened window set up the action parameters as follows:
Important:
- To select a correct entity ID, you need to click the three dots to the left of the field, then «Template parameters» and select «Lead id».
- You need to select all the fields in the «Select fields» field. To do this, click any field inside the list of fields and press the Ctrl + A key combination.
Click «Save».
Click the triangular button between the «GetCRM data» and «End» blocks:
Next — «CRM» → «Create new deal». Click the gear icon next to the appeared block:
The following window will open:
In this window the fields are set up that will be converted from Leads to Deals, which will be created from an additional field in Usedesk, if a Lead has already been converted. The «Create deal» button is responsible for this.
First, you need to fill out the «Lead», «Contact», and «Company» fields. To do this, click the button with three dots to the right of the field, select «Templates parameters» and insert a value corresponding to the field.
In the same way you need to add fields that should also be converted when creating a deal. For example, so that a deal amount is not lost when converting. To do this, click the button with three dots to the right of the field, select «Additional Results» → «Get CRM data» and insert an appropriate value for the field.
Important: Fields that are set up in deals as mandatory must be set up. Such fields are highlighted in bold, like the «Name» field in the picture above.
After filling, save everything and do not forget to save a template itself.
Setting up an additional block in Usedesk
In Usedesk go to the «Settings» section → «Blocks»:
Adding a new dynamic block:
Setting up a block as follows:
- Name: Bitrix24 or another suitable
- Title: Bitrix24 or another suitable
- URL: https://bitrix-integrations.usedesk.ru
- Enabled: actively
- Parameters (POST):
- bitrix_client_id: App code (client_id). Located in Bitrix24 under the path: Applications → Developer resourses → Integrations tab → Local application → Edit
- bitrix_client_secret: Application key (client_secret). Located in Bitrix24 under the path Applications → Developer resourses → Integration tab→ Local application → Edit
- bitrix_redirect: https://bitrix-integrations.usedesk.ru/api/getAuthCode
- bitrix_base_host: URL of your Bitrix24 in the format https://domain.bitrix24.ru/
- bitrix_app_token: Located in Bitrix24 under the path Applications → Developer resourses → Integration tab→ Outbound webhook → Application token
Click «Save».
Аuthorization in Bitrix24
In any ticket card in Usedesk, the integration offers you to log in. To continue, click the button and follow the instructions:
After successful authorization Usedesk will show a message about it:
Update a ticket card for further work with the block:
Done, the integration is connected!
Integration principle
To transfer a deal to Bitrix24, create a client contact in a ticket card or click an existing one:
When creating a new client, fill in all the required fields and those optional fields that you need, and then click «Создать»:
Click a needed contact:
Select a lead from existing leads or create a new one:
When creating a new lead, fill in all the required fields and those optional fields that you need, and then click «Создать»:
After that, a notification about a new lead will appear in the Bitrix24 personal account:
In a ticket card in Usedesk click «Связать»:
Then «Конвертировать лид в сделку»:
A new deal notification will appear in the Bitrix24 personal account:
If necessary, you can create multiple deals from a ticket card using the «Создать сделку» button:
You can find leads from Usedesk in your personal Bitrix24 account here:
Аnd you can find deals here:
You can use the gears in the additional block of Bitrix24 to customize fields:
Don't forget to save your settings after making changes:
To see information about a deal, click it:
The following data will be displayed in the opened window:
- Information on a deal;
- Event feed — actions with a deal will be listed there;
- The «Написать комментарий» button — you can send a comment on a deal directly from Usedesk. The comment will be displayed in the Personal Bitrix24 account.