The request
RecommendationSurface
required
pdp, cart (right after adding to the cart), carousel (the cart page), checkout, in-checkout or success-page.string
required
A label you define to know where the request came from. It’s for your own traceability; it doesn’t change the recommendation.
string
The starting product. Required in , and, without a cart, in .
CartItem[]
{ item_id, variant_id, quantity } per line. Omitted is the same as empty. Required in the cart moments.Visitor | false
A visitor for this request only, or
false to not send one. By default, the instance’s.isShooterSurface(surface) tells you whether the moment starts from a product.
What comes back
The recommendation comes back (in the API,Decision: the list of products recommended for that moment).
product carries the item, categories, variants with prices and availability:
enough to display it. If it couldn’t be read, it’s missing and that result is
skipped. There is no score: the order is the ranking.
Read the catalog
For a result withoutproduct, or a product outside the recommendation:
sellable is text and a missing quantity isn’t
zero: Read a catalog item.
Report signals
What comes after displaying the recommendation.
The six moments
What each moment’s request needs.