Client Details Autofill Point in CRM
If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the MCP server so that the assistant can utilize the official REST documentation.
Scope:
crm
The CRM_REQUISITE_AUTOCOMPLETE point connects an application handler to the search for client details in a CRM card. It is required when an application searches for and populates Company details for a company or contact from an external source.
The general workflow and common errors are described in the Autofilling details in the CRM card overview.
How to register a handler
When registering a handler using the placement.bind method, pass the value CRM_REQUISITE_AUTOCOMPLETE in the PLACEMENT parameter. Bitrix24 uses this code to determine that the handler belongs to client details autofill.
Connection parameters are not included in the data that Bitrix24 passes to the handler during a search.
Required parameters are marked with *
|
Parameter |
Description |
|
PLACEMENT* |
Embedding point code. Pass the value |
|
HANDLER* |
Application handler URL |
|
TITLE |
Handler name in the search source selection interface |
|
OPTIONS[countries] |
Country identifiers separated by commas without spaces. If the parameter is not passed, the handler is available to all countries for which the search field is open. Country identifiers can be obtained via the crm.requisite.preset.countries |
Example of registering a handler:
BX24.callMethod(
'placement.bind',
{
PLACEMENT: 'CRM_REQUISITE_AUTOCOMPLETE',
HANDLER: 'https://example.com/requisite-autocomplete/',
TITLE: 'Search for details',
OPTIONS: {
countries: '1,14'
}
},
function(result)
{
if (result.error())
{
console.error(result.error());
}
}
);
What the handler receives
Bitrix24 sends a POST request with the point data to the handler. The searchQuery string is passed in the PLACEMENT_OPTIONS parameter — this is the string that the user entered in the details search field.
Example POST request:
Array
(
[DOMAIN] => xxx.bitrix24.com
[PROTOCOL] => 1
[LANG] => ru
[APP_SID] => 8b3f2c5d9c1a4f6e9d7a2b4c6f8e1a3d
[AUTH_ID] => 1f0f107e5806d5fe9a98e02021a72e57645f86a
[AUTH_EXPIRES] => 3600
[REFRESH_ID] => 1f0f107a80816604b24a8719792ac2a21d629b5
[member_id] => da45a03b265edd8787f8a258d793cc5d
[status] => L
[PLACEMENT] => CRM_REQUISITE_AUTOCOMPLETE
[PLACEMENT_OPTIONS] => {"searchQuery":"1707083893"}
)
|
Parameter |
Description |
|
DOMAIN* |
The Bitrix24 address where the widget handler was invoked |
|
PROTOCOL* |
Secure or non-secure HTTP protocol:
|
|
LANG* |
The user interface language of Bitrix24 that invoked the widget. You can localize the interface language in your widget based on this value |
|
APP_SID |
String identifier of the application that registered the widget handler |
|
AUTH_ID |
Authorization token OAuth 2 issued for the user who invoked the widget. Can be used for REST API calls on behalf of this user |
|
AUTH_EXPIRES |
Time in seconds after which the authorization token will become invalid |
|
REFRESH_ID |
Refresh token OAuth 2 issued for the user who invoked the widget. Can be used to refresh the authorization token on behalf of this user |
|
member_id* |
Unique string identifier of Bitrix24 where the widget handler was invoked. |
|
status |
Type of application that registered the handler for this widget. Accepts values:
|
|
PLACEMENT* |
Code for the widget embedding location. You can use the same handler URL for all your widgets. The value that Bitrix24 will report in the |
|
PLACEMENT_OPTIONS |
Additional data in the form of a JSON string that defines the context of the widget execution. For example, this could be an array containing the numeric identifier of the CRM object in the detail form where the widget handler was invoked, etc. The |
How to return found options
Pass the found options using the BX24.placement.call command with the name crmShowFoundEntities.
|
Field |
Description |
|
data |
List of found options |
|
data[].id |
Option identifier on the application side |
|
data[].name |
Option name that will be shown to the user |
|
data[].phone |
Option phone. Pass the field if the number is found |
|
data[].email |
Option E-mail. Pass the field if the address is found |
|
data[].web |
Option website. Pass the field if the website is found |
BX24.placement.call(
'crmShowFoundEntities',
{
data: [
{
id: 'company-123',
name: 'Acme LLC',
phone: '+1 495 000-00-00',
email: 'info@example.com',
web: 'https://example.com'
}
]
}
);
How to create the selected option
If a user selects an option from the application response, Bitrix24 triggers the onCrmEntityIsNeedToCreate interface event. Subscribe to it using the BX24.placement.bindEvent method.
The data of the selected option is passed to the onCrmEntityIsNeedToCreate event handler.
|
Field |
Description |
|
appSid |
Application session identifier in which the selected option was found |
|
data |
Data of the selected option from the list that the application passed via |
In the fields object, pass the detail fields that should be populated in the CRM card. The composition of the object depends on the data that the application retrieved from its source.
BX24.placement.bindEvent('onCrmEntityIsNeedToCreate', function (eventData) {
const selected = eventData.data;
const selectedTitle = selected.title || selected.name;
BX24.placement.call(
'crmShowCreatedEntity',
{
entityType: 'company',
id: selected.id,
title: selectedTitle,
fields: {
RQ_COMPANY_NAME: selectedTitle
}
}
);
});
Fields of the crmShowCreatedEntity command:
|
Field |
Description |
|
entityType |
Created object type. For a company, pass |
|
id |
Created object identifier on the application side |
|
title |
Created object name |
|
fields |
Requisite fields to be inserted into the CRM card |