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.







