younifyd
Menu

Record Add To Cart

Log that a shopper added one or more products to their cart — fire-and-forget

Use it in a workflow

  1. Add a step and choose the Recommendations connector.
  2. Pick the Record Add To Cart action (under database).
  3. Fill in the fields below, then reference the result from later steps as {{recordAddToCart.response.data}}.

Fields

itemsstringrequired

Every item added, as a JSON array of {itemKey, quantity, price, attributes}, or a comma-separated list of item keys — one item is still a one-entry list. attributes is a JSON object of facets for that item, e.g. {"category":"snowboards"}.

customerIdstring

Optional — leave empty for an anonymous visitor.

sessionIdstring

Optional — an anonymous visitor identifier, when there's no customer id yet.

Examples

One item

A single item still goes in as a one-entry list

json
{
  "items": "[{\"itemKey\":\"SNOWBOARD-POWDER\",\"quantity\":1}]"
}

Several items

Every item added in this request

json
{
  "items": "[{\"itemKey\":\"SNOWBOARD-POWDER\",\"quantity\":1,\"price\":499.99},{\"itemKey\":\"BINDING-STRAP\",\"quantity\":1}]"
}

Need more? See the Recommendations guide for connection setup and behaviour shared by every action.