Shopify Product Embeddings
An agent answering “does this come in a wide fit?” needs your catalog, not a general model’s guess. This guide walks the Shopify catalog, turns each variant into an embedding, and stores it in StateSet so ResponseCX can retrieve it at answer time.Embedding variants, not products, is the important choice. Price, SKU, inventory, and options
live on the variant — a product-level embedding cannot answer “is the red one in stock in a 10?”
Before you start
- The StateSet Shopify app installed, which supplies the Shopify access token
- A StateSet API key
- Your Shopify shop domain, e.g.
your-store.myshopify.com

How it works
1
Page through the catalog
Shopify paginates with an opaque cursor in the
Link header. Follow it until it stops.2
Flatten products into variants
One embedding per variant, carrying the parent product’s context.
3
Store in StateSet
POST /v1/embeddings with the text and its metadata.Pin the API version
Page through the catalog
Shopify removed page-number pagination. Paging is cursor-based, and the cursor arrives in theLink
response header — there is no total count and no page number.
Flatten a product into variants
Store the embeddings
Run the sync
Run this as a backfill, then keep it current with Shopify’s
products/update webhook rather than
re-walking the catalog on a schedule. A full re-walk of a large catalog will spend most of its budget
re-embedding products that did not change.