Integration of 1C-Bitrix with Mindbox

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

1C-Bitrix Integration with Mindbox

Mindbox is a CDP platform for marketing automation aimed at mid-sized and large retailers. It consolidates data from all channels (website, mobile app, offline, call centre), builds a unified customer profile, and manages personalised communications. The platform is priced for businesses with substantial annual revenue.

Integration Architecture

Mindbox operates through two mechanisms:

  1. JavaScript SDK (Mindbox.js) — real-time tracking of user actions on the site: page views, add-to-cart events, logins.
  2. Server-side API (v3) — transmission of transactional data: orders, registrations, profile updates.

Both mechanisms must use a shared customer identifier (deviceUUID for anonymous users, customerId for authenticated ones).

Connecting the JavaScript SDK

In the 1C-Bitrix template (header.php or a component):

<script>
window.mindbox = window.mindbox || function() { mindbox.queue.push(arguments); };
mindbox.queue = mindbox.queue || [];
</script>
<script async src="//cdn.mindbox.ru/scripts/v1/tracker.js"></script>
<script>
mindbox('create', {
    endpointId: '<?= COption::GetOptionString("site","mindbox_endpoint_id") ?>',
});
// Pass the authenticated user ID
<?php if ($USER->IsAuthorized()): ?>
mindbox('identify', {
    operation: 'SiteVisit',
    data: {
        customer: {
            ids: { websiteId: '<?= $USER->GetID() ?>' },
        },
    },
});
<?php endif; ?>
</script>

Sending an Order via the Server-side API

class MindboxClient {
    private string $secretKey;
    private string $endpointId;

    public function sendOrder(\Bitrix\Sale\Order $order): void {
        $basket = $order->getBasket();
        $props  = $order->getPropertyCollection();

        $lines = [];
        foreach ($basket as $item) {
            $lines[] = [
                'product'         => ['ids' => ['websiteId' => (string)$item->getProductId()]],
                'quantity'        => $item->getQuantity(),
                'priceOfLine'     => $item->getPrice() * $item->getQuantity(),
                'discountOfLine'  => 0,
            ];
        }

        $payload = [
            'order' => [
                'ids'            => ['websiteId' => (string)$order->getId()],
                'totalPrice'     => $order->getPrice(),
                'lines'          => $lines,
                'customer'       => [
                    'ids'   => ['websiteId' => (string)$order->getUserId()],
                    'email' => $props->getUserEmail(),
                    'mobilePhone' => $props->getItemByOrderPropertyCode('PHONE')?->getValue(),
                ],
            ],
        ];

        $http = new \Bitrix\Main\Web\HttpClient();
        $http->setHeader('Content-Type', 'application/json');
        $http->setHeader('Authorization', 'Mindbox secretKey="' . $this->secretKey . '"');

        $http->post(
            "https://api.mindbox.ru/v3/operations/sync?endpointId={$this->endpointId}&operation=Website.CreateOrder",
            json_encode($payload)
        );
    }
}

Operations

Every interaction in Mindbox is an "operation" with a unique name. Operation names are created in the Mindbox dashboard and passed in the operation parameter:

Operation 1C-Bitrix Event
Website.CreateOrder OnSaleOrderSaved (new order)
Website.UpdateOrder OnSaleOrderSaved (status change)
Website.Register OnAfterUserRegister
Website.UpdateProfile OnAfterUserUpdate
Website.SetCart OnSaleBasketSaved
Website.SubscribeEmail OnSubscribeSubscribe

Loyalty Programme

Mindbox includes a built-in loyalty programme module. Once connected, points are awarded for purchases and redeemed at checkout. A "Use points" field is added to the order form:

// Get customer point balance
public function getCustomerBalance(int $userId): float {
    $response = $this->callSync('Website.GetCustomerBalance', [
        'customer' => ['ids' => ['websiteId' => (string)$userId]],
    ]);
    return $response['customer']['bonusPoints']['available'] ?? 0;
}

When points are successfully redeemed, the discount is applied to the order via CSaleBasket::UpdatePrice().

Case Study: Unified Customer Profile

A cosmetics retail chain: online store on 1C-Bitrix + offline POS terminals + mobile app. Before Mindbox — three separate customer databases; marketers had no complete picture.

After integrating Mindbox, profiles were merged by phone number and email. A customer who made an offline purchase receives a "similar products" email based on their receipt rather than a generic newsletter. Retention rate increased by 12% over six months.

Task Effort
JS SDK setup + page view tracking 4–6 h
Server-side API: orders and profiles 8–12 h
Loyalty programme integration 8–16 h
Offline data synchronisation project-dependent