Product ID vs SKU

This is for:

Developer

In this article, we’ll discuss the difference between a product ID and Stock Keeping Unit (SKU) and some of the rules around using them in your setup.

SKU

A sku is a unique ID used to distinguish each product from all of the other size, color, pattern, material, age, group, gender variants.

Product ID

A productId in Qubit’s data collection context is an ID used to identify a product, normally covering all of its size, color, pattern, and material variants.

Warning

The value in product.productId must not match the value in product.sku.

You can assign different productId values to product variants with different colors when appropriate. For instance, if a website displays color variations of the same product as separate items on product listing pages or in linked product carousels, it is logical to use unique productId values for each color variant.

Products may also have additional identifiers, such as a Universal Product Code (UPC), European Article Number (EAN), Global Trade Item Number (GTIN), or Item Group IDs. However, capturing this level of detail is not mandatory. It’s entirely sufficient to record just the productId and sku.

Example combining product ID and SKU

Here’s an example dataset illustrating how a product with two color variants—Beetle Blue and Lipstick Red—can use distinct productId values for each color, and unique sku values for each color/size combination:

[{
  "productId": "SB1799B_BeetleBlue",
  "sku": "5056001272446",
  "name": "Lateral Run Vest",
  "size": "S"
}, {
  "productId": "SB1799B_LipstickRed",
  "sku": "5056001272439",
  "name": "Lateral Run Vest",
  "size": "S"
}, {
  "productId": "SB1799B_BeetleBlue",
  "sku": "5056001272323",
  "name": "Lateral Run Vest",
  "size": "M"
}, {
  "productId": "SB1799B_LipstickRed",
  "sku": "5056001272316",
  "name": "Lateral Run Vest",
  "size": "M"
}]

In this example, the productId distinguishes color variants, while the sku identifies specific size and color combinations.

If you choose to use a single productId, such as SB1799B, for all color variants in the dataset, it would simplify the identifiers but impact the recommendations feed. For instance:

  • Shared productId for all colors: Only one color variant (for example, Beetle Blue) would appear in the feed.

  • Unique productId for each color: Each color variant (for example, Beetle Blue and Lipstick Red) would appear separately in the feed.

Using distinct productId values for each color ensures that all product variants are included in the feed, providing a more comprehensive view of available options.