Integration of Bitrix24 with RetailCRM: Fully Automated Sales Cycle for eCommerce
General Principles of Integration
Integration between Bitrix24 and RetailCRM-class systems focuses on unifying sales channels, customer information storage, inventory accounting, and automation of deal processing. Integration is typically performed via REST API, webhooks, or by developing a custom module within the on-premise version of Bitrix24.
Key integration components:
- Order synchronization from RetailCRM into Bitrix24 deals and contact entities.
- Support for reverse synchronization of deal stages and comments in order records.
- Automatic creation of tasks, notifications, and customer profiles.
- Tracking of repeat purchases and returns with preservation of communication history.
Use Case Scenarios
Common automation scenarios include:
- Creating a new lead or deal upon registration of a new order in RetailCRM.
- Enriching Bitrix24 customer profiles with data on previous purchases.
- Triggering business processes in Bitrix24 depending on order source or status.
- Notifying managers when order statuses change or issues occur, such as cancellations or returns.
Implementation Tools
Cloud Version
In the cloud version of Bitrix24, implementation is performed via REST API and visual automation tools (robots or business processes). Primary steps include:
- Creating webhooks in Bitrix24 to receive orders.
- Configuring RetailCRM to send events using scripts or integration gateways.
- Programmatically processing incoming requests and populating corresponding entities (leads, deals, contacts).
- Adding automation rules based on the deal stage to execute subsequent steps: notifications, tasks, and stage transitions.
$dealData = [
'fields' => [
'TITLE' => 'Order No. ' . $order['number'],
'CONTACT_ID' => $contactId,
'STAGE_ID' => 'NEW',
'COMMENTS' => $order['comment']
],
'params' => ["REGISTER_SONET_EVENT" => "Y"]
];
$dealId = callBitrixRest('crm.deal.add', $dealData);
On-Premise Version
For the on-premise version, the recommended approach is developing a custom module using the D7 API:
- Creating an agent or controller for periodic polling of the RetailCRM API or subscribing to webhooks.
- Processing inbound JSON events through a custom endpoint (e.g., /local/api/retailcrm.php).
- Enhancing entity cards via custom UI components or D7 fields.
- Registering stage change events for subsequent synchronization back to the order system.
class RetailCRMController extends Controller
{
public function configureActions() {
return ['postOrder' => ['prefilters' => []]];
}
public function postOrderAction($payload) {
$order = json_decode($payload, true);
$contactId = $this->findOrCreateContact($order["customer"]);
//...
}
}
Common Mistakes
- Duplicate orders — occurs when data is resent without uniqueness checks. It's recommended to use external keys or RetailCRM-ID reference fields.
- Partial status synchronization — can happen if deal statuses in Bitrix24 and order statuses in RetailCRM are not aligned to a unified dictionary.
- Missing logging — especially relevant during asynchronous message exchange. It's advisable to log each event in a separate table along with processing results.
- Tight coupling by ID — reliance on unstable identifiers increases system vulnerability to logic changes on the RetailCRM side.
Integration Logic Checklist
- Handling new orders (createDeal, createContact).
- Duplicate detection via email/phone before creating entities.
- Reverse status synchronization (updateOrderStatus).
- Registration of change history and failure incidents.
- Sending error alerts to managers.
FAQ
- Can Bitrix24 business processes alone be used for implementation?
- Partial implementation is feasible using business processes, but subscribing to actions from RetailCRM requires external integration via API.
- Is bidirectional synchronization supported?
- Yes, if endpoints are properly implemented and data integrity is maintained, both inbound order retrieval and outbound updates can be achieved.
- How can large order volumes be processed efficiently?
- Batch processing of orders is recommended, along with storing the last processed ID and background agents or cron jobs.
- Which fields should always be synchronized?
- Customer full name, phone number, email, order number, amount, and status are essential. It is also recommended to transmit order source, delivery method, and payment type.
- Is API throttling possible in Bitrix24?
- Yes, API limits apply in the cloud version. Exchange scheduling should consider the number of concurrent events being processed.
Conclusion
With a properly designed architecture, integration of RetailCRM and Bitrix24 significantly automates routine operations in eCommerce. Support for scenarios covering initial orders through repeat sales, along with consistent customer data synchronization, provides more stable service delivery and improves sales team planning.
In implementation practice, special attention should be given to entity uniqueness control, process logging, and data structure alignment between systems.
Need a preliminary discussion?
If you'd like to assess the technical feasibility or scope of such integration, an initial consultation may help.
- Which systems and versions are involved in the integration?
- Is bidirectional synchronization required, or just one-way data flow?
- Are there constraints related to API usage limits, security, or execution time?