By default, a Shopify product with several variants appears in the feed once for each variant. Some channels and some advertisers want one entry per product instead. Merge product variants joins the variants of each product into one product. You set it up on the channel's Merge variants tab.
item_group_id.price.Products with an empty Group by value aren't merged and stay as they are.
Each action looks at the values of one field across the variants of a product, in the order they're in the feed. Empty values are left out.
The examples use a T-shirt with three variants.
| Variant | id | title | price | size | inventory |
|---|---|---|---|---|---|
| 1 | 4401 | Merino Crew Tee - Navy / S | 79.00 NZD | S | 3 |
| 2 | 4402 | Merino Crew Tee - Navy / M | 69.00 NZD | M | 5 |
| 3 | 4403 | Merino Crew Tee - Navy / L | 79.00 NZD | (empty) | 0 |
All three have item_group_id = 8123.
| Action | What it gives | Example result |
|---|---|---|
| First non-empty value | The first value that isn't empty. | id gives 4401 |
| Common part | The words that every value starts with. If all values are the same, that value. Any dash, vertical bar, comma, slash or colon left at the end is removed. | title gives Merino Crew Tee - Navy |
| Lowest number | The value with the lowest number, kept as written. | price gives 69.00 NZD |
| Highest number | The value with the highest number, kept as written. | price gives 79.00 NZD |
| Sum | All the numbers added up. | inventory gives 8 |
| List of unique values | Every different value, separated by commas. Values that already contain commas are split first. | size gives S,M |
| Group ID (if set) | The Group by value. If it's somehow empty, the first value. | id gives 8123 |
Group ID (if set) is useful for id, so the merged product's ID is the product ID rather than the ID of its first variant.
Variant filters remove single variants before they're merged. For example, you can remove sold-out sizes so their price doesn't count towards Lowest number.
Click Add filter and set it up like an include or exclude rule. See Include / exclude. Removed variants show "Variant filter: …" under Why excluded.
Feedsmith maps the channel fields and sets categories first, then applies variant filters, then merges. Include and exclude rules run on the merged products. A merged product keeps the source field values of its first variant, so an include or exclude condition on an source field such as sku checks the first variant's SKU.