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 Name | Field Type | Description |
|---|---|---|
| order | Order Attribute | Required. A single order attribute value. |
1PurchaseOrderEvent(
2 order: Order(
3 id: "order-1",
4 totalValue: 9.99,
5 currency: "USD",
6 attributes: [
7 "PROMO_CODE": "HELLO"
8 ],
9 lineItems: [
10 LineItem(
11 catalogObjectType: "Product",
12 catalogObjectId: "product-11",
13 quantity: 1,
14 price: 20,
15 currency: "USD",
16 attributes: [
17 "gift_wrap": true
18 ]
19 )
20 ]
21 )
22)1OrderEvent.purchase(
2 order = Order(
3 id = "order-1",
4 totalValue = 9.99,
5 currency = "USD",
6 attributes = mapOf(
7 "PROMO_CODE" to "HELLO"
8 ),
9 lineItems = listOf(
10 LineItem(
11 catalogObjectId = "product-1",
12 catalogObjectType = "Product",
13 quantity = 1,
14 price = 20.0,
15 currency = "USD",
16 attributes = mapOf(
17 "gift_wrap" to true
18 )
19 )
20 )
21 )
22)Preorder Order Example
| Field Name | Field Type | Description |
|---|---|---|
| order | Order Attribute | Required. A single order attribute value. |
1PreOrderEvent(
2 order: Order(
3 id: "order-1",
4 totalValue: 9.99,
5 currency: "USD",
6 attributes: [
7 "PROMO_CODE": "HELLO"
8 ],
9 lineItems: [
10 LineItem(
11 catalogObjectType: "Product",
12 catalogObjectId: "product-11",
13 quantity: 1,
14 price: 20,
15 currency: "USD",
16 attributes: [
17 "gift_wrap": true
18 ]
19 )
20 ]
21 )
22)1OrderEvent.preorder(
2 order = Order(
3 id = "order-1",
4 totalValue = 9.99,
5 currency = "USD",
6 attributes = mapOf(
7 "PROMO_CODE" to "HELLO"
8 ),
9 lineItems = listOf(
10 LineItem(
11 catalogObjectId = "product-1",
12 catalogObjectType = "Product",
13 quantity = 1,
14 price = 20.0,
15 currency = "USD",
16 attributes = mapOf(
17 "gift_wrap" to true
18 )
19 )
20 )
21 )
22)Cancel Order Example
| Field Name | Field Type | Description |
|---|---|---|
| order | Order Attribute | Required. A single order attribute value. |
1CancelOrderEvent(
2 order: Order(
3 id: "order-1",
4 totalValue: 9.99,
5 currency: "USD",
6 attributes: [
7 "PROMO_CODE": "HELLO"
8 ],
9 lineItems: [
10 LineItem(
11 catalogObjectType: "Product",
12 catalogObjectId: "product-11",
13 quantity: 1,
14 price: 20,
15 currency: "USD",
16 attributes: [
17 "gift_wrap": true
18 ]
19 )
20 ]
21 )
22)1OrderEvent.cancel(
2 order = Order(
3 id = "order-1",
4 totalValue = 9.99,
5 currency = "USD",
6 attributes = mapOf(
7 "PROMO_CODE" to "HELLO"
8 ),
9 lineItems = listOf(
10 LineItem(
11 catalogObjectId = "product-1",
12 catalogObjectType = "Product",
13 quantity = 1,
14 price = 20.0,
15 currency = "USD",
16 attributes = mapOf(
17 "gift_wrap" to true
18 )
19 )
20 )
21 )
22)Ship Order Example
| Field Name | Field Type | Description |
|---|---|---|
| order | Order Attribute | Required. A single order attribute value. |
1ShipOrderEvent(
2 order: Order(
3 id: "order-1",
4 totalValue: 9.99,
5 currency: "USD",
6 attributes: [
7 "PROMO_CODE": "HELLO"
8 ],
9 lineItems: [
10 LineItem(
11 catalogObjectType: "Product",
12 catalogObjectId: "product-11",
13 quantity: 1,
14 price: 20,
15 currency: "USD",
16 attributes: [
17 "gift_wrap": true
18 ]
19 )
20 ]
21 )
22)1OrderEvent.ship(
2 order = Order(
3 id = "order-1",
4 totalValue = 9.99,
5 currency = "USD",
6 attributes = mapOf(
7 "PROMO_CODE" to "HELLO"
8 ),
9 lineItems = listOf(
10 LineItem(
11 catalogObjectId = "product-1",
12 catalogObjectType = "Product",
13 quantity = 1,
14 price = 20.0,
15 currency = "USD",
16 attributes = mapOf(
17 "gift_wrap" to true
18 )
19 )
20 )
21 )
22)Deliver Order Example
| Field Name | Field Type | Description |
|---|---|---|
| order | Order Attribute | Required. A single order attribute value. |
1DeliverOrderEvent(
2 order: Order(
3 id: "order-1",
4 totalValue: 9.99,
5 currency: "USD",
6 attributes: [
7 "PROMO_CODE": "HELLO"
8 ],
9 lineItems: [
10 LineItem(
11 catalogObjectType: "Product",
12 catalogObjectId: "product-11",
13 quantity: 1,
14 price: 20,
15 currency: "USD",
16 attributes: [
17 "gift_wrap": true
18 ]
19 )
20 ]
21 )
22)1OrderEvent.deliver(
2 order = Order(
3 id = "order-1",
4 totalValue = 9.99,
5 currency = "USD",
6 attributes = mapOf(
7 "PROMO_CODE" to "HELLO"
8 ),
9 lineItems = listOf(
10 LineItem(
11 catalogObjectId = "product-1",
12 catalogObjectType = "Product",
13 quantity = 1,
14 price = 20.0,
15 currency = "USD",
16 attributes = mapOf(
17 "gift_wrap" to true
18 )
19 )
20 )
21 )
22)Return Order Example
| Field Name | Field Type | Description |
|---|---|---|
| order | Order Attribute | Required. A single order attribute value. |
1ReturnOrderEvent(
2 order: Order(
3 id: "order-1",
4 totalValue: 9.99,
5 currency: "USD",
6 attributes: [
7 "PROMO_CODE": "HELLO"
8 ],
9 lineItems: [
10 LineItem(
11 catalogObjectType: "Product",
12 catalogObjectId: "product-11",
13 quantity: 1,
14 price: 20,
15 currency: "USD",
16 attributes: [
17 "gift_wrap": true
18 ]
19 )
20 ]
21 )
22)1OrderEvent.returnOrder(
2 order = Order(
3 id = "order-1",
4 totalValue = 9.99,
5 currency = "USD",
6 attributes = mapOf(
7 "PROMO_CODE" to "HELLO"
8 ),
9 lineItems = listOf(
10 LineItem(
11 catalogObjectId = "product-1",
12 catalogObjectType = "Product",
13 quantity = 1,
14 price = 20.0,
15 currency = "USD",
16 attributes = mapOf(
17 "gift_wrap" to true
18 )
19 )
20 )
21 )
22)Exchange Order Example
| Field Name | Field Type | Description |
|---|---|---|
| order | Order Attribute | Required. A single order attribute value. |
1ExchangeOrderEvent(
2 order: Order(
3 id: "order-1",
4 totalValue: 9.99,
5 currency: "USD",
6 attributes: [
7 "PROMO_CODE": "HELLO"
8 ],
9 lineItems: [
10 LineItem(
11 catalogObjectType: "Product",
12 catalogObjectId: "product-11",
13 quantity: 1,
14 price: 20,
15 currency: "USD",
16 attributes: [
17 "gift_wrap": true
18 ]
19 )
20 ]
21 )
22)1OrderEvent.exchange(
2 order = Order(
3 id = "order-1",
4 totalValue = 9.99,
5 currency = "USD",
6 attributes = mapOf(
7 "PROMO_CODE" to "HELLO"
8 ),
9 lineItems = listOf(
10 LineItem(
11 catalogObjectId = "product-1",
12 catalogObjectType = "Product",
13 quantity = 1,
14 price = 20.0,
15 currency = "USD",
16 attributes = mapOf(
17 "gift_wrap" to true
18 )
19 )
20 )
21 )
22)