Supplier catalogs

How to keep only YML offers with a valid url

2026-06-29
Task

Some supplier YML url values are already absolute, some arrive as /catalog/sku-6002, and sometimes the field is empty or contains only the base domain https://supplier.example. The import should keep only products with a complete link.

Short answer

Configure transformations on the url value: if the current value does not contain https://supplier.example, prepend that domain. Then, if the result equals https://supplier.example, replace it with an empty value. In export conditions, keep only url values where the current value after transformations is not empty.

How to do it in Eofferix

  1. In the XML/YML snapshot, select the url value inside the repeated offer.

  2. Open the url value settings.

    Opening url settings
    The settings are applied to the link value, not to the whole offer node.
  3. Add a transformation rule: current value Does not contain substring https://supplier.example, action Add to beginning, result https://supplier.example.

    Rule for adding domain to url
    The rule turns relative paths such as /catalog/sku-6002 into absolute links.
  4. Add the second rule: current value Equals https://supplier.example, action Replace with, leave the result empty.

    Rule for clearing base domain without path
    This turns empty links and base-domain-only links into an empty value.
  5. In export conditions, set: current value After transformations Not empty. Use the whole-element scope so the entire offer is excluded.

    After-transform condition for url
    After the two rules, only products with a non-empty usable link remain.

Before / after

Before

source data
<yml_catalog date="2026-06-29 10:00">
  <shop>
    <offers>
      <offer id="YML-6001" available="true">
        <name>Hudson lamp</name>
        <url>https://supplier.example/catalog/sku-6001</url>
        <currencyId>USD</currencyId>
        <price>1290.00</price>
      </offer>
      <offer id="YML-6002" available="true">
        <name>Parker chair</name>
        <url>/catalog/sku-6002</url>
        <currencyId>USD</currencyId>
        <price>8400.00</price>
      </offer>
      <offer id="YML-6003" available="true">
        <name>Harbor shelf</name>
        <url>
        </url>
        <currencyId>USD</currencyId>
        <price>990.00</price>
      </offer>
      <offer id="YML-6004" available="true">
        <name>Harbor shelf</name>
        <url>https://supplier.example</url>
        <currencyId>USD</currencyId>
        <price>990.00</price>
      </offer>
    </offers>
  </shop>
</yml_catalog>

After

result
<yml_catalog date="2026-06-29 10:00">
  <shop>
    <offers>
      <offer id="YML-6001" available="true">
        <name>Hudson lamp</name>
        <url>https://supplier.example/catalog/sku-6001</url>
        <currencyId>USD</currencyId>
        <price>1290.00</price>
      </offer>
      <offer id="YML-6002" available="true">
        <name>Parker chair</name>
        <url>https://supplier.example/catalog/sku-6002</url>
        <currencyId>USD</currencyId>
        <price>8400.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