Data transformation

How to build offer id from product id, color and size

2026-06-20
Task

Product variants need a unique offer_id, for example P1001-red-M, built from product id, color and size.

Short answer

Create the field from product_id and append {color} and {size} with hyphens.

How to do it in Eofferix

  1. Create offer_id from product_id.
    offer_id built from product id, color and size
    The variant identifier is built from several source columns.
  2. Add a rule that appends -{color}.
    Rules for building offer_id from multiple fields
    {color} and {size} are appended to product_id with hyphens.
  3. Add a second rule that appends -{size}.
  4. Check that every variant has a unique identifier.

Before / after

The data below is a training example and does not belong to real user files.

Before

source data
product_idcolorsize
P1001redM
P1001blueL

After

result
offer_id
P1001-red-M
P1001-blue-L

Process data faster with Eofferix

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

Sign up