Bank 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: placement, crm

The CRM_BANK_DETAIL_AUTOCOMPLETE point connects an application handler to the bank details search in a CRM card. It is required when an application searches for and populates bank company details, for example, by BIC.

The general workflow and common errors are described in the Autofilling details in the CRM card overview.

Where to find it in the interface

To reach the search field:

  1. Open a company or contact card
  2. In the Details field, click the details link
  3. In the details form, add banking details

The handler is connected to the Find details field in the Banking details section.

If only one search source is available, its name is shown as a hint inside the field. If there are several sources, they are offered in a list below the field as you type a query. The application handler appears in this list under the name from the TITLE parameter.

Application handler in the list of bank details search sources

How to register a handler

When registering a handler using the placement.bind method, pass the value CRM_BANK_DETAIL_AUTOCOMPLETE in the PLACEMENT parameter. Bitrix24 uses this code to determine that the handler belongs to bank 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
type

Description

PLACEMENT*
string

Embedding point code. Pass the value CRM_BANK_DETAIL_AUTOCOMPLETE

HANDLER*
string

Application handler URL

TITLE
string

Handler name in the search source selection interface

OPTIONS[countries]
string

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_BANK_DETAIL_AUTOCOMPLETE',
                HANDLER: 'https://example.com/bank-detail-autocomplete/',
                TITLE: 'Bank details search',
                OPTIONS: {
                    countries: '1'
                }
            },
            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. Some parameters come in the handler URL query string, the rest in the request body.

Example POST request:

Array
        (
            [DOMAIN] => xxx.bitrix24.com
            [PROTOCOL] => 1
            [LANG] => en
            [APP_SID] => 8b3f2c5d9c1a4f6e9d7a2b4c6f8e1a3d
            [AUTH_ID] => 1f0f107e5806d5fe9a98e02021a72e57645f86a
            [AUTH_EXPIRES] => 3600
            [REFRESH_ID] => 1f0f107a80816604b24a8719792ac2a21d629b5
            [SERVER_ENDPOINT] => https://oauth.bitrix.info/rest/
            [APPLICATION_TOKEN] => ec1b2074a9d3f5c81b6e40d27a95cf38
            [APPLICATION_SCOPE] => crm,placement
            [member_id] => da45a03b265edd8787f8a258d793cc5d
            [status] => L
            [PLACEMENT] => CRM_BANK_DETAIL_AUTOCOMPLETE
            [PLACEMENT_OPTIONS] => {"searchQuery":"044599999","URI":"\/bitrix\/components\/bitrix\/crm.requisite.details\/slider.ajax.php?requisite_id=n0&sessid=1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d&etype=4&eid=2979&external_context_id=COMPANY_2979&pid=1&cid=0&IFRAME=Y&IFRAME_TYPE=SIDE_SLIDER"}
        )
        

Parameters in the Handler URL Query String

Parameter
type

Description

DOMAIN*
string

The Bitrix24 address where the widget handler was invoked

PROTOCOL*
string

Secure or non-secure HTTP protocol:

  • 0 - HTTP
  • 1 - HTTPS

LANG*
string

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

Application session identifier. Bitrix24 generates a new one each time the widget is rendered and uses it to link the js library with the application environment

Parameters in the POST Request Body

Parameter
type

Description

AUTH_ID
string

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
integer

Time in seconds after which the authorization token will become invalid

REFRESH_ID
string

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

SERVER_ENDPOINT*
string

Address of the Bitrix24 authorization server needed to refresh OAuth 2 tokens

APPLICATION_TOKEN*
string

Application token. The same value is passed in the application_token parameter when event handlers are invoked. The widget handler can use it to verify that the request came from Bitrix24

APPLICATION_SCOPE*
string

List of scopes granted to the application, separated by commas. Shows which REST API methods are available with the authorization token received

member_id*
string

Unique string identifier of Bitrix24 where the widget handler was invoked.

status
string

Type of application that registered the handler for this widget. Accepts values:

  • L - local application
  • F - free mass-market application
  • D - demo version of a mass-market application
  • T - trial version of a mass-market application, time-limited
  • P - paid mass-market application

PLACEMENT*
string

The placement code. You can use the same handler URL for all your widgets. The value that Bitrix24 will report in the PLACEMENT parameter will help determine from which specific placement your handler was invoked in each case

PLACEMENT_OPTIONS
string

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 PLACEMENT_OPTIONS parameter, along with the PLACEMENT parameter, allows you to accurately determine for which specific placement and object the widget handler was invoked

Bitrix24 adds a URI key to PLACEMENT_OPTIONS — the path with the query string of the page from which the widget was opened. It arrives for any placement, along with the keys of that placement itself. The key is absent if the browser did not send the Referer header or if the widget was opened from a page on a different domain.

PLACEMENT_OPTIONS

The value of PLACEMENT_OPTIONS is passed as a JSON string with the context of the call.

Parameter
type

Description

searchQuery*
string

The string that the user entered in the bank details search field

URI*
string

Address of the page the widget is opened from. The details form is a separate document of the crm.requisite.details component, so its address arrives here instead of the client card address. The client identifier is passed in the eid and external_context_id parameters

How to return found options

Pass the found options using the BX24.placement.call command with the name crmShowFoundEntities.

Field
type

Description

data
array

List of found options

data[].id
string

Option identifier on the application side

data[].name
string

Option name that will be shown to the user

data[].phone
string

Option phone. Pass the field if the number is found

data[].email
string

Option E-mail. Pass the field if the address is found

data[].web
string

Option website. Pass the field if the website is found

BX24.placement.call(
            'crmShowFoundEntities',
            {
                data: [
                    {
                        id: 'bank-044525225',
                        name: 'Ltd. Superbank',
                        phone: '+1 495 000-00-00',
                        web: 'https://bank.example.com'
                    }
                ]
            }
        );
        

How to create a 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
type

Description

appSid
string

Application session identifier in which the selected option was found

data
object

Selected option data from the list that the application passed via crmShowFoundEntities

In the fields object, pass the bank detail fields that need to be populated in the CRM card.

BX24.placement.bindEvent('onCrmEntityIsNeedToCreate', function (eventData) {
            const selected = eventData.data;
            const selectedTitle = selected.title || selected.name;
        
            BX24.placement.call(
                'crmShowCreatedEntity',
                {
                    entityType: 'bank',
                    id: selected.id,
                    title: selectedTitle,
                    fields: {
                        NAME: selectedTitle,
                        RQ_BANK_NAME: selectedTitle,
                        RQ_BIK: '044525225',
                        RQ_BANK_ADDR: 'New York City',
                        RQ_COR_ACC_NUM: '30101810400000000225',
                        RQ_SWIFT: 'EXAMPLERU'
                    }
                }
            );
        });
        

Fields of the crmShowCreatedEntity command:

Field
type

Description

entityType
string

Type of the created option on the application side

id
string

Identifier of the created option on the application side

title
string

Name of the created option

fields
object

Bank details fields that need to be filled into the CRM card

Bank detail fields:

Field
type

Description

NAME
string

Bank name

RQ_BANK_NAME
string

Bank name in bank details

RQ_BIK
string

Bank BIK

RQ_BANK_ADDR
string

Bank address

RQ_COR_ACC_NUM
string

Correspondent account

RQ_SWIFT
string

SWIFT

Continue Learning