Task
The feed has a promo_flag and a promo_code. The promotion_id column should contain the code only for sale products.
Short answer
Create promotion_id, clear it first, then insert {promo_code} only when promo_flag is not empty.
How to Do It in Eofferix
- Open the settings of the output
promotion_idcolumn.
The click is on the settings icon of the output promotion_idcolumn. - In
Transformations, use two rules: the first leaves the value empty, the second checkspromo_flagand inserts the sale code.
The Transformationsblock shows the full rule chain for this case. - Save the column settings and go to the
Exportstep.
Before / After
Before
source data| id | title | promo_flag | promo_code |
|---|---|---|---|
| GM-150 | Sprint sneakers | yes | SUMMER25 |
| GM-151 | City backpack | SUMMER25 |
After
result| id | promotion_id |
|---|---|
| GM-150 | SUMMER25 |
| GM-151 |