Open Channels Dialogs: Overview of Methods
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.
Open Channels dialogs are chats with clients via messengers, social networks, or online chats.
A dialog can consist of multiple sessions. Each session represents one cycle of handling requests: connecting an operator, exchanging messages, concluding, and evaluating.
The methods in this section allow you to:
- open a dialog based on external client data,
- initiate and manage sessions,
- connect operators,
- change dialog modes,
- transfer communication results to CRM.
Quick navigation: all methods
User documentation: How to work with the dialog list in Open Channels
Connection of Dialogs with Other Objects
Open Channels. A dialog belongs to an open channel and inherits its processing rules: queues, routing, and operating modes. To work with channel settings, use the group of methods imopenlines.config.*.
Chat. The system represents each dialog as a chat in the open channel. Operations with messages, operators, and sessions are performed through the chat.
External Channel User. The external client is linked to the dialog through communication channel data. Based on this data, the system determines which dialog the request pertains to.
Operators. Operators participate in handling sessions: they accept dialogs, transfer them, and conclude requests. For operator scenarios, use the methods in the Operators section.
CRM. Communication results from the dialog can be transferred to CRM, allowing further work using the methods crm.lead.*.
Main Identifiers
|
Identifier |
Description |
|
|
User code from the external communication channel. Format: |
|
|
Internal identifier of the chat in Bitrix24. The main parameter for methods working with the dialog. Format: integer. Example: |
|
|
String representation of the chat. Used only in |
|
|
Identifier of a separate session within the dialog. Format: integer. Example: |
How to Work with Dialogs
Retrieve Dialog Data
To retrieve data for the current dialog, use imopenlines.dialog.get.
If the dialog needs to be found based on external client data, first call imopenlines.session.open, then pass the obtained identifier to imopenlines.dialog.get.
Start a Session
To initiate a new processing cycle in the current chat, call imopenlines.session.start.
If you need to start a new session from a specific message, use imopenlines.message.session.start.
Connect an Operator
To have an operator join the dialog, use imopenlines.session.join.
To have the current operator take over the dialog, use imopenlines.session.intercept.
Retrieve History
Call imopenlines.session.history.get to obtain messages, session status, and related data.
Manage Dialog Modes
To pin and unpin dialogs, use imopenlines.session.mode.pin, imopenlines.session.mode.pinAll, imopenlines.session.mode.unpinAll.
To toggle silent mode, use imopenlines.session.mode.silent.
Conclude Processing and Transfer Data to CRM
After concluding the dialog, you can save the supervisor's evaluation using the method imopenlines.session.head.vote. The communication result can be transferred to CRM using the method imopenlines.crm.lead.create.
User Documentation
Response Format and Error Handling
Most methods in this section return a result object and a service block time.
When integrating, check:
- HTTP response status,
errorfield anderror_descriptiontext for status400,- method-specific error codes on the specific method page.
For access errors and incorrect identifiers, first check the user's permissions for the dialog and the correctness of the values for CHAT_ID, SESSION_ID, DIALOG_ID, and USER_CODE.
Overview of Methods
Scope:
imopenlinesWho can execute the method: any user with dialog permissions
Start and Retrieve Dialog
|
Method |
Description |
|
Retrieves the chat identifier by user code |
|
|
Returns dialog data by one of the identifiers |
|
|
Starts a new session in the current chat |
|
|
Starts a new session based on the selected message |
|
|
Returns message history and session data |
Connect Operator to Dialog
|
Method |
Description |
|
Joins the current operator to the dialog |
|
|
Transfers the dialog to the current operator |
Manage Dialog Modes
|
Method |
Description |
|
Pins or unpins the selected dialog |
|
|
Pins all available dialogs to the current operator |
|
|
Unpins all pinned dialogs from the current operator |
|
|
Turns the dialog's silent mode on or off |
Save Results and Create Lead
|
Method |
Description |
|
Saves the supervisor's evaluation for the completed session |
|
|
Creates a CRM lead from the open channel dialog |