Setting up multi-warehouse exchange in 1C and 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
    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

Configuring Multi-Warehouse Exchange Between 1C and 1C-Bitrix

Multi-warehouse accounting is relevant for stores with several storage locations: a central warehouse, regional warehouses, and retail outlets with their own stock. A buyer in Yekaterinburg should see the stock at the warehouse in their region, not the aggregate across all sites — this affects both the accuracy of information and the cost of delivery.

Prerequisites

Multi-warehouse accounting in Bitrix requires the "Small Business" edition or higher. In the "Start" edition, warehouse management is unavailable — there is only one virtual warehouse.

In 1C, warehouse accounting must be enabled:

  • Trade Management 11: Administration → Warehouse and Delivery → Multiple Warehouses: Yes
  • Trade Management 10: Service → Account Settings → Warehouse Accounting → Keep records by warehouse

Setting Up Warehouses and XML Identifiers

In 1C each warehouse has a unique identifier (GUID). In Bitrix each warehouse has an "External Code (XML ID)" field. Matching these values is the prerequisite for correct stock distribution:

Catalog → Warehouses → [warehouse] → External Code (XML ID) = warehouse GUID from 1C

How to obtain the warehouse GUID from 1C: via the configurator, or through the query SELECT Ref.UniqueIdentifier FROM Catalog.Warehouses. It can also be taken from the exchange XML file in the <ИдСклада> tag.

Displaying Stock by Specific Warehouse on the Product Page

If the buyer should see "in stock in Moscow: 5 pcs., in Yekaterinburg: 12 pcs." — this requires a custom modification of the product card component. Data is retrieved from \Bitrix\Catalog\StoreProductTable:

$storeRests = \Bitrix\Catalog\StoreProductTable::getList([
    'filter' => ['=PRODUCT_ID' => $productId],
    'select' => ['AMOUNT', 'STORE_ID', 'STORE.TITLE', 'STORE.ADDRESS'],
    'order'  => ['STORE.TITLE' => 'ASC'],
])->fetchAll();

foreach ($storeRests as $rest) {
    if ($rest['AMOUNT'] > 0) {
        echo $rest['STORE_TITLE'] . ': ' . $rest['AMOUNT'] . ' pcs.';
    }
}

Linking a Warehouse to a Delivery Service

The "warehouse → delivery zone" link answers the question of where to ship from. If the buyer is in Yekaterinburg — offer delivery from the Yekaterinburg warehouse with a short lead time, not from Moscow with a 5-day transit.

Two implementation options:

  • Automatically by buyer's region — when the region is determined by IP or the buyer selects a city, the priority warehouse is taken from the "warehouse → service regions" reference
  • Via pickup point selection — each pickup point = a warehouse, the buyer explicitly chooses where to collect from

Multi-Warehouse Reporting

Managers frequently need a summary report: which products are only available at one warehouse, which are nowhere. Basic query:

SELECT
    e.ID, e.NAME,
    SUM(sp.AMOUNT) as total_amount,
    COUNT(DISTINCT sp.STORE_ID) as stores_count
FROM b_iblock_element e
LEFT JOIN b_catalog_store_product sp ON sp.PRODUCT_ID = e.ID
WHERE e.IBLOCK_ID = :iblock_id
GROUP BY e.ID, e.NAME
ORDER BY total_amount ASC;

Setup Timeline

Configuring multi-warehouse exchange with XML identifier mapping — 1 day. With custom stock display by warehouse and delivery zone linking — 2–4 days.