Setting up cross-docking in 1C-Bitrix

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
    1212
  • image_bitrix-bitrix-24-1c_fixper_448_0.png
    Website development for FIXPER company
    815
  • 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
    565
  • 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
    657
  • image_crm_technotorgcomplex_453_0.webp
    Development based on Bitrix24 for the company TECHNOTORGKOMPLEKS
    980

Configuring Cross-docking on 1С-Bitrix

Cross-docking is a scheme where goods from supplier arrive at transit warehouse and are immediately sent to buyer without lengthy storage. For online store this means: order received, goods not in own warehouse, supplier order created, goods arrive and move on. Bitrix has no built-in cross-docking support, but logistics is realized via custom order statuses and supplier integration.

Cross-docking order scheme

  1. Customer places order on site — creates b_sale_order with status "Awaiting supplier"
  2. Automatically or manually supplier order created (EDI, API, email)
  3. Status changes to "Goods in transit from supplier"
  4. Goods arrival at transit warehouse fixed in b_catalog_store_product
  5. Immediate shipment to customer, status "Shipped to delivery"

Custom order statuses

Order statuses stored in b_sale_status and b_sale_status_lang. Add new statuses for cross-docking chain:

  • CROSS_WAITING — awaiting supplier
  • CROSS_IN_TRANSIT — goods in transit from supplier
  • CROSS_ARRIVED — arrived at transit warehouse
  • CROSS_SHIPPED — shipped to customer

Create statuses via \Bitrix\Sale\OrderStatus::add() or directly via API:

\Bitrix\Sale\OrderStatusTable::add([
    'ID'   => 'CW',
    'SORT' => 55,
    'COLOR' => '#FF9900',
]);
\Bitrix\Sale\OrderStatusLangTable::add([
    'STATUS_ID' => 'CW',
    'LID'       => 'ru',
    'NAME'      => 'Awaiting supplier',
]);

Automatic supplier order creation

When order transitions to "Awaiting supplier" status via OnSaleStatusOrder event:

AddEventHandler('sale', 'OnSaleStatusOrder', function($orderId, $newStatus) {
    if ($newStatus === 'CW') {
        $order = \Bitrix\Sale\Order::load($orderId);
        $basket = $order->getBasket();

        foreach ($basket as $item) {
            $productId = $item->getProductId();
            $supplier  = SupplierCatalog::getSupplierByProduct($productId);

            if ($supplier) {
                SupplierOrderService::create($supplier, [
                    'PRODUCT_ID' => $productId,
                    'QUANTITY'   => $item->getQuantity(),
                    'ORDER_REF'  => $orderId,
                ]);
            }
        }
    }
});

SupplierCatalog and SupplierOrderService are custom classes. Supplier order can be sent via API, EDI, or email with PDF document.

Transit warehouse monitoring

For transit storage create separate store in b_catalog_store with type "Transit". Receipt from supplier registered via \Bitrix\Catalog\StoreDocumentTable with type A (receipt). When creating document, inventory on transit store increases — signal for agent for immediate shipment to customer.

What we configure

  • Additional order statuses for cross-docking chain
  • OnSaleStatusOrder event handler for auto-creating supplier order
  • Table bl_supplier_products with product-supplier mapping
  • Transit warehouse in b_catalog_store and document movement logic
  • Report on cross-docking orders with supplier wait time