XML Import and Export Configuration for 1C-Bitrix
The standard "Trade Catalog" module (catalog) supports data exchange with 1C via the CommerceML 2.x protocol — XML files containing product listings, prices, and stock levels. In practice, this mechanism breaks down in three common scenarios: the file encoding is not UTF-8, there is a non-standard <Classifier> node structure from 1C, or the execution time limit is exceeded for files larger than 50 MB.
How the standard exchange works
1C-Bitrix expects files strictly in CommerceML 2.08 format. The exchange runs through /bitrix/admin/1c_exchange.php — a receiver script that reads the exchange session from $_SESSION['BX_CML2_IMPORT'] and processes chunks sequentially via CCatalogImport.
Tables affected by the import:
-
b_iblock_element— catalog elements -
b_catalog_price— prices by type -
b_catalog_store_product— stock levels by warehouse -
b_iblock_element_property— element properties
Common issues and solutions
Issue 1: timeout with large files
1C exports a single XML with 200,000 items — the file is 180 MB. set_time_limit(0) does not help if PHP-FPM is configured with request_terminate_timeout. The solution is to enable step-by-step mode: in the module settings at "1C-Bitrix: Site Management → Settings → Product Settings → 1C", set the "File size for step-by-step processing" parameter (CATALOG_IMPORT_STEP_SIZE). 1C-Bitrix will automatically split the file into parts using the SAX parser.
Issue 2: duplicate products
The import identifies a product by the Id XML attribute inside the <Product> tag. If the nomenclature GUID was changed in 1C, 1C-Bitrix creates a new element. Check the XML_ID field in b_iblock_element — that is where this identifier is stored. Fix it via a direct update or re-linking through CIBlockElement::Update().
Issue 3: prices not updating
A common cause: the price type in 1C is called "Base", while in 1C-Bitrix a type named "Retail" was created. The mapping is set in /bitrix/admin/cat_price_type.php. Ensure that the XML tag <PriceType><Name> matches the NAME field in the b_catalog_price_type table.
Configuring export from 1C-Bitrix to 1C
For the reverse flow (orders → 1C), the same endpoint is used with the type=sale parameter. 1C-Bitrix generates orders.xml with a <Document> structure that includes order line items. Critically, verify that the exchange settings have the "Export sales" flag enabled and that the correct order statuses for export are specified.
Fine-tuning parameters via CBitrixComponent bitrix:catalog.import.1c:
IBLOCK_ID — catalog infoblock
PRICE_TYPE — default price type
STORE_ID — default warehouse
USE_CML2_DESCRIPTION — take description from XML
Work timeline
| Phase | Duration |
|---|---|
| Diagnosing the current exchange scheme | 2–4 hours |
| Configuring price type and warehouse mapping | 3–6 hours |
| Setting up step-by-step import | 2–4 hours |
| Test run + debugging | 4–8 hours |
Full configuration for a non-standard 1C structure takes 1–2 working days. If custom handling of the OnSuccessCatalogImport or OnBeforeCatalogImport events is required, add another day for handler development.







