Add to Cart

This document describes the Out-Of-The-Box (OOTB) Add To Cart event schema for use in your integrations. This event—together with the Remove From Cart event and the Empty Cart event—is necessary for cart-and-product abandonment use cases.

Event Key

Event KeyEvent NameType
ootb_add_to_cartAdd To CartSimple event

Event Structure

The mandatory properties (tenant, timestamp, event, and customer) are required for all events and documented in detail on the Mandatory Properties page

Below is the JSON structure for the context-specific properties of the Add To Cart event.

{
  "context": {
    "ootb_session_id": "248rhdbuw2her1",
    "ootb_userid": "ExampleUser1234",
    "ootb_eventdatetime": "2024-03-09T07:00:14.000Z",
    "ootb_product_id": "10Pencils1843",
    "ootb_variant_id": "10Pencils1843Coloured1234",
    "ootb_sku_id": "10Pencils1843Coloured1234-23iuhw",
    "ootb_brand": "Example Brand",
    "ootb_category": "C-P3nc1l",
    "ootb_department": "D-St4t10n4ry",
    "ootb_url": "https://www.example.com/product/10Pencils1843",
    "ootb_page_title": "Coloured Pencils",
    "ootb_page_category": "Pencils",
    "ootb_currency": "GBP",
    "ootb_item_name": "Coloured Pencils 10 pack.",
    "ootb_quantity": 2,
    "ootb_total_price": 30.00,
    "ootb_tax_amount": 2.00,
    "ootb_delivery_fee": 4.99,
    "ootb_fullfillment_type": "standard_delivery"
  }
}

Parameters

Parameter KeyParameter NameTypeDescription
ootb_session_idSession IDStringUser’s browser session identifier.
ootb_useridUser IDStringUnique key identifying the user.
ootb_eventdatetimeEvent Date TimeTimestampDate and time of the add to cart action.
ootb_product_idProduct IDStringUnique key for the product.
ootb_variant_idVariant IDStringKey identifying the variant of the product.
ootb_sku_idSKU IDStringKey identifying the SKU of the variant.
ootb_brandBrandStringBrand of the product.
ootb_categoryCategoryStringKey identifying the lowest level of product category.
ootb_departmentDepartmentStringKey identifying the department or highest-level category.
ootb_urlURLStringLink to the product-/variant-/SKU page.
ootb_page_titlePage TitleStringTitle of the page where the action occurred.
ootb_page_categoryPage CategoryStringCategory label of that page.
ootb_currencyCurrencyStringCurrency code (e.g., GBP).
ootb_item_nameItem NameStringName of the product/variant/SKU (lowest level).
ootb_quantityQuantityNumberQuantity of the item added to the cart.
ootb_total_priceTotal PriceNumberTotal price (quantity × unit price, after discounts and including tax).
ootb_tax_amountTax AmountNumberTax for this line (considering quantity).
ootb_delivery_feeDelivery FeeNumberDelivery or shipping fee.
ootb_fullfillment_typeFulfillment TypeEnumbopis or standard_delivery to indicate pickup vs delivery.

Explanation

  • event: Set to ootb_add_to_cart when an item is added to the cart.
  • context:
    • ootb_session_id, ootb_userid: Link the action to the user’s session and identity.
    • ootb_eventdatetime: Timestamp of the add to cart action.
    • Product identifiers (ootb_product_id, ootb_variant_id, ootb_sku_id, ootb_brand, ootb_category, ootb_department): Identify exactly what was added.
    • Page context (ootb_url, ootb_page_title, ootb_page_category): Where the action occurred.
    • Pricing & quantity (ootb_currency, ootb_item_name, ootb_quantity, ootb_total_price, ootb_tax_amount, ootb_delivery_fee): Capture the economic details of the line item being added.
    • ootb_fullfillment_type: Indicates “Buy Online, Pick Up In Store” (bopis) vs home delivery (standard_delivery) for the item.