E-Commerce
A storefront needs product data that is both structured enough for search and checkout, and flexible enough to test what actually converts. This walkthrough sets up a Products collection, a related Categories collection, and an A/B test on a product page.
Modeling products
Create a Products collection with these fields:
| Field | Type | Notes |
|---|---|---|
| name | text | Product title |
| description | richtext | Long-form product copy |
| price | number | Decimal, in the store's base currency |
| sku | text | Unique, used to reconcile with inventory |
| inStock | boolean | Drives availability badges |
| images | media | Gallery, multiple assets |
| category | relation | Points at a Categories entry |
| fulfillment | enumeration | e.g. ships / digital / pickup-only |
Reading the catalog
A storefront lists products by category with the standard filter parameters (see Parameters):
?where[category]=42&where[inStock]=true&sort=price:asc&limit=24Testing a product page
Product description copy is one of the highest-leverage things to test on a storefront. Duplicate a product entry, rewrite its description field, then run the two as variants in Content Experiments with an even 50/50 split. Your product page requests the entry with ?experiment=1, renders whichever variant comes back, and fires a conversion when the visitor adds the item to their cart.
POST /public/v2/projects/:uuid/experiments/variants/:variantId/convertLocalized catalogs