Configuring Order Export from 1C-Bitrix to 1C
Order export is the first stage of a two-way exchange. The website generates an XML file and provides it to 1C on request. The configuration is straightforward, but there are details that determine whether all the required data reaches 1C in the correct format.
Enabling Order Export
Settings → Product Settings → Online Store → 1C Exchange → Orders:
- Export orders: yes
- Order statuses for export: select the required statuses. Most commonly "New" and "Paid"; cancelled orders should not be exported — they create unnecessary documents in 1C
- Export orders created no earlier than: limit the history if the store was operating without 1C — there is no need to pull orders from several years back
Order XML Structure
The standard order XML includes buyer details, line items with quantities and prices, the selected delivery method, and order properties. Simplified structure:
<Document>
<Id>ORDER_ID</Id>
<Number>ACCOUNT_NUMBER</Number>
<Date>2024-03-15</Date>
<Counterparties>
<Counterparty>
<Id>USER_1C_ID</Id>
<Name>John Smith</Name>
</Counterparty>
</Counterparties>
<Products>
<Product>
<Id>PRODUCT_1C_ID</Id>
<Quantity>2</Quantity>
<PricePerUnit>1500</PricePerUnit>
</Product>
</Products>
<Amount>3000</Amount>
</Document>
For a product to be transmitted to 1C correctly, the presence of <Id> is critical — the 1C product identifier stored in the CML2_LINK property of the info block element. If a product was created on the website manually without this property — it will arrive in 1C as "unknown product," creating manual work for the 1C operator.
Transmitting Buyer Details
For individual customers, the standard set of details (name, phone, address) is transmitted automatically from order properties. Legal entities require additional data: Tax ID (INN), KPP, and company name. This data is stored in separate order properties and added to the XML via a handler:
\Bitrix\Main\EventManager::getInstance()->addEventHandler(
'sale',
'OnSaleOrderExport1C',
function(&$arOrder) {
$arOrder['COMPANY'] = $arOrder['PROPS']['COMPANY']['VALUE'];
$arOrder['INN'] = $arOrder['PROPS']['INN']['VALUE'];
$arOrder['KPP'] = $arOrder['PROPS']['KPP']['VALUE'];
}
);
Order Numbering
1C looks up an order by the <Number> from the XML. By default, 1C-Bitrix transmits ACCOUNT_NUMBER — for example, 1000423. If documents with such numbers already exist in 1C from another system — conflicts will arise. A prefix resolves the issue:
// In exchange settings or a handler
$arOrder['ACCOUNT_NUMBER'] = 'WEB-' . $arOrder['ACCOUNT_NUMBER'];
Delivery and Payment in the Order XML
The delivery service and payment method are transmitted in separate blocks:
<AttributeValues>
<AttributeValue>
<Name>PaymentMethod</Name>
<Value>Online card payment</Value>
</AttributeValue>
<AttributeValue>
<Name>DeliveryMethod</Name>
<Value>Courier Delivery</Value>
</AttributeValue>
</AttributeValues>
The names in 1C must match what 1C-Bitrix transmits — otherwise 1C will create new entries in the "Delivery Methods" reference book on each mismatch.
Setup Timeline
Configuring order export for a standard scenario — 2–4 hours. With legal entity details, non-standard properties, and custom numbering — 4–8 hours.

