Supplier catalogs

How to remove YML offers with available="false"

2026-06-29
Task

Some YML products are marked with available="false". These items should be removed from the result while available offers stay.

Short answer

Add an export condition to offer: the simplest variant is @available before transformations equals true. If the supplier sends only true/false, you can use @available is not equal to false. Use ^(true|1|yes)$ only when several positive values are possible.

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 the repeated product node settings.
  3. Method 1: in Export conditions, select @available, phase Before transformations, condition Equals, value true.

    Export condition
    This is one condition variant; the other variants do not need to be added.
  4. Method 2: if the supplier always sends only true/false, use @available Not equal false.

    Export condition
    This is one condition variant; the other variants do not need to be added.
  5. Method 3: if availability can be written as true, 1, or yes, use regular expression ^(true|1|yes)$ (matches a value that is exactly one of these variants).

    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-2001" available="true">
        <name>Hudson lamp</name>
        <categoryId>101</categoryId>
        <price>24.90</price>
      </offer>
      <offer id="YML-2002" available="false">
        <name>Parker chair</name>
        <categoryId>205</categoryId>
        <price>139.00</price>
      </offer>
      <offer id="YML-2003" available="true">
        <name>Harbor shelf</name>
        <categoryId>101</categoryId>
        <price>16.40</price>
      </offer>
    </offers>
  </shop>
</yml_catalog>

After

result
<yml_catalog date="2026-06-29 10:00">
  <shop>
    <offers>
      <offer id="YML-2001" available="true">
        <name>Hudson lamp</name>
        <categoryId>101</categoryId>
        <price>24.90</price>
      </offer>
      <offer id="YML-2003" available="true">
        <name>Harbor shelf</name>
        <categoryId>101</categoryId>
        <price>16.40</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