1C-Bitrix Integration with Verbox
Verbox is a Russian-made online chat solution focused on simplicity of the operator interface and a low barrier to entry. It is often chosen by small online stores as an alternative to JivoSite. The Bitrix integration covers the standard set: widget installation, passing user data, and receiving notifications about incoming chats.
Installing the Verbox Widget
The widget code is inserted into the Bitrix template:
<!-- Before </body> in the site template -->
<script type="text/javascript">
var __cs = __cs || [];
__cs.push(["setCsAccount", "YOUR_ACCOUNT_ID"]);
(function() {
var cs = document.createElement("script");
cs.type = "text/javascript";
cs.async = true;
cs.src = ("https:" == document.location.protocol ? "https://" : "http://") + "lib.verbox.ru/support.js";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(cs, s);
})();
</script>
In Bitrix, add it via Settings → Product Settings → JS Snippets, or directly in the site template file /local/templates/{template_name}/footer.php.
Passing Authenticated User Data
Verbox accepts data through the __cs array before the widget loads:
<?php if ($USER->IsAuthorized()):
$userId = $USER->GetID();
$userEmail = $USER->GetEmail();
$userName = $USER->GetFullName();
$userPhone = getUserPhone($userId);
?>
<script>
var __cs = __cs || [];
__cs.push(["setCsUserEmail", <?= json_encode($userEmail) ?>]);
__cs.push(["setCsUserName", <?= json_encode($userName) ?>]);
__cs.push(["setCsUserPhone", <?= json_encode($userPhone) ?>]);
// Custom fields via setCustomData (if supported by your plan)
__cs.push(["setCustomData", {
"user_id": <?= $userId ?>,
"orders": <?= getUserOrdersCount($userId) ?>,
}]);
</script>
<?php endif; ?>
Order matters: data must be pushed into __cs before support.js loads, otherwise it will not be passed during widget initialization.
Email Notifications for Missed Chats
Verbox sends email notifications for missed chats by default. For a Bitrix-based online store, configure the notification recipient addresses in the Verbox admin panel: Account → Notifications. Enter the email addresses of managers or a shared sales department inbox.
Offline Form and Saving Submissions
When operators are unavailable, Verbox displays an offline form. Data from it can be retrieved via the Verbox API or through email notifications. To automatically save submissions in Bitrix — use the Email pipeline: set up forwarding of offline notifications to an address that Bitrix24 monitors as a CRM mail channel.
An alternative — if your Verbox plan includes webhooks:
// /local/api/verbox-offline.php
$payload = json_decode(file_get_contents('php://input'), true);
$name = $payload['name'] ?? '';
$email = $payload['email'] ?? '';
$phone = $payload['phone'] ?? '';
$message = $payload['message'] ?? '';
if ($email || $phone) {
createBitrix24Lead([
'TITLE' => 'Verbox offline: ' . ($name ?: $email),
'NAME' => $name,
'EMAIL' => $email,
'PHONE' => $phone,
'COMMENTS' => $message,
'SOURCE_DESCRIPTION' => 'Verbox offline form',
]);
}
http_response_code(200);
echo 'ok';
Restricting the Widget to Specific Pages
If the chat is only needed in certain sections (for example, only in the catalog and cart, but not on informational pages):
<?php
$showWidget = false;
$showPaths = ['/catalog/', '/basket/', '/order/'];
foreach ($showPaths as $path) {
if (strpos($_SERVER['REQUEST_URI'], $path) === 0) {
$showWidget = true;
break;
}
}
if ($showWidget):
?>
<!-- Verbox code here -->
<?php endif; ?>
Appearance: Matching Your Design
Verbox allows changing the button color, greeting text, and operator avatar through the admin panel. The button position (right/left, offset from the edge) can be configured via CSS variables or through __cs parameters:
__cs.push(["setButtonSide", "right"]);
__cs.push(["setButtonPosition", "bottom"]);
If the widget conflicts with other floating elements (a callback form, a scroll-to-top button), adjust the z-index via CSS or change the position of one of the widgets using its configuration parameters.
Scope of work: widget installation, user data passing, offline form setup — 1 working day. CRM integration via Webhook or Email pipeline — an additional 1–2 days.







