A supplier file contains SKU values such as 00123, 00456, and 00789. The California catalog needs the format US-00123-CA: a country prefix and a state suffix on every SKU.
Create the output column sku_ready from sku and add two transformations: Add to beginning with US-, then Add to end with -CA.
How to do it in Eofferix
Upload the CSV or XLSX file with the
skucolumn and open the table editor. The sample also keeps aproductcolumn so the rows are easy to check.Create the output column
sku_readyfrom the source columnsku, or select the existing result column.Open the settings for the
sku_readycolumn with the gear icon in its header.
The animation opens the settings of the result column sku_ready.In
Transformations, addAdd to beginningwithUS-, then addAdd to endwith-CA.
Rules run from top to bottom: prefix US-first, suffix-CAsecond.Save the column settings and check several preview rows. Leading zeros in SKU values must stay intact.
Before / after
Before
source data| sku | product |
|---|---|
| 00123 | Hudson desk lamp |
| 00456 | Maple wall shelf |
| 00789 | Trail travel mug |
After
result| sku_ready | product |
|---|---|
| US-00123-CA | Hudson desk lamp |
| US-00456-CA | Maple wall shelf |
| US-00789-CA | Trail travel mug |
What to keep in mind
- Use this setup when the same prefix and suffix apply to every row.
- If some SKU values already contain
US-or-CA, add a condition to avoid duplicates. - Do not convert SKU values to numbers before processing: leading zeros such as
00123are part of the identifier.