WhatsApp bot development with Bitrix24 integration

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
WhatsApp bot development with Bitrix24 integration
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

Development of a WhatsApp bot with Bitrix24 integration

An online store processes 300 orders a day. Every second customer writes to support asking about order status. Operators are overloaded, responses are delayed. The standard WhatsApp doesn't work — an automated bot integrated with CRM is needed. Without integration, each incoming message means a manual search for the order, switching between windows, and wasted time. Bitrix24 allows automatic creation of leads, deals, and activities from chat. But for this to work, you need to properly connect the API, configure webhooks, and handle Meta's restrictions. WhatsApp Business API is the only legal way, and we'll explain how to connect it to Bitrix24. We'll cover two main approaches: through an official BSP provider (Wazzup, 360dialog) and the unofficial Green API, and show a bot architecture on a specific case.

How to connect WhatsApp to Bitrix24 without risk of blocking?

Meta does not give direct access to WhatsApp Business API — you work through Business Solution Providers (BSPs): 360dialog, Twilio, MessageBird, WABA.cloud. The provider registers your number in WhatsApp Business and issues API keys. The official path guarantees stability, compliance with Meta policy, and the ability to use message templates. Without it, the number gets blocked after sending a few dozen outgoing messages. The first message to a customer (not a reply to an incoming message) must go through an approved template — moderation takes 24–72 hours. Arbitrary text is only allowed in response to an incoming message within 24 hours.

What is a BSP provider and why is it needed?

Popular options for the Russian market:

  • Green API — a Russian provider, fast registration, has a ready module for Bitrix24. Technically uses a WhatsApp web client, which is unofficial, but for medium businesses it's a working option.
  • Wazzup — native integration with Bitrix24, an official application in the marketplace. Easier to configure, but limits custom logic.
  • Chat2Desk — an omnichannel service with WhatsApp and Bitrix24 support.

Bot architecture via Green API + Bitrix24

Client in WhatsApp
      ↓
Green API (webhook instanceId + apiTokenInstance)
      ↓
Bot server
      ↓ ↓
  Bot logic     Bitrix24 REST API
                (crm.lead.add, crm.contact.list, etc.)

Receiving incoming messages:

GET https://api.green-api.com/waInstance{instanceId}/receiveNotification/{apiTokenInstance}

Reply in WhatsApp:

POST https://api.green-api.com/waInstance{instanceId}/sendMessage/{apiTokenInstance}
{
  "chatId": "[email protected]",
  "message": "Hello! How can I help?"
}

Integration with Bitrix24 is similar to a Telegram bot: search for contact by phone number, create lead, record activities in timeline.

Provider comparison

Provider Setup Integration with Bitrix24 Custom logic
Wazzup Easy (via marketplace) Native, ready-made Limited to routing
Green API Medium (REST API) Via module or custom Full freedom
Chat2Desk Medium (web interface) Via module Limited by settings

Green API is easier to set up for a custom bot than Wazzup, roughly twice as fast if non-standard logic is needed.

Key differences from Telegram

WhatsApp supports limited formatting: italic, bold, strikethrough, monospace. No HTML tags, no Reply buttons (only via official API Templates). In unofficial APIs (Green API), buttons are not available — only text menu: "Write 1 — order status, 2 — contact operator". Through the official API, Interactive Messages with buttons are available, but only within approved templates.

Media transfers well: images, documents, voice messages. The bot can receive photos (e.g., for a return request) and save them to Bitrix24 Drive via disk.folder.uploadfile.

Integration via Wazzup ready module

If there is no need to implement complex bot logic, it's simpler to use Wazzup with ready integration:

  1. Register in Wazzup, connect a WhatsApp number.
  2. Install the Wazzup app from Bitrix24 marketplace.
  3. Configure mapping: incoming WhatsApp messages → open line → lead/deal in CRM.
  4. Operators reply from Bitrix24, the client receives the answer in WhatsApp.

Limitation: no custom bot logic — only routing to operators.

Case study: bot for delivery status notifications

Our client — an electronics online store with 200–400 orders per day. Customers flooded support with "where is my order" questions. We developed an automatic bot on Green API.

Solution: when the order status changes in CRM (deal stage) → webhook → bot server → send notification via WhatsApp.

def on_deal_stage_change(deal_id, new_stage):
    deal = bitrix.get_deal(deal_id)
    phone = deal['CONTACT_PHONE']
    whatsapp_id = f"{phone.replace('+', '')}@c.us"

    messages = {
        'ACCEPTED': 'Your order has been accepted for processing. Order number: {order_num}',
        'SHIPPED': 'Your order has been shipped. Tracking number: {track}',
        'DELIVERED': 'Your order has been delivered. Thank you for your purchase!'
    }

    if new_stage in messages:
        green_api.send_message(whatsapp_id, messages[new_stage].format(**deal))

Additionally: the bot receives an incoming reply "track" → responds with a tracking link; "operator" → transfers to support queue.

Result: support inquiries about delivery status dropped by 60% in the first two weeks. The client saved up to 150,000 rubles per month on operator salaries.

What's included in turnkey bot development

  • Requirements analysis and provider selection
  • Architecture design (server, API, CRM events)
  • Bot implementation (command handling, REST integration)
  • Business process setup (outgoing notifications by status)
  • Testing (unit, integration)
  • Documentation and operator training
  • Production deployment and monitoring
  • Technical support for 1 month

Estimated timeframes and cost

Component Effort
Provider setup (Green API / Wazzup) 4–8 h
Basic bot (text commands) 16–24 h
CRM Bitrix24 integration 8–16 h
Outgoing notifications by CRM events 8–16 h
Media reception and upload to Drive 4–8 h
Deployment and monitoring 4–8 h

The average budget for such projects ranges from 150,000 to 300,000 rubles depending on complexity. Cost is calculated individually. Contact us to evaluate your project.

Typical integration mistakes

  • Using unofficial clients — leads to number blocking.
  • Ignoring message template requirements — first outgoing messages get rejected.
  • Lack of fallback to operator for unrecognized commands — worsens user experience.
Checklist before start - Verified Meta Business account - BSP provider selection - Approved templates for first outgoing message - API keys for Green API / Wazzup - Test WhatsApp number

Our team holds Bitrix certifications and has experience with over 50 projects integrating CRM with messengers. Order turnkey development — we guarantee a quality result and post-launch support. Get a consultation on your project. Contact us to discuss your scenario.

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.