Open Channels: Overview of Methods and Events

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 in Bitrix24 consolidate requests from external channels into a single stream and direct them to employees. The channel maintains routing rules, operator queues, auto-response scripts, working hours, and CRM integration.

The workflow operates in a chain: a client writes to a connected channel, the system creates a chat and opens a session, after which the dialogue is assigned to an employee according to the channel's rules. Within the session, the operator responds to the client, transfers the dialogue, connects a colleague, or concludes the request.

This section describes the management of each step in this chain: configuring channels, working with chats and sessions, operator actions, messages, chatbots, and events.

Quick Navigation: All Methods and Events

User Documentation: How to Create and Configure an Open Channel

How to Choose a Subsection

Scenario

What to Use

Create a channel, get a list of channels, update or delete settings

Methods imopenlines.config.*

Connect an external open channel from another Bitrix24 to the current account

Method imopenlines.network.join

Open a dialogue, work with a session, and retrieve message history

Methods from the Dialogs section

Accept a dialogue, transfer it to another employee, or conclude it

Methods from the Operators section

Send a message in a dialogue or save a quick response

Methods from the Messages section

Manage the chat linked to CRM

Methods from the CRM Chats section

Automate the dialogue using a chatbot

Methods from the Chatbots section

Subscribe to events related to messages and sessions

Events

Connection of Open Channels with Other Objects

Chat. Requests in an open channel are processed in a chat. To find the chat and retrieve its data, use the methods imopenlines.session.open and imopenlines.dialog.get. For operations with CRM chats, refer to the CRM Chats section. The main identifier is CHAT_ID.

Session. Within the chat, requests are treated as sessions. The Dialogs section provides methods for starting a session, connecting an operator, reading history, and managing modes. The main identifier is SESSION_ID.

Employee. The channel distributes requests among employees from the queue. The queue and distribution rules are configured through imopenlines.config.*, while the employee's work in an active dialogue is managed through the Operators section.

External User. Messages from the client in the external channel create a chat and session in the channel. The USER_CODE is used to communicate with the user.

Message. Message exchanges in the open channel are conducted using methods from the Messages section. Messages are linked to the chat, session, and participate in events.

Chatbot. To automate the dialogue, use methods from the Chatbots section. A chatbot can send messages, transfer the dialogue, and conclude the session.

CRM. Open channels are connected to CRM. Using methods from the CRM Chats section, you can retrieve a chat linked to a CRM object. The method imopenlines.crm.lead.create allows you to create a lead based on the dialogue.

How to Get Started

  1. Connect the source of requests:
  2. Open a dialogue and retrieve the identifiers CHAT_ID and SESSION_ID in the Dialogs section.
  3. Configure the processing of the dialogue by employees in the Operators section.
  4. For additional scenarios, use the sections Messages, Chatbots, and Events.

Limits and Response Format

Limits. General REST limitations and open channel restrictions apply to methods, such as the limit on unclosed dialogues for operators. For details, refer to the article Limit on Unclosed Dialogues for Open Channel Operators.

Response Format. A successful response typically contains result and time, while errors are returned in the format error and error_description. Examples of response structure and error codes can be found on the specific method's page.

Overview of Methods and Events

Scope: imopenlines

Who can execute the method: depending on the method and access permissions to open channels

Configuration of Open Channels and Integration

Method

Description

imopenlines.config.add

Adds a new open channel

imopenlines.config.update

Modifies the settings of an open channel

imopenlines.config.get

Retrieves an open channel by identifier

imopenlines.config.list.get

Retrieves a list of open channels

imopenlines.config.delete

Deletes an open channel

imopenlines.config.path.get

Retrieves the link to the public page of the open channels on the account

imopenlines.network.join

Connects an external open channel to the account

imopenlines.network.message.add

Sends a message to the user on behalf of the open channel

imopenlines.revision.get

Retrieves information about API revisions

Chatbots in Open Channels

Method

Description

imopenlines.bot.session.message.send

Sends an automated message in the dialogue

imopenlines.bot.session.operator

Switches the dialogue to an available operator

imopenlines.bot.session.transfer

Transfers the dialogue to an operator or queue

imopenlines.bot.session.finish

Concludes the dialogue

CRM Chats in Open Channels

Method

Description

imopenlines.crm.chat.get

Retrieves a chat by CRM object

imopenlines.crm.chat.getLastId

Retrieves the identifier of the last chat

imopenlines.crm.chat.user.add

Adds a user to an existing chat

imopenlines.crm.chat.user.delete

Removes a user from the chat

Messages in Open Channels

Method

Description

imopenlines.crm.message.add

Sends a message in the open channel

imopenlines.message.quick.save

Saves a message as a quick response

Event

Triggered By

OnOpenLineMessageAdd

When a message is added to the chat

OnOpenLineMessageUpdate

When a message is updated in the chat

OnOpenLineMessageDelete

When a message is deleted from the chat

Operators of Open Channels

Method

Description

imopenlines.operator.answer

Transfers the dialogue to the current operator

imopenlines.operator.finish

Concludes the dialogue on behalf of the current operator

imopenlines.operator.another.finish

Concludes the dialogue of another operator

imopenlines.operator.skip

Transfers the dialogue to the next operator in the queue

imopenlines.operator.spam

Marks the dialogue as spam

imopenlines.operator.transfer

Transfers the dialogue to another operator or to another channel

Dialogues of Open Channels

Method

Description

imopenlines.session.open

Retrieves the chat identifier by user code

imopenlines.dialog.get

Retrieves the operator's dialogue data

imopenlines.session.start

Starts a new session in the chat

imopenlines.message.session.start

Starts a new session based on a message

imopenlines.session.history.get

Retrieves message history and session data

imopenlines.session.join

Joins the operator to the dialogue

imopenlines.session.intercept

Transfers the dialogue to the current operator

imopenlines.session.mode.pin

Pins or unpins the selected dialogue

imopenlines.session.mode.pinAll

Pins all available dialogues to the operator

imopenlines.session.mode.unpinAll

Unpins all pinned dialogues of the operator

imopenlines.session.mode.silent

Enables or disables silent mode for the dialogue

imopenlines.session.head.vote

Saves the supervisor's rating for the completed session

imopenlines.crm.lead.create

Creates a CRM lead based on the dialogue

Event

Triggered By

OnSessionStart

When a chat is created

OnSessionFinish

When a chat is closed