Supplier catalogs

How to keep YML offers with vendorCode in the needed format

2026-06-29
Task

The YML contains normal SKUs and free text in vendorCode. The import needs only codes such as LA-22001.

Short answer

Add an export condition to offer: vendorCode must match regular expression ^[A-Z]{2}-[0-9]{5}$ (matches two uppercase Latin letters, a dash, and five digits from start to end).

How to do it in Eofferix

  1. In the XML/YML snapshot, select the repeated offer node.

  2. Open the node settings.

    Opening offer settings
    The animation shows opening settings for the repeated product node.
  3. Method 1: regular expression ^[A-Z]{2}-[0-9]{5}$ matches two uppercase Latin letters, a dash, and five digits from start to end.

    Export condition
    This is one condition variant; the other variants do not need to be added.
  4. Method 2: if a prefix is enough, use vendorCode Contains substring LA-.

    Export condition
    This is one condition variant; the other variants do not need to be added.
  5. Method 3: for a stricter prefix check, use vendorCode Starts with LA-.

    Export condition
    This is one condition variant; the other variants do not need to be added.

Before / after

Before

source data
<yml_catalog date="2026-06-29 10:00">
  <shop>
    <offers>
      <offer id="YML-22001">
        <name>Hudson lamp</name>
        <vendorCode>LA-22001</vendorCode>
        <price>1290.00</price>
      </offer>
      <offer id="YML-22002">
        <name>Parker chair</name>
        <vendorCode>supplier item 22002</vendorCode>
        <price>8400.00</price>
      </offer>
      <offer id="YML-22003">
        <name>Harbor shelf</name>
        <vendorCode>PN-22003</vendorCode>
        <price>990.00</price>
      </offer>
    </offers>
  </shop>
</yml_catalog>

After

result
<yml_catalog date="2026-06-29 10:00">
  <shop>
    <offers>
      <offer id="YML-22001">
        <name>Hudson lamp</name>
        <vendorCode>LA-22001</vendorCode>
        <price>1290.00</price>
      </offer>
      <offer id="YML-22003">
        <name>Harbor shelf</name>
        <vendorCode>PN-22003</vendorCode>
        <price>990.00</price>
      </offer>
    </offers>
  </shop>
</yml_catalog>

Process data faster with Eofferix

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

Sign up