1. Events

Order-related events

Version:

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. In general, you can capture order events using a single event or multiple events.

You can send order-related events by using the event function and passing it the correct event data object. Optionally, you can also include the extension data object.

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

Send a single event

If the site visitor (guest) is identified as a customer, you can capture all order-related data for the site visitor's order in a single ORDER_CHECKOUT event. If the site visitor is not a customer yet, you cannot use ORDER_CHECKOUT. In that case, first use the IDENTITY 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:

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 - to capture the product details when a site visitor adds a product to their cart.

  2. CONFIRM - to capture a list of products that are in the cart before the payment is made.

  3. One of the following:

    • CHECKOUT - to capture the site visitor's action of completing a purchase.

      • Optionally, after a CHECKOUT event, a PAYMENT - to capture the site visitor's payment method.

    • CLEAR_CART - 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.
Example 4. Sending an ADD event

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

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:

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:

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:

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:

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


If you have suggestions for improving this article, let us know!