Supplier catalogs

How to extract a CommerceML property value by ID

2026-06-29
Task

CommerceML product properties are stored in ЗначенияСвойств: country and warranty sit next to each other. The import needs only the country value with ID prop-country.

Short answer

Open Значение inside ЗначенияСвойства and add a condition on Ид: regular expression ^prop-country$ (matches a value that is exactly prop-country).

How to do it in Eofferix

  1. In the XML snapshot, select the Значение value inside the repeated block.

  2. Open the value settings.

    Opening value settings
    The animation shows opening settings for the selected value.
  3. Option without a regular expression: add an export condition on neighboring Ид - Equals prop-country.

    Value condition
    This makes Eofferix take Значение only from the property block with the needed ID.
  4. Regular expression option: add an export condition on neighboring Ид - Regular expression ^prop-country$ (matches a value that is exactly prop-country).

    Value condition
    This is the strict version of the same check when the ID must match fully.

Before / after

Before

source data
<КоммерческаяИнформация ВерсияСхемы="2.10">
  <Каталог>
    <Товары>
      <Товар>
        <Ид>SKU-28001</Ид>
        <Наименование>Hudson lamp</Наименование>
        <ЗначенияСвойств>
          <ЗначенияСвойства>
            <Ид>prop-country</Ид>
            <Значение>United States</Значение>
          </ЗначенияСвойства>
          <ЗначенияСвойства>
            <Ид>prop-warranty</Ид>
            <Значение>24</Значение>
          </ЗначенияСвойства>
        </ЗначенияСвойств>
      </Товар>
      <Товар>
        <Ид>SKU-28002</Ид>
        <Наименование>Parker chair</Наименование>
        <ЗначенияСвойств>
          <ЗначенияСвойства>
            <Ид>prop-country</Ид>
            <Значение>Canada</Значение>
          </ЗначенияСвойства>
          <ЗначенияСвойства>
            <Ид>prop-warranty</Ид>
            <Значение>12</Значение>
          </ЗначенияСвойства>
        </ЗначенияСвойств>
      </Товар>
    </Товары>
  </Каталог>
</КоммерческаяИнформация>

After

result
<Товары>
  <Товар>
    <Ид>SKU-28001</Ид>
    <Наименование>Hudson lamp</Наименование>
    <Страна>United States</Страна>
  </Товар>
  <Товар>
    <Ид>SKU-28002</Ид>
    <Наименование>Parker chair</Наименование>
    <Страна>Canada</Страна>
  </Товар>
</Товары>

Process data faster with Eofferix

Create a free account to automate catalogs and price lists around your own rules.

Sign up