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. 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 (guestguest) 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.
Here's an example event data object for an ORDER_CHECKOUT event:
Send multiple events
You can assemble an order using multiple events. You must send the events in the following sequence:
-
ADD- to capture the product details when a site visitor adds a product to their cart. -
CONFIRM- to capture a list of products that are in the cart before the payment is made. -
One of the following:
-
CHECKOUT- to capture the site visitor's action of completing a purchase.-
Optionally, after a
CHECKOUTevent, aPAYMENT- to capture the site visitor's payment method.
-
-
CLEAR_CART- to capture the site visitor's action of emptying their cart.
-
Here's an example event data object for an ADD event:
Here's an example event data object for a CONFIRM event:
Here's an example event data object for a CHECKOUT event:
Here's an example event data object for a PAYMENT event:
Here's an example event data object for a CLEAR_CART event: