Setting up order consolidation from different 1C-Bitrix warehouses

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
    1173
  • 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
    745
  • 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

Configuring Order Consolidation from Different Warehouses 1С-Bitrix

Customer ordered three products: one is in warehouse A, another in warehouse B, third needs to come from remote warehouse C. Task — either wait for complete order assembly and ship as one package, or ship in parts. Bitrix doesn't manage this automatically — consolidation logic builds on top standard multi-warehouse system.

Multi-warehouse in Bitrix

Warehouses stored in b_catalog_store, inventory in b_catalog_store_product. Reservation on order works via b_sale_reserve_quantity. On checkout Bitrix doesn't automatically select warehouse — done manually or via custom logic.

To determine which warehouse to ship each product from, use \Bitrix\Catalog\StoreProductTable::getList() with filter by PRODUCT_ID and condition AMOUNT > 0.

Consolidation strategies

Strategy 1: Maximum speed — each product shipped from nearest warehouse immediately when available. Customer receives several packages. Implementation: on order creation agent immediately splits it into sub-orders by warehouse.

Strategy 2: Minimum packages — wait for complete order assembly on one "main" warehouse, to which needed items are moved. Implementation: inter-warehouse movement via b_catalog_store_document with type M.

Strategy 3: Hybrid — in-stock items shipped immediately, back-ordered items waited.

Order split into sub-orders

Create bl_order_shipments table with fields order_id, store_id, status, items_json. On order confirmation agent analyzes basket:

foreach ($basket as $item) {
    $stores = StoreProductTable::getList([
        'filter' => ['PRODUCT_ID' => $item->getProductId(), '>AMOUNT' => 0],
        'order'  => ['AMOUNT' => 'DESC'],
    ])->fetchAll();

    $bestStore = $stores[0]['STORE_ID'] ?? $defaultStoreId;

    $shipments[$bestStore][] = [
        'product_id' => $item->getProductId(),
        'quantity'   => $item->getQuantity(),
    ];
}

Each group recorded in bl_order_shipments. Sub-order statuses tracked independently.

Customer display

In personal account and order letter show breakdown: "Package 1 (Moscow warehouse): 2 items — shipped", "Package 2 (SPb warehouse): 1 item — in transit". Personal account component gets data from bl_order_shipments and combines with main order by order_id.

What we configure

  • Table bl_order_shipments for storing sub-order information by warehouse
  • Agent analyzing availability and distributing items by warehouse
  • Consolidation strategy (configured in b_option)
  • Updating sub-order statuses on warehouse document changes
  • Displaying sub-orders in customer personal account and admin interface