Supplier catalogs

How to skip XML offers without vendorCode or a barcode

2026-06-29
Task

The XML feed contains offers without vendorCode and offers with barcode values such as bad-code. The import should keep only items with a supplier code and a valid 13-digit barcode.

Short answer

Open the repeated offer node settings and add export conditions: vendorCode is not empty, and barcode matches the regular expression ^\d{13}$ (matches a value made of exactly 13 digits).

How to do it in Eofferix

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

  2. Open the node settings.

    Opening offer settings in XML
    The animation shows opening settings for the repeated XML node.
  3. Add two export conditions: vendorCode is not empty and barcode matches ^\d{13}$ (matches a value made of exactly 13 digits).

    vendorCode and barcode conditions on offer
    Both conditions are applied to the whole item.

Before / after

Before

source data
<catalog>
  <offers>
    <offer id="1001"><vendorCode>VN-1001</vendorCode><barcode>4601234567890</barcode><name>Hudson lamp</name><price>24.90</price></offer>
    <offer id="1002"><vendorCode></vendorCode><barcode>4601234567891</barcode><name>Parker chair</name><price>139.00</price></offer>
    <offer id="1003"><vendorCode>VN-1003</vendorCode><barcode>bad-code</barcode><name>Harbor shelf</name><price>16.40</price></offer>
  </offers>
</catalog>

After

result
<catalog>
  <offers>
    <offer id="1001"><vendorCode>VN-1001</vendorCode><barcode>4601234567890</barcode><name>Hudson lamp</name><price>24.90</price></offer>
  </offers>
</catalog>

What to keep in mind

  • Place the conditions on the offer node so the whole item is excluded, not only one empty field.
  • If a supplier uses 8-digit EAN-8 codes, handle that as a separate case or extend the expression deliberately.
  • Check that vendorCode is read from the same repeated offer, not from a neighboring item.

Process data faster with Eofferix

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

Sign up