Configuring User Synchronization Between 1C and 1C-Bitrix
When the customer database is maintained in 1C and the website runs on Bitrix, the question inevitably arises: how does a user from 1C gain access to their personal account on the site? Manually migrating several thousand records is not the answer. Synchronization is required.
Synchronization Direction
Define this before starting work:
- 1C → site: the client base is maintained in 1C, the site receives up-to-date data
- Site → 1C: registration on the site creates a counterparty in 1C
- Bidirectional: changes in either system are synchronized
The first option is most common: 1C is the master system, the site is the data consumer.
Transmitting Users via CommerceML
The standard exchange transmits users as counterparties within orders. To export the entire client base without orders — a separate XML file or REST API is required.
Minimum set of fields for creating a user on the site:
<Контрагент>
<Ид>CLIENT_1C_GUID</Ид>
<Наименование>Иванов Иван Иванович</Наименование>
<Контакты>
<Контакт>
<Тип>Почта</Тип>
<Значение>[email protected]</Значение>
</Контакт>
<Контакт>
<Тип>Телефон</Тип>
<Значение>+79001234567</Значение>
</Контакт>
</Контакты>
</Контрагент>
Importing Users on the Bitrix Side
Creating a user via the API:
$user = new CUser;
$arFields = [
'EMAIL' => $email,
'NAME' => $firstName,
'LAST_NAME' => $lastName,
'LOGIN' => $email,
'PASSWORD' => \Bitrix\Main\Security\Random::getString(12),
'ACTIVE' => 'Y',
'UF_1C_ID' => $oneCGuid,
];
$userId = $user->Add($arFields);
After creation — send an email with a password-setup link (CONFIRM_CODE via CUser::SendUserInfo).
Avoiding Duplicates
Before creating a user — check by email and by UF_1C_ID:
$existing = \Bitrix\Main\UserTable::getList([
'filter' => ['=UF_1C_ID' => $oneCGuid],
'select' => ['ID'],
])->fetch();
if ($existing) {
// update data, do not create
}
Access Groups
Users from 1C are typically divided into groups: retail buyers, wholesale clients, partners. The group is transmitted via the "Counterparty Type" field in the XML and mapped to Bitrix user groups with corresponding price types.
Setup Timeline
Configuring one-way user synchronization 1C → Bitrix — 1–2 days.







