item_group_id vs id: product identification levels
How the base product identifier (item_group_id) differs from the variant identifier (id), and why variants in the product file are so valuable.
item_group_id
The product identifier (item_group_id) is a unique identifier assigned to the main, base product. For example, the "Classic T-shirt" has one main product identifier (item_group_id).
id
The main product "Classic T-shirt" has the product identifier item_group_id, say "1". Its variants have their own variant identifiers id, labelled "a", "b", "c", "d":
| Variant | item_group_id | id |
|---|---|---|
| Classic T-shirt, white, size S | 1 | a |
| Classic T-shirt, white, size M | 1 | b |
| Classic T-shirt, black, size S | 1 | c |
| Classic T-shirt, black, size M | 1 | d |
One Classic T-shirt product with item_group_id: 1 can have many variants with ids a, b, c, d. Variant identifiers are always tied to the product identifier.
Variants in the product file are especially valuable for sales analysis: they let you track each product version precisely, understand customer preferences and spot the most popular combinations of attributes such as size, colour or style.
Related articles
