Skip to main content
Users
CloudPortalLogin
  • Powered byPowered by
Developing with Sitecore CDP
Data privacy
Before you start sending data
Integrating with Sitecore CDP
Stream API
Batch API
REST APIs
Data lake export service
  • Sitecore CDP for developers
  • Stream API
  • Direct HTTP requests reference
  • Cart abandonment

Cart abandonment

You can track items added to an online cart using the ADD event. If items have been added to the cart, and the stream session closes without an order, then the stream session cartType is set to ABANDONED.

Sitecore Personalize enables you to configure an experience to re-engage with the guest and recover the contents of the abandoned cart, for example, to send the guest an email message with the cart contents. The guest must be identified in order for this to work.

The following steps result in an abandoned cart, which triggers an abandoned cart email message:

  1. A guest adds an item to their cart.

    An ADD event is sent to Sitecore CDP.

  2. The guest's session closes manually, by timing out, or by network latency.

    Sitecore CDP sets the stream session cartType to ABANDONED, then calculates the abandoned revenue.

  3. If configured, Sitecore Personalize sends a triggered experience.

The following steps result in a CLEAR_CART event being sent to Sitecore CDP:

  1. A guest adds an item to their cart.

    An ADD event is sent to Sitecore CDP.

  2. The guest removes the item or items from their cart.

    A CLEAR_CART event is sent to Sitecore CDP.

  3. The guest's session closes manually, by timing out, or by network latency.

    Sitecore CDP sets the stream session cartType to CLOSED.

    Sitecore Personalize does not send the triggered experience.

sidebar. Calculating abandoned revenue

In addition to setting the cartType to ABANDONED, Sitecore CDP also calculates an abandoned revenue value for reporting. This value represents the total amount of products that were added to the cart during the session but not purchased before the session ended.

Sitecore CDP builds the cart contents by replaying order-related events in the session, such as ADD, REMOVE, and CLEAR_CART. Only items still in the cart at session close contribute to abandoned revenue.

Here's how the line total is calculated for each ADD event:

RequestResponse
// `price` is the unit price
line total = product.quantity × product.price

The sum of all line totals at session close equals the session's abandoned revenue.

Cart items are keyed by product.item_id. If multiple ADD events in the same session reuse the same product.item_id, Sitecore CDP treats the later ADD as an update to that line. The latest quantity and price are used for abandoned revenue.

Tip

To track distinct products or variants, ensure each line has a unique product.item_id.

Here's an example of how 3 units of the same cart item contributes to abandoned revenue if the session ends without purchase:

RequestResponse
// User adds SKU-123 at 1 × 50.00
{ "type": "ADD", "product": { "item_id": "SKU-123", "quantity": 1, "price": 50.00 } }
// User changes quantity to 3
{ "type": "ADD", "product": { "item_id": "SKU-123", "quantity": 3, "price": 50.00 } }
// Session ends without purchase
// abandoned revenue contribution = 3 × 50.00 = 150.00
Note

Abandoned revenue is calculated at the end of each session. When the session closes after the configured timeout, Sitecore CDP sums the line totals for all items that remain in the cart and were not purchased in that session.

Do you have some feedback for us?

If you have suggestions for improving this article,

Privacy policySitecore Trust CenterCopyright © 1999-2026 Sitecore