Skip to main content
Sitecore Documentation
  • Learn
  • Downloads
  • Changelog
  • Roadmap
PersonalizeCloud Portal
Sitecore Personalize developer documentation
  • Developing with Sitecore Personalize
            • Settings object
                • VIEW event
                • IDENTITY event
                • ORDER_CHECKOUT event
                • ADD event
                • CONFIRM event
                • CHECKOUT event
                • PAYMENT event
                • CLEAR_CART event
                • SEARCH event
                • Custom event
            • Extension data object
            • Personalization data object
        • Troubleshooting
        • Release notes
  1. Event data object
  1. Sitecore Personalize developer documentation
  2. Stream API

ADD event

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

AttributeTypeDescriptionExample
productobjectData about the product that the user adds to the cart.N/A

The product object:

AttributeTypeDescriptionExampleRequired/optional
namestring (title case recommended)The name of the product that the user added to the cart."GHT 84 Lace Sneaker"Required
typestring (uppercase)The type of product that the user added to the cart."FOOTWEAR"Required
item_idstringThe 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
productIdstringThe ID of the product that the user added to the cart.

Used in Analytics for reporting.
"example_product_id"Required
referenceIdstringAn ID generated by your organization to reference the order item."FOOTWEAR-001-01"Required
orderedAtstring (ISO 8601)

Format: YYYY-MM-DD’T’hh:mm:ss.<timezone>
The date and time the user added the product to the cart."2026-04-15T12:42
.001Z"
Required
quantityintegerThe number of units of the product that the user added to the cart.

Total price = quantity × price
1Required
pricefloatThe unit price of the product.

Total price = quantity × price
7.99Required
currencystring (uppercase ISO 4217)The alphabetic currency code of the currency that the product price is specified in.
  • "EUR"
  • "GBP"
  • "USD"
Required
originalPricefloatThe unit price of the order item before conversion to the organization's currency.7.79Optional
originalCurrencyCodestring (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()](engage-event.md "Engage.event(type, eventData[, extensionData])") function.

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

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: "2026-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.

// 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" }
    ]
}
If you have suggestions for improving this article, let us know!

Documentation Assistant

This assistant uses AI to generate responses based on Sitecore documentation. While it has access to official sources, answers may be incomplete or inaccurate and should not be considered official advice or support.
Powered by
k
kapa.ai
Protected by reCAPTCHA

© Copyright 2026, Sitecore A/S or a Sitecore affiliated company.
All rights reserved.

Privacy policySitecore Trust CenterTerms of use