---
title: "Order-related events"
slug: "order-related-events"
abstract: "Understand order-related events, which are used to send orders to Sitecore CDP in real time."
---
# Order-related events

Order-related events capture when, for example, the site visitor adds a product to their shopping cart, makes a purchase, or empties their shopping cart.

How you track these events depends on [your Sitecore CDP instance and the type of the purchase](https://doc.sitecore.com/personalize/en/developers/api/en/sending-orders.html). In general, you can capture order events using a single event or multiple events.

You can send order-related events by using the [`event`](https://doc.sitecore.com/sdk/en/developers/005/cloud-sdk/cloud-sdk-reference/cloud-sdk-events/cloud-sdk-events-browser/functions/cloud-sdk-events-browser-event.html "event") function and passing it the correct event data object. Optionally, you can also include the [extension data object](https://doc.sitecore.com/sdk/en/developers/005/cloud-sdk/cloud-sdk-concepts/concepts-tracking/events.html#UUID-b78ff86e-4442-71e7-edc6-81adf8fabe27_section-idm234411833561624 "Data provided by you").

For every event, you'll pass the data object to the `event` function in the following way:

::::tabs
:::tab{title="Browser module"}

```typescript
// ...
event(eventData);
// ...
```

:::
:::tab{title="Server module"}

```typescript
// ...
await event(request, eventData);
// ...
```

:::
::::

## Send a single event

If the site visitor (guest[^UUID-101b62f6-b640-ed11-1057-29646ebb9fb7_N66588956cee31]) is identified as a customer, you can capture all order-related data for the site visitor's order in a single [`ORDER_CHECKOUT`](https://doc.sitecore.com/personalize/en/developers/api/en/order_checkout-event.html) event. If the site visitor is not a customer yet, you cannot use `ORDER_CHECKOUT`. In that case, first use the [`IDENTITY`](https://doc.sitecore.com/sdk/en/developers/005/cloud-sdk/cloud-sdk-concepts/concepts-tracking/events/identity-events.html "IDENTITY events") event to resolve the identity of the site visitor.

Example 3. Sending an ORDER_CHECKOUT event

Here's an example event data object for an `ORDER_CHECKOUT` event:

```typescript
const eventData: any = {
  type: "ORDER_CHECKOUT",
  channel: "WEB",
  currency: "EUR",
  pointOfSale: "myretailsite/ireland",
  language: "EN",
  page: "checkout page",
  order: {
    referenceId: "B94TXY-1",
    orderedAt: "2026-08-23T16:`17:16`.000Z",
    status: "PURCHASED",
    currencyCode: "EUR",
    price: 200,
    paymentType: "Card",
    cardType: "Visa",
    extensions: [
      {
        name: "ext",
        key: "default",
        refundable: true,
      },
    ],
    orderItems: [
      {
        type: "MOBILE_PHONE",
        referenceId: "B94TXY-1",
        orderedAt: "2026-08-23T16:`17:16`.000Z",
        status: "PURCHASED",
        currencyCode: "EUR",
        price: 200,
        name: "Mobile phone of type x",
        productId: "MOBILE_PHONE_TYPE_X",
        quantity: 1,
        extensions: [
          {
            name: "ext",
            key: "default",
            phoneColor: "Obsidian",
            insurance: false,
          },
        ],
      },
    ],
  },
  extensionData: { customKey: "customValue" }
}
```

## Send multiple events

You can assemble an order using multiple events. You must send the events in the following sequence:

1. [`ADD`](https://doc.sitecore.com/personalize/en/developers/api/en/add-event.html) - to capture the product details when a site visitor adds a product to their cart.
2. [`CONFIRM`](https://doc.sitecore.com/personalize/en/developers/api/en/confirm-event.html) - to capture a list of products that are in the cart before the payment is made.
3. One of the following:
    - [`CHECKOUT`](https://doc.sitecore.com/personalize/en/developers/api/en/checkout-event.html) - to capture the site visitor's action of completing a purchase.
        - Optionally, after a `CHECKOUT` event, a [`PAYMENT`](https://doc.sitecore.com/personalize/en/developers/api/en/payment-event.html) - to capture the site visitor's payment method.
    - [`CLEAR_CART`](https://doc.sitecore.com/personalize/en/developers/api/en/clear_cart-event.html) - to capture the site visitor's action of emptying their cart.

![A diagram showing the sequence of events as a site visitor makes an order.](https://doc.sitecore.com/api/markdown-image/sdk/en/developers/005/cloud-sdk/images/mermaid-diagram-2024-12-13-092959.svg)

Example 4. Sending an ADD event

Here's an example event data object for an `ADD` event:

```typescript
const eventData: any = {
  type: "ADD",
  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"
  },
  extensionData: { customKey: "customValue" }
}
```

Example 5. Sending a CONFIRM event

Here's an example event data object for a `CONFIRM` event:

```typescript
const eventData: any = {
  type: "CONFIRM",
  channel: "WEB",
  currency: "EUR",
  pointOfSale: "myretailsite/ireland",
  language: "EN",
  page: "checkout",
  product: [
    { item_id: "SHOES_8475GHT" }
  ],
  extensionData: { customKey: "customValue" }
}
```

Example 6. Sending a CHECKOUT event

Here's an example event data object for a `CHECKOUT` event:

```typescript
const eventData: any = {
  type: "CHECKOUT",
  channel: "WEB",
  currency: "EUR",
  pointOfSale: "myretailsite/ireland",
  language: "EN",
  page: "home",
  reference_id: "MA-490094",
  status: "PURCHASED",
  extensionData: { customKey: "customValue" }
}
```

Example 7. Sending a PAYMENT event

Here's an example event data object for a `PAYMENT` event:

```typescript
const eventData: any = {
  type: "PAYMENT",
  channel: "WEB",
  currency: "EUR",
  pointOfSale: "myretailsite/ireland",
  language: "EN",
  page: "home",
  paymentType: "voucher",
  extensionData: { customKey: "customValue" }
}
```

Example 8. Sending a CLEAR_CART event

Here's an example event data object for a `CLEAR_CART` event:

```typescript
const eventData: any = {
  type: "CLEAR_CART",
  channel: "WEB",
  currency: "EUR",
  pointOfSale: "myretailsite/ireland",
  language: "EN",
  page: "home",
  extensionData: { customKey: "customValue" }
}
```

[^UUID-101b62f6-b640-ed11-1057-29646ebb9fb7_N66588956cee31]: A site visitor, also known as a user of your app. Site visitors are called guests in Sitecore CDP. That's why Cloud SDK developers encounter the term *guest* when they use the [`events`](https://doc.sitecore.com/sdk/en/developers/005/cloud-sdk/cloud-sdk-reference/cloud-sdk-events.html "@sitecore-cloudsdk/events") package, and when they log in to Sitecore CDP to [find captured events](https://doc.sitecore.com/sdk/en/developers/005/cloud-sdk/cloud-sdk-concepts/concepts-tracking/working-with-the-collected-data.html "Working with the collected data").
