Bitrix24 Internal Chat Bot Development

Our company is engaged in the development, support and maintenance of Bitrix and Bitrix24 solutions of any complexity. From simple one-page sites to complex online stores, CRM systems with 1C and telephony integration. The experience of developers is confirmed by certificates from the vendor.
Showing 1 of 1All 1626 services
Bitrix24 Internal Chat Bot Development
Medium
~1-2 weeks
Frequently Asked Questions

Our competencies:

Development stages

Latest works

  • image_website-b2b-advance_0.webp
    B2B ADVANCE company website development
    1356
  • image_bitrix-bitrix-24-1c_fixper_448_0.webp
    Website development for FIXPER company
    943
  • image_bitrix-bitrix-24-1c_development_of_an_online_appointment_booking_widget_for_a_medical_center_594_0.webp
    Development based on Bitrix, Bitrix24, 1C for the company Development of an Online Appointment Booking Widget for a Medical Center
    693
  • image_bitrix-bitrix-24-1c_mirsanbel_458_0.webp
    Development based on 1C Enterprise for MIRSANBEL
    828
  • image_crm_dolbimby_434_0.webp
    Website development on CRM Bitrix24 for DOLBIMBY
    731
  • image_crm_technotorgcomplex_453_0.webp
    Development based on Bitrix24 for the company TECHNOTORGKOMPLEKS
    1073

Bitrix24 Internal Chat Bot Development

Imagine a sales team of 12 managers spending 20 minutes per day on average searching for tasks and contacts in Bitrix24. An internal chatbot can automate these queries, responding to commands like /deals or /client in seconds. We develop bots for Bitrix24's internal chat from scratch: from registering in the im module to asynchronous architecture and OAuth authorization.

Bitrix24's internal chat is not just a messenger — it handles CRM notifications, task reminders, and alerts from external systems. A bot automates the routine: answers employee questions, aggregates data from different modules, and executes commands directly from the chat window. Our experience includes 50+ projects for sales, HR, and IT support departments. The bot works via Bitrix24 REST API and can perform actions on behalf of a user.

What an internal bot offers compared to a client-facing one

A client-facing bot works in open channels and is limited: it has no access to CRM or tasks. An internal bot, on the other hand, gets full access to portal data via REST API, can use a specific user's permissions, and send rich messages to group chats. Registration is done via imbot.register without the OPENLINE: Y flag. This makes it three times more effective for internal process automation.

Typical scenarios and their implementation

HR bot

An employee types /vacation 15.07-28.07 → the bot creates a vacation request via timeman.absence.create, notifies the manager, and marks days in the calendar via calendar.event.add. No need to navigate through Bitrix24 sections.

Reporting bot

A manager types /report sales june → the bot makes a crm.deal.list request with filters by date and responsible person → generates a summary right in the chat: deal count, total amount, conversion by stages.

On-duty bot

Monitors external systems (server, website, task queue) → when thresholds are exceeded, sends an alert to the engineer on duty with buttons "Accepted", "Escalate".

IT helpdesk bot

An employee describes a problem → the bot creates a task in the tech support project via tasks.task.add, assigns a performer by rotation, and sends the ticket number. Ticket status can be queried with /ticket 1234.

Registration and command handling

The bot is registered with a command handler:

POST /rest/imbot.register
{
  "CODE": "internal_helper",
  "EVENT_MESSAGE_ADD": "https://your-server.com/internal-bot/message",
  "EVENT_COMMAND_ADD": "https://your-server.com/internal-bot/command",
  "OPENLINE": "N"
}

Commands are registered via imbot.command.register:

{
  "BOT_ID": 456,
  "COMMAND": "report",
  "COMMON": "Y",
  "HIDDEN": "N",
  "EXTRANET_SUPPORT": "N",
  "LANG": [{"LANGUAGE_ID": "en", "TITLE": "Sales report", "PARAMS": "period"}]
}

After registration, the command appears in chat autocomplete when typing /. More details on REST API can be found in the official documentation.

Step-by-step registration guide

  1. Create an application in Bitrix24 (Developers section).
  2. Obtain the application code and set up event handlers.
  3. Execute imbot.register with your server handler.
  4. Register commands via imbot.command.register with parameters.
  5. Set up webhook processing and return 200 OK.

Case study: bot for a sales department

Task: 12 managers frequently ask "how many open deals do I have", "when was the last contact with client X", "what are today's tasks". The client — a company with over 500 deals monthly.

Implementation: Python (FastAPI) + Bitrix24 REST API. Commands:

  • /deals → list of a manager's open deals with amounts and stages.
  • /client [name] → search for a contact with last activity.
  • /tasks → today's tasks with deadlines.
  • /call [phone] → initiate an outgoing call.

Authorization: the bot uses the user's token obtained via OAuth on first contact. Tokens are stored in Redis with a TTL of 30 days.

Savings: 15–20 minutes per manager per day, which at an average salary translates to a 30% reduction in routine costs. Load is minimal — 3–5 API requests per command. Payback period: less than a month.

The main challenge: token rotation. Bitrix24 REST tokens last 1 hour, refresh tokens 30 days. If a user doesn't interact with the bot for 30 days, re-authorization is needed. Solution: use a webhook instead of OAuth for portal applications (webhook never expires but uses application permissions, not a specific user's).

Why asynchronous processing is mandatory

The bot service must respond to a Bitrix24 webhook within 3 seconds. Otherwise, Bitrix24 considers the request unsuccessful and repeats it, leading to duplicate messages. Asynchronous processing reduces duplicates by 10x compared to a synchronous approach.

Correct architecture:

  1. The webhook receives the request, immediately returns 200 OK.
  2. The task is placed in a queue (Redis Queue, RabbitMQ).
  3. A worker processes the task asynchronously, replies via imbot.message.add.
Approach Response time Duplicate risk Complexity
Synchronous <3 sec High Low
Asynchronous <1 sec Low Medium

Effort estimation

Component Effort
Basic bot (3–5 commands) 16–32 h
OAuth user authorization 8–16 h
Complex commands with data aggregation 16–40 h
Queue + asynchronous processing 8–16 h
Deployment, monitoring, tests 8–16 h

What is included in the work?

  • Full cycle: scenario audit, prototyping, development, testing, deployment.
  • Documentation for commands and operations.
  • Setup of monitoring and alerting.
  • Administrator training.
  • 6-month warranty on code.

Get a consultation on your bot's architecture — our engineers are 1C-Bitrix certified with 5+ years of bot development experience. Contact us — we will evaluate your project within one day.

Open Lines: Where It All Begins and Breaks

The Open Lines module (imopenlines) is the standard Bitrix24 mechanism for omnichannel communications. It connects an external channel to an internal chat via the Im\Model\ChatTable entity. The problem is that out-of-the-box routing settings are primitive: "in turn" or "all at once." For a real sales department with 15+ managers, VIP clients, and SLA response times, this is not enough. We enhance routing via event handlers OnImOpenLinesChatStart and the REST API.

A manager switching between five windows loses messages, forgets to reply—the client leaves for a competitor who responded in 30 seconds. Bitrix24 messenger configuration gathers all channels into one interface, and CRM records every touch. Experience shows that after setup, average first response time drops by 40% within the first week.

How we implement messenger integration

We connect Telegram, WhatsApp, Viber, VK, online chat, email, and other channels via standard connectors or REST API. Each channel requires its own configuration, but the result is unified—all messages end up in open lines, and from there into the client card. We guarantee no message gets lost: we use tagged caching and agents to check queues.

How to connect WhatsApp to Bitrix24?

WhatsApp is the main business channel. Integration via WhatsApp Business API with a verified account. We configure sending and receiving messages from the Bitrix24 interface—they fall into an open line. We create HSM templates for initiating dialog (abandoned cart reminders, order status). Templates go through Meta moderation—allow 2-3 days. We ensure file, image, and document transfer. We link conversations to contacts and deals via CRM_ENTITY_TYPE and CRM_ENTITY_ID.

Method Nuances Payment Model
WhatsApp Business API (Cloud) Verification via Meta Business, templates, bulk messaging Per conversation window (24h)
Provider (Edna, Wazzup, Chat2Desk) Quick start, intermediary service, own limits Subscription fee
Bitrix24 CRM Marketing Built-in integration, minimal setup Included in Professional+ tariff

Telegram: Free Channel with High Reach

Telegram Bot API is free and well-documented—a pleasant rarity among messengers. Integration into Bitrix24 is done via the imopenlines connector. Setup: connect the bot to open lines, configure the connector to Telegram. Receiving messages, photos, videos, documents—all mapped to the Bitrix24 chat. Inline buttons and reply keyboards for navigation. Webhook on https://yourdomain/rest/imconnector.register—register the connector. CRM integration: incoming message creates a lead via crm.lead.add or an activity in the deal.

Telegram is indispensable for:

  • Support via bot—standard questions resolved without an operator (up to 70% of inquiries).
  • Notifications: orders, delivery, payment—via Telegram Bot API sendMessage.
  • Lead collection: bot asks qualifying questions → creates a lead.

Viber and VK: Audience 35+ and Social Network

Viber maintains positions in regions. We connect a business account via the open lines connector. We use Viber Business Messages—bulk messaging with action buttons and rich content. Receiving and sending from CRM works immediately.

VK (Vkontakte) is the largest social network in Russia. Integration via the imopenlines community messages connector. Process messages and comments from a single interface. Auto-creation of a lead—handler OnImOpenLinesCrmCreate. Integration with VK Ads for tracking sources via UTM. Bot for auto-replies—VK Bot API + Callback API.

Why is proper routing of inquiries important?

Distribution of inquiries among operators is organized through queue mechanisms. By default: "who is free." In reality, more complexity is needed:

  • Determining responsible person by number or email from CRM—im.chat.get + search via crm.contact.list.
  • Distribution by departments based on keywords (NLP classifier or simple regex on first message).
  • Priority queue for VIP—by segment in CRM.
  • Escalation on 5-minute timeout—auto-switch to next.
  • Transition to call directly from chat—telephony.externalcall.register.

We use custom event handlers OnImOpenLinesChatStart and REST API to implement such scenarios. Additionally, we connect Bizproc for complex approval chains and integration with HL blocks for storing custom queue parameters. Result: client does not wait, operator is not overloaded.

What is included in messenger integration work

Component Description
Audit of current CRM structure Analysis of inquiry types, channels, operator load
Connecting channels Configuration of WhatsApp, Telegram, Viber, VK, email, online chat connectors
Routing setup Queues, distribution by competence, escalations, SLA
Chatbot development Script-based or with NLP, integration with CRM and external APIs
Operator training Documentation, video instruction recording, webinar
Testing and support Running all scenarios, 2-week monitoring after launch
6-month warranty Free bug fixes, consultations

Chatbots: Script-Based and with NLP

Types

Script-based (rule-based): button menu, decision tree. "How to pay" → "Where is my order" → "Business hours." Transfer to operator at intent == 'unknown' → transfer_to_queue. Reliable, predictable, covers 60-70% of typical inquiries.

With NLP: free text in Russian. Intent detection (buy, complain, inquire about delivery), entity extraction (name, date, order number). Contextual dialog—remembers what was discussed. Implemented on Rasa or Dialogflow, integrated with Bitrix24 via REST.

Example handler code for a script-based bot (PHP)
use Bitrix\Main\Loader;
use Bitrix\Imopenlines\Model\SessionTable;

Loader::includeModule('imopenlines');

$eventManager = \Bitrix\Main\EventManager::getInstance();
$eventManager->addEventHandler('imopenlines', 'OnImOpenLinesMessageReceive', function($event) {
    $message = $event->getParameter('message');
    $chatId = $event->getParameter('chatId');
    
    if (preg_match('/order status (\d+)/i', $message, $matches)) {
        $orderId = $matches[1];
        // Get order status via API
        $order = \Bitrix\Sale\Order::load($orderId);
        if ($order) {
            $status = $order->getField('STATUS_ID');
            \Bitrix\ImOpenLines\Chat::sendMessage($chatId, 'Your order #' . $orderId . ' status: ' . $status);
        }
    }
});

Scenarios and Real Impact

Scenario Action Operator Relief
FAQ Answers from knowledge base based on intent match 30-50%
Order status Request sale.order.get by number 15-25%
Booking Date/specialist selection, creation via API 20-30%
Calculation Preliminary estimate based on parameters 10-20%
Lead qualification Data collection → crm.lead.add 3x funnel acceleration
NPS/CSAT Rating after service 100% automatic collection

Comparison: a script-based bot processes requests 5 times faster than an operator, and an NLP bot reduces fallback rate to 15% after training on real dialogs. Average savings on operator salary when implementing a chatbot amount to substantial monthly savings.

How can chatbots transform your customer support?

Development Process

  1. Inquiry analysis—export history from open lines, cluster by topic. Identify 80% of typical requests.
  2. Dialog design—map on miro/figma. Each branch ends either with an answer or transfer to operator.
  3. Development—logic, integration with CRM and external APIs. For script-based: finite state machine. For NLP: pipeline: tokenizer → featurizer → classifier → response selector.
  4. NLP training—on real dialogs (at least 500 examples). Set confidence threshold.
  5. Testing—run all branches, edge cases (empty message, sticker, voice).
  6. Optimization—monitor fallback rate, retrain on new dialogs every 2 weeks.

Timeline

Task Duration
Single messenger connection 1-2 days
Open lines setup 2-3 days
Script-based bot (basic) 1-2 weeks
Bot with NLP 3-6 weeks
Comprehensive omnichannel system 4-8 weeks

Result: all communications in one window, routine automated, no message lost. Managers sell, not search for the right chat. Evaluate which channels you need—contact us, we'll select for your niche. Get a personalized timeline and cost estimate for your project.