Viber 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.
Our competencies:
Development stages
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1175
  • image_bitrix-bitrix-24-1c_fixper_448_0.png
    Website development for FIXPER company
    811
  • 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
    564
  • image_bitrix-bitrix-24-1c_mirsanbel_458_0.webp
    Development based on 1C Enterprise for MIRSANBEL
    747
  • image_crm_dolbimby_434_0.webp
    Website development on CRM Bitrix24 for DOLBIMBY
    655
  • image_crm_technotorgcomplex_453_0.webp
    Development based on Bitrix24 for the company TECHNOTORGKOMPLEKS
    976

Viber Bot Development with Bitrix24 Integration

Viber remains a popular channel in Belarus, Ukraine, and several other CIS countries. Unlike WhatsApp, Viber provides an open Bot API for free and without complex approvals — anyone can create a public account and connect a bot. This simplifies development, but the audience is smaller, and this should be considered when choosing communication channels.

Viber Bot API: What Is Available

Viber provides the Viber Bot API via https://chatapi.viber.com/pa/. Bot registration is done by creating a Bot/Public Account in the Viber app. After creation, an auth_token is issued.

Capabilities available in the Viber Bot API:

  • Text messages, images, documents, videos, stickers.
  • Rich Messages — messages with buttons (Keyboard API).
  • Carousel — a horizontal list of cards with buttons (Rich Media).
  • Accessing user profile: name, avatar, country (but not phone number — this is the key difference from WhatsApp).
  • Webhook for incoming messages.

Main limitation: Viber does not pass the user's phone number to the bot. The identifier is a viber_id (a unique hash for each bot–user pair). To link to CRM, you need to ask the user to enter their phone number manually or use a "Share Contact" button (works only in some client versions).

Integration Architecture with Bitrix24

Viber Bot API (webhook)
      ↓
Bot server (Python / Node.js)
      ↓ ↓
  Logic      Bitrix24 REST API
  + Redis    crm.contact.list
  (states)   crm.lead.add
             imbot.message.add

Incoming webhook from Viber:

{
  "event": "message",
  "sender": {
    "id": "01234567890A=",
    "name": "John Smith",
    "country": "BY"
  },
  "message": {
    "type": "text",
    "text": "Order status"
  }
}

Response via Viber API with buttons:

POST https://chatapi.viber.com/pa/send_message
{
  "receiver": "01234567890A=",
  "type": "text",
  "text": "Enter your order number:",
  "keyboard": {
    "Type": "keyboard",
    "Buttons": [
      {"ActionType": "reply", "ActionBody": "operator", "Text": "Contact operator"}
    ]
  }
}

Client Identification Without a Phone Number

The absence of a phone number in the Viber profile requires a separate verification scenario:

  1. The bot greets the user and asks them to enter their phone number.
  2. The user enters the number in +... format.
  3. The bot sends an SMS verification code via an SMS provider.
  4. The user enters the code → the bot links viber_id to the CRM contact in the field UF_CRM_VIBER_ID.
  5. On subsequent interactions — identification is by viber_id without re-entering the phone number.

Alternative for corporate scenarios: the "Share Contact" button in Viber (type share-phone). It does not work in all client versions, but when it does — the phone number is passed automatically.

Integration with Bitrix24 Open Lines

Viber connects to open lines natively: CRM → Contact Center → Viber. This is a no-code path — messages from Viber go into the operator queue.

For more complex scenarios (bot + operator), a hybrid scheme is used:

  • The bot's own server handles automatable requests.
  • When transferring to an operator — the bot sends a message to the open line via imopenlines.chat.sendMessage or creates a chat via im.chat.add and adds the history.

Case: Viber Bot for a Food Delivery Service

Task: a cafe chain, primary audience uses Viber. Needs to take delivery orders without a phone call and confirm via the bot.

Order scenario via Carousel:

  1. Client writes "Order" → bot shows menu categories as buttons.
  2. Item selection via Rich Media Carousel (cards with photo, price, "+" button).
  3. Cart stored in Redis by viber_id.
  4. Delivery address entry → delivery zone verification.
  5. Payment: "Pay online" button → link to payment page.
  6. After payment: create a deal in Bitrix24 via crm.deal.add with status "Accepted", responsible = location manager.
  7. Order confirmation and tracking via Viber notifications (send_message on deal stage change).

Note: Rich Media Carousel in Viber is limited to 6 cards at a time. For a large menu — pagination with "More" buttons.

Result: 40% of orders shifted from phone calls to the Viber bot within the first two months. The average order value through the bot was 12% higher — clients browse and add items at their own pace.

Component Effort
Basic bot + Viber webhook 8–16 h
Phone verification + CRM linking 8–16 h
Rich Media Carousel for catalog 16–24 h
Bitrix24 CRM integration 8–16 h
Cart in Redis + order logic 8–16 h
Deployment, SSL, monitoring 4–8 h