Order Event

An order event interaction is an ecommerce event that captures actions performed by a customer to manage new, in progress, or completed orders.

Purchase Order Example 

Field NameField TypeDescription
orderOrder AttributeRequired. A single order attribute value.

iOS

PurchaseOrderEvent(
    order: Order(
        id: "order-1",
        totalValue: 9.99,
        currency: "USD",
        attributes: [
            "PROMO_CODE": "HELLO"
        ],
        lineItems: [
            LineItem(
                catalogObjectType: "Product",
                catalogObjectId: "product-11",
                quantity: 1,
                price: 20,
                currency: "USD",
                attributes: [
                    "gift_wrap": true
                ]
            )
        ]
    )
)

Android

OrderEvent.purchase(
    order = Order(
        id = "order-1",
        totalValue = 9.99,
        currency = "USD",
        attributes = mapOf(
            "PROMO_CODE" to "HELLO"
        ),
        lineItems = listOf(
            LineItem(
                catalogObjectId = "product-1",
                catalogObjectType = "Product",
                quantity = 1,
                price = 20.0,
                currency = "USD",
                attributes = mapOf(
                    "gift_wrap" to true
                )
            )
        )
    )
)

Preorder Order Example 

Field NameField TypeDescription
orderOrder AttributeRequired. A single order attribute value.

iOS

PreOrderEvent(
    order: Order(
        id: "order-1",
        totalValue: 9.99,
        currency: "USD",
        attributes: [
            "PROMO_CODE": "HELLO"
        ],
        lineItems: [
            LineItem(
                catalogObjectType: "Product",
                catalogObjectId: "product-11",
                quantity: 1,
                price: 20,
                currency: "USD",
                attributes: [
                    "gift_wrap": true
                ]
            )
        ]
    )
)

Android

OrderEvent.preorder(
    order = Order(
        id = "order-1",
        totalValue = 9.99,
        currency = "USD",
        attributes = mapOf(
            "PROMO_CODE" to "HELLO"
        ),
        lineItems = listOf(
            LineItem(
                catalogObjectId = "product-1",
                catalogObjectType = "Product",
                quantity = 1,
                price = 20.0,
                currency = "USD",
                attributes = mapOf(
                    "gift_wrap" to true
                )
            )
        )
    )
)

Cancel Order Example 

Field NameField TypeDescription
orderOrder AttributeRequired. A single order attribute value.

iOS

CancelOrderEvent(
    order: Order(
        id: "order-1",
        totalValue: 9.99,
        currency: "USD",
        attributes: [
            "PROMO_CODE": "HELLO"
        ],
        lineItems: [
            LineItem(
                catalogObjectType: "Product",
                catalogObjectId: "product-11",
                quantity: 1,
                price: 20,
                currency: "USD",
                attributes: [
                    "gift_wrap": true
                ]
            )
        ]
    )
)

Android

OrderEvent.cancel(
    order = Order(
        id = "order-1",
        totalValue = 9.99,
        currency = "USD",
        attributes = mapOf(
            "PROMO_CODE" to "HELLO"
        ),
        lineItems = listOf(
            LineItem(
                catalogObjectId = "product-1",
                catalogObjectType = "Product",
                quantity = 1,
                price = 20.0,
                currency = "USD",
                attributes = mapOf(
                    "gift_wrap" to true
                )
            )
        )
    )
)

Ship Order Example 

Field NameField TypeDescription
orderOrder AttributeRequired. A single order attribute value.

iOS

ShipOrderEvent(
    order: Order(
        id: "order-1",
        totalValue: 9.99,
        currency: "USD",
        attributes: [
            "PROMO_CODE": "HELLO"
        ],
        lineItems: [
            LineItem(
                catalogObjectType: "Product",
                catalogObjectId: "product-11",
                quantity: 1,
                price: 20,
                currency: "USD",
                attributes: [
                    "gift_wrap": true
                ]
            )
        ]
    )
)

Android

OrderEvent.ship(
    order = Order(
        id = "order-1",
        totalValue = 9.99,
        currency = "USD",
        attributes = mapOf(
            "PROMO_CODE" to "HELLO"
        ),
        lineItems = listOf(
            LineItem(
                catalogObjectId = "product-1",
                catalogObjectType = "Product",
                quantity = 1,
                price = 20.0,
                currency = "USD",
                attributes = mapOf(
                    "gift_wrap" to true
                )
            )
        )
    )
)

Deliver Order Example 

Field NameField TypeDescription
orderOrder AttributeRequired. A single order attribute value.

iOS

DeliverOrderEvent(
    order: Order(
        id: "order-1",
        totalValue: 9.99,
        currency: "USD",
        attributes: [
            "PROMO_CODE": "HELLO"
        ],
        lineItems: [
            LineItem(
                catalogObjectType: "Product",
                catalogObjectId: "product-11",
                quantity: 1,
                price: 20,
                currency: "USD",
                attributes: [
                    "gift_wrap": true
                ]
            )
        ]
    )
)

Android

OrderEvent.deliver(
    order = Order(
        id = "order-1",
        totalValue = 9.99,
        currency = "USD",
        attributes = mapOf(
            "PROMO_CODE" to "HELLO"
        ),
        lineItems = listOf(
            LineItem(
                catalogObjectId = "product-1",
                catalogObjectType = "Product",
                quantity = 1,
                price = 20.0,
                currency = "USD",
                attributes = mapOf(
                    "gift_wrap" to true
                )
            )
        )
    )
)

Return Order Example 

Field NameField TypeDescription
orderOrder AttributeRequired. A single order attribute value.

iOS

ReturnOrderEvent(
    order: Order(
        id: "order-1",
        totalValue: 9.99,
        currency: "USD",
        attributes: [
            "PROMO_CODE": "HELLO"
        ],
        lineItems: [
            LineItem(
                catalogObjectType: "Product",
                catalogObjectId: "product-11",
                quantity: 1,
                price: 20,
                currency: "USD",
                attributes: [
                    "gift_wrap": true
                ]
            )
        ]
    )
)

Android

OrderEvent.returnOrder(
    order = Order(
        id = "order-1",
        totalValue = 9.99,
        currency = "USD",
        attributes = mapOf(
            "PROMO_CODE" to "HELLO"
        ),
        lineItems = listOf(
            LineItem(
                catalogObjectId = "product-1",
                catalogObjectType = "Product",
                quantity = 1,
                price = 20.0,
                currency = "USD",
                attributes = mapOf(
                    "gift_wrap" to true
                )
            )
        )
    )
)

Exchange Order Example 

Field NameField TypeDescription
orderOrder AttributeRequired. A single order attribute value.

iOS

ExchangeOrderEvent(
    order: Order(
        id: "order-1",
        totalValue: 9.99,
        currency: "USD",
        attributes: [
            "PROMO_CODE": "HELLO"
        ],
        lineItems: [
            LineItem(
                catalogObjectType: "Product",
                catalogObjectId: "product-11",
                quantity: 1,
                price: 20,
                currency: "USD",
                attributes: [
                    "gift_wrap": true
                ]
            )
        ]
    )
)

Android

OrderEvent.exchange(
    order = Order(
        id = "order-1",
        totalValue = 9.99,
        currency = "USD",
        attributes = mapOf(
            "PROMO_CODE" to "HELLO"
        ),
        lineItems = listOf(
            LineItem(
                catalogObjectId = "product-1",
                catalogObjectType = "Product",
                quantity = 1,
                price = 20.0,
                currency = "USD",
                attributes = mapOf(
                    "gift_wrap" to true
                )
            )
        )
    )
)