Supplier catalogs

How to prepare a price and stock update by SKU

2026-06-28
Task

The supplier update already has sku, but stock is written as Stock: 12 pcs. The catalog import needs sku, price, and stock without text prefixes or units.

Short answer

If stock is always a number inside the string, use \d+ (finds one or more digits in a row) with Remove everything except. If the format is stable, remove Stock: and pcs as substrings.

How to do it in Eofferix

Method 1: use a regular expression in Eofferix

  1. Create the output column stock_regex from stock_text.

  2. Open the settings of stock_regex.

    Opening the stock_regex settings in Eofferix
    The animation shows which output column is configured for the stock value.
  3. Add a rule: condition Regular expression, value \d+ (finds one or more digits in a row), action Remove everything except.

    Regular expression rule for extracting stock quantity
    The rule keeps only the numeric stock quantity from the supplier text.

Method 2: use substring search in Eofferix

  1. Create the output column stock_text_method from stock_text.

  2. Open the settings of stock_text_method.

    Opening the stock_text_method column in Eofferix
    Use this option when the supplier always sends the same prefix and suffix.
  3. Add two substring replacement rules: remove the stable prefix, then remove the stable unit suffix.

    Substring rules for removing stock prefix and suffix
    For Replace substring, the text to find is set in the condition; the result is left empty.

Before / after

Before

source data
skuprice_rawstock_text
SKU-1001USD 24.90Stock: 12 pcs
SKU-1002USD 139.00Stock: 0 pcs

After

result
skupricestock
SKU-100124.9012
SKU-1002139.000

What to keep in mind

  • Keep SKU unchanged because it is the update key.
  • If the supplier sends values such as out of stock, add a separate rule or export condition.
  • For a price with a currency suffix, use the same number extraction approach as in the vendor price list case.

Process data faster with Eofferix

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

Sign up