Order Attribute

An order attribute is contained within the event structure of Order Event and mapped in accordance with the order schema.
Field Name Description
name
Field Type
string
Description

Required.

An event name described from the order event.
order.attributes
Field Type
object
Description
A dictionary of user-supplied values.
order.currency
Field Type
string
Description
The currency of the order’s total value.
order.id
Field Type
string
Description

Required.

A unique order ID.
order.lineItems
Field Type
Line Item Attribute
Description
An array of line item attribute values.
order.totalValue
Field Type
number
Description

Required.

The order’s total value.

Order Attribute Example

iOS
1Order(
2    id: "order-1",
3    totalValue: 9.99,
4    currency: "USD",
5    attributes: [
6        "PROMO_CODE": "HELLO"
7    ]
8    lineItems: [
9        LineItem(
10            catalogObjectType: "Product",
11            catalogObjectId: "product-1",
12            quantity: 1,
13            price: 20,
14            currency: "USD",
15            attributes: [
16                "gift_wrap": true,
17                "gift card": "Dearly Beloved"
18            ]
19        ),
20        LineItem(
21            catalogObjectType: "Product",
22            catalogObjectId: "product-2",
23            quantity: 2,
24            price: 5,
25            currency: "USD",
26            attributes: [
27                "gift_wrap": false
28            ]
29        )
30    ]
31)
Android
1Order(
2    id = "order-1",
3    totalValue = 30.00,
4    currency = "USD",
5    attributes = mapOf(
6        "PROMO_CODE" to "HELLO"
7    ),
8    lineItems = listOf(
9        LineItem(
10            catalogObjectId = "product-1",
11            catalogObjectType = "Product",
12            quantity = 1,
13            price = 20.00,
14            currency = "USD",
15            attributes = mapOf(
16                "gift_wrap" to true,
17                "gift card" to "Dearly Beloved"
18            )
19        ),
20        LineItem(
21            catalogObjectId = "product-2",
22            catalogObjectType = "Product",
23            quantity = 2,
24            price = 5.00,
25            currency = "USD",
26            attributes = mapOf(
27                "gift_wrap" to false
28            )
29        )
30    )
31    )