Skip to main content
Users
CloudPortalLogin
  • Powered byPowered by
Developing with Sitecore Personalize
Data privacy
Before you start sending data
Integrating with Sitecore Personalize
Stream API
Personalize API Flow execution
REST APIs
  • Sitecore Personalize for developers
  • Stream API
  • Sitecore Engage SDK reference
  • Objects
  • Event data object
  • ADD event

ADD event

The event data object for an ADD event must include all the required attributes for event data objects plus the following attribute:

Attribute

Type

Description

Example

product

object

Data about the product that the user adds to the cart.

N/A

The product object:

Attribute

Type

Description

Example

Required/optional

name

string (title case recommended)

The name of the product that the user added to the cart.

"GHT 84 Lace Sneaker"

Required

type

string (uppercase)

The type of product that the user added to the cart.

"FOOTWEAR"

Required

item_id

string

The item ID of the product that the user added to the cart.

Used in Extract, Transform, Load (ETL) data integration to create the order.

You must pass this string into an object in the product array of the CONFIRM event for the order to be successfully created.

"SHOES_8475GHT"

Required

productId

string

The ID of the product that the user added to the cart.

Used in Analytics for reporting.

"example_product_id"

Required

referenceId

string

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

"FOOTWEAR-001-01"

Required

orderedAt

string (ISO 8601)

Format: YYYY-MM-DD’T’hh:mm:ss.<timezone>

The date and time the user added the product to the cart.

"2025-04-15T12:42:16.001Z"

Required

quantity

integer

The number of units of the product that the user added to the cart.

Total price = quantity × price

1

Required

price

float

The unit price of the product.

Total price = quantity × price

7.99

Required

currency

string (uppercase ISO 4217)

The alphabetic currency code of the currency that the product price is specified in.

  • "EUR"

  • "GBP"

  • "USD"

Required

originalPrice

float

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

7.79

Optional

originalCurrencyCode

string (uppercase ISO 4217)

The original currency code for the order item.

  • "EUR"

  • "GBP"

  • "USD"

Optional

After you create this event data object, you can optionally extend this event using the extension data object. Then, you can send the event using the Engage.event() function.

Here's an example of the event data object for an ADD event.

RequestResponse
const eventData = {
    channel: "WEB",
    currency: "EUR",
    pointOfSale: "myretailsite/ireland",
    language: "EN",
    page: "products",
    product: {
        name: "GHT 84 Lace Sneaker",
        type: "FOOTWEAR",
        item_id: "SHOES_8475GHT",
        productId: "example_product_id",
        referenceId: "FOOTWEAR-001-01",
        orderedAt: "2025-04-15T12:42:16.001Z",
        quantity: 1,
        price: 7.99,
        currency: "EUR",
        originalPrice: 7.79,
        originalCurrencyCode: "USD"
    }
}
Example 25. Product item IDs in ADD and in CONFIRM events

Here's an example of how multiple product item IDs are linked in ADD and in CONFIRM event data objects.

For each item ID included in an object in the product array of the CONFIRM event data object, there must be a preceding ADD event data object where the product item ID is specified in product.item_id.

RequestResponse
// ADD event data object for "SHOES_8475GHT"
const addEventData = {
    // ...
    product: {
        // ...
        item_id: "SHOES_8475GHT"
    }
}

// ADD event data object for "JEANS_W33L31"
const addEventData = {
    // ...
    product: {
        // ...
        item_id: "JEANS_W33L31"
    }
}

// CONFIRM event data object listing all product item IDs
const confirmEventData = {
    // ...
    product: [
        { item_id: "SHOES_8475GHT" },
        { item_id: "JEANS_W33L31" }
    ]
}


Do you have some feedback for us?

If you have suggestions for improving this article,

Privacy policySitecore Trust CenterCopyright © 1999-2025 Sitecore