Append purchase history
Store transactional purchase history as you send contact data to us

Overview

Airship can store full purchase history for contact records.
This is useful to measure customer value and target recent or lapsed visitors based on their purchase history.

Storing purchase history

To store purchase history, simply append a purchases object to your contact as you send it to us.
1
"account_id": 3,
2
"email: "[email protected].com",
3
//...etc...
4
5
"purchases": [
6
{
7
"transaction_reference": "77FF-24FF-234F-77FF",
8
"unit_id": 8775,
9
"created_at": "2021-06-01 00:00:00",
10
"items": [
11
{
12
"description": "Negroni",
13
"sku": "abc_8913", // string SKU for this product
14
"quantity": 1, // qty of this item
15
"value": 7 // total value (quantity x item value) in decimal
16
},
17
{
18
"description": "Garlic Bread",
19
"sku": "5621",
20
"quantity": 2,
21
"value": 8.40
22
}
23
]
24
}
25
]
Copied!