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, work hours, and CRM integration.

The workflow operates in a chain: a customer 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 customer, 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 line, get a list of lines, update or delete settings

Methods imopenlines.config.*

Connect an external Open Channel from another Bitrix24 to the current portal

Method imopenlines.network.join

Open a dialog, work with a session, and get message history

Methods from the Dialogs section

Accept a dialog, transfer it to another employee, or end it

Methods from the Operators section

Send a message in a dialog or save a quick reply

Methods from the Messages section

Manage a chat associated with CRM

Methods from the CRM Chats section

Automate a dialog using a chatbot

Methods from the Chatbots section

Subscribe to events for messages and sessions

Events

Connection 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 customer 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.

Getting Started

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

Limits and Response Format

Limits. General REST limitations and open channel restrictions apply to methods, such as the limit on unclosed conversations for operators. For details, refer to the article Limit on Unclosed Conversations 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 automatic message in the dialogue

imopenlines.bot.session.operator

Switches the dialogue to a free operator

imopenlines.bot.session.transfer

Transfers the dialogue to an operator or queue

imopenlines.bot.session.finish

Ends 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 to an Open Channel

imopenlines.message.quick.save

Saves a message as a quick reply

Event

Triggered

OnOpenLineMessageAdd

When adding a message to a chat

OnOpenLineMessageUpdate

When changing a message in a chat

OnOpenLineMessageDelete

When deleting a message in a 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

Gets operator dialog data

imopenlines.session.start

Starts a new session in a chat

imopenlines.message.session.start

Starts a new session based on a message

imopenlines.session.history.get

Gets message history and session data

imopenlines.session.join

Attaches an operator to a dialog

imopenlines.session.intercept

Transfers the dialog to the current operator

imopenlines.session.mode.pin

Pins or unpins the selected dialog

imopenlines.session.mode.pinAll

Assigns all available dialogs to an operator

imopenlines.session.mode.unpinAll

Unassigns all assigned dialogs from an operator

imopenlines.session.mode.silent

Turns the dialog's silent mode on or off

imopenlines.session.head.vote

Saves the supervisor's evaluation for the completed session

imopenlines.crm.lead.create

Creates a CRM lead based on a dialog

Event

Triggered

OnSessionStart

When creating an Open Channel session

OnSessionFinish

When closing an Open Channel session