Skip to main content

Product IDs, Variant IDs, and SKUs

Faslet matches product-page interactions, orders, returns, and feed data by keeping three identifiers consistent: the product ID, the variant ID, and the SKU. Most integration issues happen when those values are mixed up across the feed, the PDP integration, checkout tracking, and return tracking.

This page is the canonical reference for which value Faslet expects in each place.

The Three Identifiers

IdentifierWhat it identifiesRecommended sourceImportant rule
Product IDThe parent product or styleUsually the same value as your feed item_group_idKeep this stable across the PDP, order tracking, and returns. Do not use a per-variant SKU here.
Variant IDOne purchasable variant, such as size/colorUsually your commerce platform's variant identifierThis is mainly used for variant selection and add-to-cart. It does not have to equal the SKU.
SKUThe merchant SKU for a specific purchasable variantThe SKU shown in your commerce platform, OMS, and return systemsKeep this exact value consistent between the widget variants, order tracking, and return tracking.

A Good Product ID

It doesn't matter what format your Product ID has, as long as it refers to the parent product and stays the same everywhere. On product pages, Faslet uses this to resolve the right sizing context, so we do not recommend using variant identifiers such as a GTIN, SKU, or platform variant ID here.

In most setups, the best choice is the same value you use as the Google Shopping item_group_id. This is often called a Product ID, Product Group ID, Parent Product ID, or Parent ID.

One Concrete Product Example

For one product with three variants, the values could look like this:

ConceptExample value
Product titleClassic Oxford Shirt
Product IDOXFORD-SHIRT
Variant ID for Small / Blueshopify-variant-451001
Variant ID for Medium / Blueshopify-variant-451002
Variant ID for Large / Blueshopify-variant-451003
SKU for Small / BlueOXFORD-BLUE-S
SKU for Medium / BlueOXFORD-BLUE-M
SKU for Large / BlueOXFORD-BLUE-L

The important part is the relationship:

  • OXFORD-SHIRT is the parent product and stays the same for every variant.
  • Each purchasable size has its own variantId.
  • Each purchasable size also has its own sku.

Same Values in Different Places

The identifiers above are the values that must stay consistent across systems. A few other fields are also important because they are required for order tracking, returns, analytics, or size matching.

Product ID Mapping

SurfaceExpected field name
Product feeditem_group_id
Web component integrationproduct-identifier
window._fasletid
NPM widget.withProductId(PRODUCT_IDENTIFIER)
React widgetproductId
PHP widget->withProductId(PRODUCT_IDENTIFIER)
Headless size advice APIproductId
Browser order trackingcorrelationId
Orders APIlineItems[].productId
Returns APIproductId

Variant ID Mapping

SurfaceExpected field name
Product feedid
window._fasletvariants[].id
NPM widget.addVariant(VARIANT_ID, ...)
React widgetvariants[].variantId
PHP widget->addVariant(VARIANT_ID, ...)
Headless size advice APIvariants[].variantId
Browser order trackingvariant_id
Orders APIlineItems[].variantId

SKU Mapping

SurfaceExpected field name
window._fasletvariants[].sku
NPM widget.addVariant(..., VARIANT_SKU, ...)
React widgetvariants[].sku
PHP widget->addVariant(..., VARIANT_SKU, ...)
Browser order trackingsku
Orders APIlineItems[].sku
Returns APIsku

Size Label Mapping

SurfaceExpected field name
Product feedsize
window._fasletvariants[].size
NPM widget.addVariant(..., SIZE_LABEL, ...)
React widgetvariants[].sizeLabel
PHP widget->addVariant(..., SIZE_LABEL, ...)
Headless size advice APIvariants[].sizeLabel
Browser order trackingvariant
Orders APIlineItems[].variant

For order tracking, variant should be the shopper-facing variant description, usually the size label or a size/color label such as M or M / Blue. Do not send the variant ID in this field.

Other Required Fields Worth Mapping

These are not identifier fields, but they are still important to get right:

ConceptBrowser order trackingOrders APIReturns APIWhy it matters
Order numberorderorderIdorderIdConnects purchases and returns to the same order.
Payment statuspayment_statuspaymentStatusNot usedPrevents unpaid or invalid orders from being counted.
Product titletitlelineItems[].titleNot usedMakes reporting and troubleshooting easier.
Variant labelvariantlineItems[].variantNot usedRecords which size or size/color the shopper bought.
QuantityquantitylineItems[].quantityNot usedNeeded for order value and conversion analysis.
PricepricelineItems[].priceNot usedNeeded for AOV and revenue analysis.
Return reasonNot usedNot usedreturnReasonRequired for return analysis.
Return dateNot usedNot usedreturnDateRequired for return processing and reporting.
External return IDNot usedNot usedexternalIdUseful for debugging and reconciling returns.

If you send orders through the Orders API instead of the browser script, customerDataPackage is also required at the order level.

Example Payloads

Product Feed

For the example product above, your feed rows would normally use the same parent product ID and distinct variant IDs:

Feed fieldSmall / BlueMedium / Blue
item_group_idOXFORD-SHIRTOXFORD-SHIRT
idshopify-variant-451001shopify-variant-451002
sizeSM

PDP Integration

<faslet-app
shop-id="SHOP_ID"
product-name="Classic Oxford Shirt"
product-identifier="OXFORD-SHIRT"
brand="Oxford Co"
product-img="https://example.com/oxford-shirt.jpg"
></faslet-app>
window._faslet = {
id: "OXFORD-SHIRT",
variants: [
{
id: "shopify-variant-451001",
sku: "OXFORD-BLUE-S",
size: "S",
color: "blue",
available: true,
price: 79.95,
},
{
id: "shopify-variant-451002",
sku: "OXFORD-BLUE-M",
size: "M",
color: "blue",
available: true,
price: 79.95,
},
],
};

Order Tracking

In the browser integration, the same identifiers appear like this:

window._faslet_orders.event("widget_order_track", "SHOP_ID", {
order: "100023",
payment_status: "paid",
sku: "OXFORD-BLUE-M",
correlationId: "OXFORD-SHIRT",
title: "Classic Oxford Shirt",
variant_id: "shopify-variant-451002",
variant: "M / Blue",
price: 79.95,
quantity: 1,
});

If you use the Orders API instead of the browser script, that same line item becomes productId, variantId, and sku.

Return Tracking

For return tracking, Faslet needs the order ID plus the same product-level and SKU-level identifiers:

[
{
"orderId": "100023",
"productId": "OXFORD-SHIRT",
"sku": "OXFORD-BLUE-M",
"returnReason": "1",
"returnDate": "2026-05-12T10:15:00.000Z",
"externalId": "return-100023"
}
]

In the Returns API, orderId, productId, and sku are the key matching values. orderId links the return back to the purchase, while productId and sku identify the specific item. There is no separate variantId field there.

Rules of Thumb

  1. Use the same parent product ID everywhere the docs refer to productId, PRODUCT_IDENTIFIER, product-identifier, or correlationId.
  2. Use a real variant identifier everywhere the docs refer to variantId, VARIANT_ID, variants[].id, or variant_id.
  3. Use the exact purchasable SKU everywhere the docs refer to sku.
  4. Use a human-readable size or size/color label everywhere the docs refer to variant or sizeLabel.
  5. It is fine if variantId and sku are different values. That is normal on many platforms.
  6. If your feed is already live in Faslet, start from its item_group_id and variant rows and map your storefront data to those values.

Variant IDs and Add-to-Cart

Variant IDs are especially important for add-to-cart. On many platforms, this must be the platform's real variant identifier so that add-to-cart can select the correct item. For custom platforms, Faslet simply passes the selected Variant ID back into your add-to-cart function.

That means the Variant ID should be whatever your storefront needs to add the correct variant to cart, while the SKU should stay whatever your operational systems use for order and return matching.

SKUs

It is important to send SKUs with the variants, as well as with orders and returns. This allows Faslet to track the specific item that was recommended, purchased, and returned. For analytics, this makes it possible to report at SKU level for outcomes such as return percentages and missed sales.