1C-Bitrix RetailCRM Integration: Setup and Synchronization

Let's set the scene: Black Friday, hundreds of customers flood your site, orders pour in one after another. But RetailCRM stays silent—data vanishes into the void. Managers don't see orders, statuses get jumbled, customers call. This scenario is familiar to stores where the integration of 1C-Bitrix

Our competencies:

Frequently Asked Questions

Let's set the scene: Black Friday, hundreds of customers flood your site, orders pour in one after another. But RetailCRM stays silent—data vanishes into the void. Managers don't see orders, statuses get jumbled, customers call. This scenario is familiar to stores where the integration of 1C-Bitrix with RetailCRM wasn't designed for real loads. The issue is compounded by data conflicts: the same order may be created twice if deduplication by externalId isn't configured. Moreover, direct REST API calls for each order slow down the Bitrix server, and RetailCRM rejects requests when limits are exceeded. RetailCRM, like any CRM, requires precise field mapping: statuses, warehouses, delivery types. Without it, orders can be lost or duplicated. Our integration solves these problems at the protocol level. We tackle them by configuring bidirectional synchronization via RetailCRM REST API v5 and async queues on Bitrix agents that handle 500+ orders per hour without loss. Over a long period, we've completed more than 50 RetailCRM integrations—each paid for itself within a few months by cutting operational costs by 40%.

Scenarios Requiring Custom RetailCRM-Bitrix Integration

RetailCRM provides an official module for 1C-Bitrix through the marketplace. The module works for basic scenarios. But when order volume exceeds 50–100 per day or non-standard requirements appear, the module falters. Let's compare:

Criteria Ready-made module Custom integration
Time to launch 1–2 days 1–2 weeks
Custom statuses Basic only Any
Complex warehouse mapping Not supported Flexible configuration
Peak load (500+ orders/hour) Timeouts Agent queue (5x more efficient)
Customization for your business processes Limited Full

Custom integration is needed when:

  • You have non-standard order statuses or properties not in the module.
  • Complex mapping logic (multiple stores, different warehouses).
  • Integration with other systems via RetailCRM (telephony, delivery services).

Case: Peak Load During a Sale

In our practice, a clothing store client faced 5-second delays and timeouts during a sale with 800 orders in 2 hours due to direct RetailCRM API calls. We solved it with a queue based on Bitrix agents. Orders are written to a queue table, and an agent sends batches of 10 orders every 10 seconds. The peak load is smoothed, orders process in 1–5 minutes. Time savings on processing: 70%, server load reduction: 3x.

How to Configure Bidirectional Order Synchronization

Base URL: https://yourdomain.retailcrm.ru/api/v5/. Authentication: X-API-KEY header. Below is a sample class for creating an order in RetailCRM:

class RetailCRMClient { private string $apiKey; private string $siteKey; private string $baseUrl; public function createOrder(\Bitrix\Sale\Order $order): ?string { $basket = $order->getBasket(); $props = $order->getPropertyCollection(); $items = []; foreach ($basket as $item) { $items[] = [ 'offer' => ['xmlId' => (string)$item->getProductId()], 'quantity' => $item->getQuantity(), 'initialPrice' => $item->getBasePrice(), 'discountPercent' => 0, ]; } $orderData = [ 'number' => 'BX-' . $order->getId(), 'externalId' => (string)$order->getId(), 'site' => $this->siteKey, 'status' => $this->mapStatus($order->getField('STATUS_ID')), 'customer' => [ 'externalId' => (string)$order->getUserId(), 'email' => $props->getUserEmail(), 'phone' => $props->getItemByPropertyOrderCode('PHONE')?->getValue(), ], 'items' => $items, 'delivery' => [ 'code' => $this->mapDelivery($order->getDeliveryId()), 'address' => ['text' => $this->getOrderAddress($props)], ], 'paymentType' => $this->mapPayment($order->getPaymentSystemId()), ]; $http = new \Bitrix\Main\Web\HttpClient(); $http->setHeader('X-API-KEY', $this->apiKey); $http->setHeader('Content-Type', 'application/x-www-form-urlencoded'); $response = json_decode($http->post( $this->baseUrl . 'orders/create', 'order=' . urlencode(json_encode($orderData)) . '&site=' . $this->siteKey ), true); return $response['id'] ?? null; } } 

RetailCRM changes the order status (manager processed, set for picking, handed to delivery)—the site must update the status. RetailCRM supports outgoing webhooks (RetailCRM Webhooks). Configure them in 'Administration → Webhooks':

$payload = json_decode(file_get_contents('php://input'), true); foreach ($payload['orders'] as $orderData) { $externalId = $orderData['externalId']; $newStatus = $statusMap[$orderData['status']] ?? null; if ($newStatus) { $order = \Bitrix\Sale\Order::load($externalId); $order->setField('STATUS_ID', $newStatus); $order->save(); } } 

Directory Mapping

RetailCRM stores directories: statuses, delivery types, payment methods—each with a code. Codes must match Bitrix codes:

Bitrix Status RetailCRM Status
N (new) new
P (paid) complete-payment
D (delivering) delivery
F (completed) complete
C (cancelled) cancel-other

Mapping is stored in the module settings or in a custom table.

Why Integration May Break Under Peak Load and How to Avoid It

Direct synchronous API calls at 500+ orders per hour guarantee timeouts. A queue on agents smooths peaks and ensures delivery. Time savings on processing can reach 70%, server load reduction by 3x. Integration cost is calculated individually, but on average it pays off in 2–3 months.

What's Included in the Integration

Component Description
Architecture audit Review data schema, existing integrations, hosting limitations
Mapping project Agree on fields, statuses, warehouses, delivery methods
REST client development PHP class for exchange with RetailCRM API v5
Webhook setup Automatic status updates when changes occur in CRM
Processing queue Bitrix agents with batch sending to smooth peaks
Documentation Integration schema, error handling description
Post-release support 30 days of fixes, stability monitoring

Work Process for Integration

  1. Audit — analyze current architecture, data schema, business processes.
  2. Design — develop field mapping, queue scheme, handle edge cases.
  3. Development — write REST client, configure webhooks, implement queue.
  4. Testing — simulate peak load, check synchronization both ways.
  5. Deployment — roll out to production, enable monitoring.
  6. Support — 30 days of post-release support, fix any errors.

We have been integrating Bitrix with CRMs for more than 5 years and have completed over 50 RetailCRM projects. Contact us for an audit of your integration architecture. Order development to get stable synchronization that can handle any traffic.