ORDER_CHECKOUT event
To use the flight data model, assemble orders using multiple events instead of sending an ORDER_CHECKOUT event.
Before you can send an ORDER_CHECKOUT event, the guest must be identified as a customer. See IDENTITY event.
The event data object for an ORDER_CHECKOUT event must include all the required attributes for event data objects plus the following attribute:
Attribute |
Type |
Description |
Example |
---|---|---|---|
|
object |
The guest's purchase order. |
N/A |
The order
object:
Attribute |
Type |
Description |
Example |
Required/optional |
---|---|---|---|---|
|
string |
A unique ID generated by your organization to reference the order. |
|
Required |
|
ISO 8601 Date/Time UTC |
The date and time the order was made. |
|
Required |
|
string (uppercase) |
The status of the order. |
|
Required |
|
string (uppercase ISO 4217) |
The currency the guest used to complete a purchase. |
|
Required |
|
number (currency) |
The amount paid for the order. |
|
Required |
|
string (title case recommended) |
The method of payment for the order. |
|
Required |
|
string (title case recommended) |
The card type used to pay for the order. |
|
Required if |
|
array of objects |
A list of data extensions associated with the order. |
N/A |
Optional |
|
array of objects |
Items in the order. |
N/A |
Optional |
The order.extensions
array of objects. All attributes are optional.
Attribute |
Type |
Description |
Example |
---|---|---|---|
|
string enum |
Set this to |
|
|
string enum |
Set this to |
|
attribute |
This is a custom attribute of your choice. Supported types for the value:
|
One or many key-value pairs attributes for custom data. |
|
The order.orderItems
array of objects. All attributes are optional.
Attribute |
Type |
Description |
Example |
---|---|---|---|
|
string (uppercase) |
The type of order item. The accepted values must be predefined for your organization in the schema. The following values are not supported:
|
|
|
string |
An ID generated by the client to reference the order item. |
|
|
string (ISO 8601) |
The date and time the order item was made. |
|
|
string enum |
The status of the order item. |
|
|
string (uppercase ISO 4217) |
The organization’s currency code for the order item. |
|
|
number (currency) |
The organization’s price for the order item. |
|
|
string (title case recommended) |
The name of the order item. A free text value for the name of the order item. Max limit: 128 |
|
|
string |
The ID of the product code. |
|
|
number |
The number or quantity of the order item. |
|
|
array of objects |
A list of data extensions associated with the order item. Only one data extension is supported. You can request this feature from your Sitecore representative. |
N/A |
The order.orderItems.extensions
array of objects. All attributes are optional.
Attribute |
Type |
Description |
Example |
---|---|---|---|
|
string enum |
Set this to |
|
|
string enum |
Set this to |
|
attribute |
This is a custom attribute of your choice. Supported types for the value:
|
One or many key-value pairs attributes for custom data. |
|
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()
function.
const eventData = {
channel: "WEB",
currency: "EUR",
pointOfSale: "myretailsite/ireland",
language: "EN",
page: "checkout page",
order: {
referenceId: "B94TXY-1",
orderedAt: "2024-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: "2024-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: "Gold",
insurance: false,
},
],
},
],
},
}