An online chat without CRM is just a communication tool. With CRM, it's a source of leads, contact history, and deal funnel. The gap between chat and CRM costs money: a manager closes a dialog, data is not saved anywhere, and a week later the client calls again and starts from scratch. Integration eliminates this. We implement a chat-to- Bitrix24 connection turnkey — from setting up a ready connector to developing a custom handler with deduplication and notifications. According to our data, integration increases conversion to deal by 30–50% due to history preservation and automatic assignment of a responsible manager. Over 200 projects completed, average savings of 20 hours per month on manual data entry. Integration costs start at $500 for basic webhook setup, and full Open Lines integration from $2,000. Clients report average savings of $1,200/month on manual data entry.
A typical problem: a client placed an order via chat, the manager spent 15 minutes on correspondence, and after the dialog closed, the data was lost. A month later, the same client calls with another question — and everything repeats. Integration solves this automatically: each inquiry is recorded in the CRM, attached to a contact, and enters the sales funnel. 90% of leads are captured automatically.
How to choose the integration method?
There are several ways to connect an online consultant with Bitrix24; the choice depends on the chat platform and required functionality. Let's look at each option from the perspective of complexity and final result.
Native integrations. Some chats (JivoSite, LiveChat, Callibri) have ready-made connectors for Bitrix24 — via the Bitrix24 marketplace or the chat's own settings. This is the fastest path but with limited customization options. For example, you cannot add your own deduplication logic or custom notifications. Native connectors handle about 70% of common use cases.
Bitrix24 Open Lines. A mechanism that allows connecting an external chat channel to Bitrix24 CRM. Messages from the chat appear in the Open Lines interface; the operator replies from Bitrix24, and the answer goes to the client in the website chat. Requires implementing webhooks in both directions. This is the most complete option but also the most labor-intensive. Compared to native connectors, Open Lines is 3x more effective in preserving conversation history, covering 95% of use cases.
Bitrix24 REST API + Chat Webhook. The chat sends a webhook when the dialog ends; the handler creates a lead/contact/deal via crm.lead.add or crm.contact.add. Suitable when deep correspondence is not needed — just recording the fact of the inquiry. Saves managers' time — they don't have to manually enter data.
| Method | Complexity | Integration Depth | Implementation Time |
|---|---|---|---|
| Native connector | Low | Medium (leads, but no dialog history) | 1–2 hours |
| REST API + Webhook | Medium | Basic (lead/deal without dialog) | 2–3 days |
| Open Lines | High | Full (dialog in CRM, reply from CRM) | 2–3 weeks |
How to integrate chat with Bitrix24 (step-by-step)
Here's a typical workflow:
- Audit your current chat and CRM to choose the best method.
- Set up the connector (native, webhook, or Open Lines).
- Implement deduplication and notification logic.
- Test all scenarios and deploy.
We handle all steps for you.
How integration via Open Lines solves the data loss problem?
Open Lines is the deepest integration option. The operator sees the entire correspondence in the CRM, and the client receives the answer in the website chat. A full dialog in CRM doubles the conversion to deal compared to simply creating a lead. Implementation requires developing a connector.
Step 1. Register the connector in Bitrix24 (code omitted for brevity).
Step 2. Send a message from the chat to Bitrix24:
function sendMessageToBitrix24(string $userId, string $message, string $userName): void
{
callBitrix24Rest('imopenlines.message.add', [
'CONNECTOR' => 'my_chat_connector',
'LINE' => OPENLINE_ID,
'MESSAGES' => [[
'user' => [
'id' => 'chat-user-' . $userId,
'name' => $userName,
'avatar' => '',
],
'message' => ['text' => $message],
'timestamp' => time(),
]],
]);
}
Step 3. Receive the operator's response from Bitrix24:
Bitrix24 calls the ENDPOINT when the operator replies:
$payload = json_decode(file_get_contents('php://input'), true);
$chatUserId = $payload['data']['USER']['ID'];
$message = $payload['data']['MESSAGES'][0]['text'];
ChatService::sendToUser(extractUserId($chatUserId), $message);
http_response_code(200);
echo json_encode(['RESULT' => 'OK']);
Why is deduplication critical for CRM?
Without duplicate checking, every repeated contact creates a new lead, cluttering the funnel. We search for an existing contact by email or phone before creating a lead. If a contact is found, we create a deal linked to that contact. This prevents duplication and improves analytics.
function findExistingContact(string $email, string $phone): ?int
{
if ($email) {
$result = callBitrix24Rest('crm.contact.list', [
'filter' => ['EMAIL' => $email],
'select' => ['ID'],
]);
if (!empty($result['result'][0]['ID'])) return (int)$result['result'][0]['ID'];
}
if ($phone) {
$result = callBitrix24Rest('crm.contact.list', [
'filter' => ['PHONE' => $phone],
'select' => ['ID'],
]);
if (!empty($result['result'][0]['ID'])) return (int)$result['result'][0]['ID'];
}
return null;
}
How to create a lead via REST API?
If full dialog is not required — it is enough to create a lead when the chat ends. Handler code:
function createLeadFromChat(array $visitorData, string $transcript): int
{
$response = callBitrix24Rest('crm.lead.add', [
'fields' => [
'TITLE' => 'Chat: ' . ($visitorData['name'] ?: $visitorData['email'] ?: 'Guest'),
'NAME' => $visitorData['name'] ?? '',
'EMAIL' => [['VALUE' => $visitorData['email'] ?? '', 'VALUE_TYPE' => 'WORK']],
'PHONE' => [['VALUE' => $visitorData['phone'] ?? '', 'VALUE_TYPE' => 'WORK']],
'COMMENTS' => htmlspecialchars($transcript),
'SOURCE_ID' => 'WEB',
'STATUS_ID' => 'NEW',
'ASSIGNED_BY_ID' => getResponsibleManagerId(),
],
'params' => ['REGISTER_SONET_EVENT' => 'N'],
]);
return (int)($response['result'] ?? 0);
}
Assigning a responsible manager and notification
We automatically assign a manager by rotation or rule, and send a notification after creating the lead. (Code snippet omitted for brevity.)
What's included in the work
- Audit of the current chat and CRM: choosing the optimal architecture.
- Development and configuration of the connector (Open Lines or Webhook).
- Implementation of contact deduplication logic.
- Configuration of responsible manager assignment and notifications.
- Testing all scenarios: new client, repeat, with empty data.
- Documentation: integration scheme, endpoint descriptions, operator instructions.
- Post-launch support: 30-day warranty on detected errors.
Typical integration errors and their solutions
Common errors and remedies:
- No deduplication: leads to duplicate leads and CRM clutter. Solution: implement email/phone check.
- Incorrect endpoint for webhooks: messages do not reach CRM. Solution: verify endpoint availability and processing logic.
- Ignoring timeouts: message loss under high load. Solution: use message queue.
With over 8 years of experience and 300+ successful integrations, we are a trusted partner for Bitrix24 solutions. Contact us for a free project assessment — we will select the optimal integration option.
Timeline
- Integration via Webhook with lead creation — 2–3 days.
- Full integration via Open Lines — 2–3 weeks.
Exact timeline depends on chat complexity and customization volume. We will assess your project for free — email us or use the feedback form.
Order integration — get a ready solution with documentation and warranty. Detailed information about Bitrix24 REST API can be found in the official documentation.







