Configuring Inventory Stock Exchange Between 1C and 1C-Bitrix
Stock accuracy is one of the key conversion factors: a buyer selects a product, adds it to the cart, and then discovers at checkout that it is out of stock. A gap of several hours between the actual warehouse stock and the data on the site is normal for stores without a configured exchange. Proper stock synchronization eliminates this gap.
How Stocks Are Transmitted via CommerceML
Stocks are included in the offers*.xml file within the <КоличествоНаСкладах> block:
<Предложение>
<Ид>OFFER_GUID</Ид>
<КоличествоНаСкладах>
<КоличествоНаСкладе>
<ИдСклада>WAREHOUSE_GUID</ИдСклада>
<НаименованиеСклада>Основной склад</НаименованиеСклада>
<Количество>15</Количество>
</КоличествоНаСкладе>
</КоличествоНаСкладах>
<Количество>15</Количество>
</Предложение>
1C-Bitrix updates stocks in the b_catalog_store_product table by warehouse and the aggregate stock in b_catalog_product. The aggregate stock is a sum across all warehouses and is used in catalog filters.
Configuring Warehouses in Bitrix
Catalog → Warehouses → Warehouse Settings:
- Create warehouses matching those in 1C
- Assign each warehouse an XML identifier (the "External Code" field) — it must exactly match the
ИдСкладаfrom the export
Without matching XML identifiers, stocks will not be distributed by warehouse — they will end up in the default or "unknown" warehouse. The error goes unnoticed until a manager discovers a discrepancy in accounting data.
Managing Product Availability by Stock
Catalog → Catalog Settings → Zero Stock:
- Deactivate product — the product disappears from the catalog when stock reaches zero
- Show with "Order" button — stock is 0 but the product card is available for ordering
- Keep active — do not change anything automatically
For stores with pre-orders, the "show at zero stock" logic is implemented via the element property PREORDER_AVAILABLE = Y. An event handler hides the "Buy" button and shows a pre-order form.
Reservation on Order Creation
To prevent stock from going negative with concurrent orders:
Shop → Settings → Store Settings → Reservation:
- Reserve on: order creation / payment confirmation (choose based on business logic)
- Release reservation on: order cancellation / after N days without payment
The reservation is stored in b_sale_reserve_quantity and is factored into the displayed available stock: available = stock - reserved. When transferring an order to 1C — make sure 1C understands the "reserved quantity" and does not count it as free stock.
Stock Exchange Frequency
Stocks and prices are the most volatile data. Recommended settings:
| Business type | Frequency | Rationale |
|---|---|---|
| Food, pharmacy | Every 5–15 minutes | Fast turnover, freshness is critical |
| Clothing, electronics | Every 30–60 minutes | Moderate turnover |
| Building materials, furniture | Every 2–4 hours | Infrequent replenishment |
For frequent exchanges — use a dedicated stream for offers*.xml only, without a full catalog export.
Setup Timeline
Configuring stock exchange with warehouse distribution — 4–8 hours. With reservation configuration, auto-activation, and a separate schedule for stocks — 1–2 days.







