Task
A supplier sends image links in image_1, image_2, and image_3. The export needs one main_image column with the first non-empty URL.
Short answer
Create main_image from image_1; when the current value is empty, replace it with {image_2}, and if it is still empty, replace it with {image_3}.
How to do it in Eofferix
Open the settings of the output
main_imagecolumn and selectimage_1as the source.
The outline shows where to open the settings for main_image.In
Transformations, add two rules: if the current value isEmpty,Replace with→{image_2}; then anotherEmptyrule withReplace with→{image_3}.
Rule order matters: Eofferix checks image_2first, thenimage_3.Save the template and run the transformation on the final step.
Before / after
Before
source data| sku | image_1 | image_2 | image_3 |
|---|---|---|---|
| SKU-100 | https://cdn.example/en-chair-1.jpg | https://cdn.example/en-chair-2.jpg | |
| SKU-200 | https://cdn.example/en-desk-1.jpg |
After
result| sku | main_image |
|---|---|
| SKU-100 | https://cdn.example/en-chair-1.jpg |
| SKU-200 | https://cdn.example/en-desk-1.jpg |