Task
A supplier table stores availability as short codes such as A and N. For an advertising feed, the final availability column must contain accepted values such as in_stock and out_of_stock.
Short Answer
Open the final availability column and add replacement rules: A → in_stock, N → out_of_stock. If a channel needs different values, use a separate profile or a separate output column for that channel.
How to Do It in Eofferix
- In the table editor, open the settings of the final
availabilitycolumn. If it does not exist yet, add it and take the source value fromavailability_raw.
The settings button is highlighted under the final availability column. - In Transformations, add a rule: condition Current value equals
A, action Replace with, resultin_stock.
The first rule replaces the source code A with in_stock. - Add the second rule: condition Current value equals
N, action Replace with, resultout_of_stock.
The second rule replaces N with out_of_stock. - Save the column settings.
Before / After
Before
source data| sku | availability_raw |
|---|---|
| SKU-1001 | A |
| SKU-1002 | N |
After
result| sku | availability |
|---|---|
| SKU-1001 | in_stock |
| SKU-1002 | out_of_stock |