Send an ADD event to Sitecore CDP

Abstract

Provides the required attributes and a JSON example of how to send an ADD event to Sitecore CDP (Data model 2.1).

The ADD event captures the product details when a user adds the product(s) to their online cart.

To send an ADD event, use the following required attributes:

Attribute

Description

Type

Example(s)

Required/optional

channel

The channel captured on each page the guest visited.

string

WEB", "MOBILE_WEB", "MOBILE_APP"

Required

type

The type of event.

string (uppercase)

"ADD"

Required

language

The language captured on each page the guest visited.

string (2 letter ISO 639 language code)

"EN", "FR", "DE"

Required

currency

The type of currency.

string (3 letter ISO 4217)

"EUR", "USD", "GBP"

Required

page

The name of the webpage the guest visited.

string

"home page", "search page" "/home", "/confirm"

Required

pos

The point of sale (storefront) captured on each page the guest visited.

string (predefined by client)

"myretailsite.com", "retailsite.co.uk"

Required

browser_id

The ID of a browser generated by Sitecore CDP.

string (UUID)

"56860bff-94ba-4d84-aa37-2b5a83d5411b"

Required

product

The JSON object that contains the product entity data.

JSON object

N/A

Required

product.type

The type of product added to cart.

string (uppercase)

"BET"

Required

product.item_id

The item id of the product added to cart. Used in Extract, Transform, Load (ETL) data integration to create the order.

string

"EXACT_90"

Required

product.name

The name of the product added to the cart.

string (suggest titlecase)

"Exact score after 90 minutes"

Required

product.orderedAt

The date and time the product was ordered.

string ISO 8601

"2015-08-23T16:17:16.000Z"

Required

product.quantity

The number of unit added. Total price of the product is calculated by unit price multiplied by quantity.

number

1

Required

product.price

The unit price of the product. Total price of the product is calculated by unit price multiplied by quantity.

number (currency)

100.00

Required

product.productId

The product ID of the product added. Used in analytics for reporting.

string

"CORRECT_SCORE"

Required

product.currency

The currency of the product added to the cart.

string (3 letter ISO 4217)

"EUR"

Required

product.originalPrice

The unit price of the order item before conversion to the organization's currency.

number (currency)

100.00

Optional

product.originalCurrencyCode

The original currency code for the order item.

3 letter ISO 4217

"EUR"

Optional

product.referenceId

An ID generated by your organization to reference the order item.

string

"BET_001-1"

Required

The following JSON example demonstrates how to send an ADD event.

{
   "channel":"WEB",
   "type":"ADD",
   "language":"EN",
   "currency":"EUR",
   "page":"races",
   "pos":"myretailsite.com",
   "browser_id":"56860bff-94ba-4d84-aa37-2b5a83d5411b",
   "product":{
      "type":"BET",
      "item_id":"EXACT_90",
      "name":"Exact score after 90 minutes",
      "orderedAt":"2015-08-23T16:17:16.000Z",
      "quantity":1,
      "price":100.00,
      "productId":"CORRECT_SCORE",
      "currency":"EUR",
      "originalPrice":100.00,
      "originalCurrencyCode":"EUR",
      "referenceId":"BET_001-1"
   }
}