Setting up product property export from 1C to 1C-Bitrix
Product properties (card requisites) are transmitted from 1C to Bitrix in the <СвойстваТовара> block of import.xml file. This is one of the most frequently requiring configuration parts of exchange: structure of data in 1C and Bitrix is different, and automatic matching doesn't always work correctly.
Structure of properties in CommerceML
In import.xml product properties look like:
<Товар>
<Ид>GUID</Ид>
<ЗначенияСвойств>
<ЗначениеСвойства>
<ИдСвойства>GUID-свойства</ИдСвойства>
<Значение>Red</Значение>
</ЗначениеСвойства>
</ЗначенияСвойств>
</Товар>
Properties classifier (what the property is, data type, allowed values) is transmitted at beginning of import.xml in <Свойства> block. On first exchange Bitrix creates properties automatically — if they don't exist.
Properties mapping
In Bitrix admin: Catalog → 1C Exchange Settings → Property Matching. Here is defined, to which infoblock property each property from 1C goes.
Matching happens by property XML_ID in infoblock: when creating property automatically, field XML_ID is filled with property GUID from 1C. If property already exists — need to manually fill XML_ID in property settings.
For viewing and editing: Infoblocks → [needed infoblock] → Properties → XML_ID of each property.
Data types and their storage
| Type in 1C | Bitrix infoblock property | Table |
|---|---|---|
| String | "String" type | b_iblock_element_prop_s{N} |
| Number | "Number" type | b_iblock_element_prop_s{N} |
| Boolean (Yes/No) | "List" type (Y/N) or "Flag" | b_iblock_element_prop_s{N} |
| Dictionary (value list) | "List" type | b_iblock_property_enum |
Dictionaries (value lists) — separate story. In 1C stored as enumerations with GUID. In Bitrix — as b_iblock_property_enum with XML_ID. On first exchange Bitrix creates enumeration elements automatically. On subsequent — matches by XML_ID.
Multiple properties
If property in 1C can have multiple values (for example, "Applicability" — list of models, what spare part fits), in Bitrix create multiple property. In b_iblock_property field MULTIPLE = Y. Values stored in b_iblock_element_prop_m{N}.
When exchanging multiple <ЗначениеСвойства> tags with one <ИдСвойства> — Bitrix should process them as multiple value. If standard import doesn't — supplement via OnIBlockChange.
Post-processing via events
If standard mapping insufficient (for example, need to transform value — convert article to uppercase, supplement description), use event:
AddEventHandler('iblock', 'OnBeforeIBlockElementUpdate', function(&$arFields) {
if ($arFields['IBLOCK_ID'] == CATALOG_IBLOCK_ID) {
// Custom processing before saving
}
});
SKU properties
SKU properties (color, size — those by which SKUs are formed) transmitted in offers.xml, not in import.xml. Their structure similar, mapping is configured for SKU infoblock separately.
What to check when setting up
- Property
XML_IDin infoblock matches GUID of property from 1C - Property type in Bitrix corresponds to data type from 1C
- For dictionaries, enumeration elements have correct
XML_ID - For multiple properties, flag
MULTIPLE = Yis set







