Configuring Counterparty Exchange Between 1C and 1C-Bitrix
Counterparty synchronization is a critical task for B2B stores: a registered legal-entity customer on the site must automatically appear in 1C as a counterparty with all their details. The reverse scenario is equally important: an existing 1C client gets a personal account on the site with order history. Standard CommerceML transmits buyer data as part of orders, but this is not sufficient for a full counterparty directory exchange.
What Is Transmitted in the Standard Exchange
In the order XML, the <Контрагенты> block contains buyer data:
<Контрагент>
<Ид>USER_1C_ID</Ид>
<Наименование>ООО "Ромашка"</Наименование>
<ИНН>7701234567</ИНН>
<КПП>770101001</КПП>
<Роль>Покупатель</Роль>
<АдресРегистрации>
<Представление>г. Москва, ул. Ленина, 10</Представление>
</АдресРегистрации>
</Контрагент>
When processing the order, 1C finds or creates a counterparty by TIN. If the counterparty already exists — it updates the details only when explicitly permitted in the exchange settings.
Linking a Site User to a 1C Counterparty
For B2B scenarios it is important to store a persistent link "site user → counterparty in 1C". This is stored in the custom field UF_1C_ID of the b_user table. After the first order exchange, 1C returns the GUID of the created counterparty; 1C-Bitrix saves it in the user's profile.
This allows subsequent orders to be linked to an existing counterparty rather than creating a new one. Without this link, duplicate counterparties accumulate in 1C — especially for guest orders.
Synchronizing Individual Prices
If a counterparty in 1C has an individual price or discount assigned, it must be applied at checkout on the site. Two approaches:
Via price types. Create a separate price type in 1C for each customer group (retail, wholesale, dealer). On the site — corresponding price types linked to user groups. During synchronization the user is added to the appropriate group.
Via REST API on login. When a user logs in — query 1C by UF_1C_ID to retrieve the current discount and apply it to the session. More flexible, but more complex to implement.
Exporting the Counterparty Directory from 1C to the Site
If you need to migrate an existing client base from 1C to the site (create accounts for all counterparties), the standard exchange does not support this — a separate import script is required. A site user is created for each 1C counterparty and sent an email with a password-setup link.
Setup Timeline
Configuring the basic counterparty link via orders — 4–6 hours. With individual price synchronization — 1–3 days. Migrating the client base from 1C to the site — 1–2 days depending on volume.







