# Duplicate product id

A duplicate id error means two or more rows in a feed claim the same identifier, so the channel cannot tell which one describes the item and keeps only the last it processed. On Shopify it usually means the feed was built per product rather than per variant, or that a SKU used as the id is blank or reused across variants.

- **Canonical URL:** https://www.feedlab.io/knowledge/errors/duplicate-id
- **Last reviewed:** 17 September 2026
- **Source:** feedlab knowledge base
- **Licence:** free to quote and cite with attribution to feedlab




## How this appears in your account

- `Duplicate value: id [id]`
- `Duplicate products`
- `Two or more items share the same id`


## Why it happens on Shopify

### A SKU was used as the id and is not unique

Shopify does not enforce unique SKUs, and does not require them at all. Mapping id from SKU produces collisions wherever two variants share one, and empty ids wherever the field is blank.

### The feed rows out at product level

When the feed emits one row per product but the mapping expands variants, several rows inherit the same product-derived id. Variant-level rows need variant-level ids.

### The same product appears through two collections

Feeds assembled by iterating collections emit a product once per collection it belongs to. A product in both "New in" and "Knitwear" produces two identical rows.

### A prefix was added inconsistently

Where ids are built by concatenating a prefix with an identifier, a missing or conditional prefix can make two genuinely different variants collapse to the same string.




## How to fix it

1. **Find which ids collide** — Group the feed by id and list any value appearing more than once. The pattern in the duplicates almost always names the cause: whole products repeating points at collection iteration, while pairs of variants point at SKU reuse.
2. **Map id from the variant identifier** — Shopify variant IDs are unique, permanent and always present, which makes them the correct source. SKUs are none of those three unless your store enforces them rigorously.
3. **Deduplicate before rendering rows** — If the feed is assembled by walking collections, collect the product set first and render each product once, rather than emitting a row per collection membership.
4. **Separate id from item_group_id** — Variants of one product are supposed to share an item_group_id while each keeps its own id. Collapsing the two is what turns a correct grouping into a duplicate error.
5. **Fail the run rather than publishing duplicates** — A uniqueness check at generation time catches the problem before the channel does, which matters because a duplicate id silently drops products from the catalogue rather than reporting each one.



## How feedlab handles this

feedlab expands one product into a row per variant and sources id from the variant, so uniqueness holds by construction rather than by convention. Where a store needs its own id scheme, the resolved values are visible in the preview against real products before the feed goes out.








## Frequently asked questions

### Why are duplicate ids a problem if the products are identical?

Because the channel keeps only one row per id and discards the others. Where the duplicates describe genuinely different variants, the ones dropped disappear from the catalogue silently rather than being reported individually.

### Can I use the Shopify SKU as the feed id?

Only if every variant has one, they are unique catalogue-wide, and they never change. Shopify enforces none of those conditions, so the variant ID is the safer source.

### What is the difference between a duplicate id and item_group_id?

Variants of the same product are meant to share an item_group_id while each keeps a unique id. Giving them the same id instead is the error; giving them the same item_group_id is the intended behaviour.




## Primary sources

- [Google: id attribute specification](https://support.google.com/merchants/answer/6324405)



