See also: Customised data export
Order events data relates to the orders placed by your customers. Each exported record is one order, and includes the order totals, the customer who placed it, the delivery and billing addresses, the individual products in the order, and the Ometria campaign the order is attributed to (if any).
How to read this article
- You choose the fields. An order export contains only the fields you select when you set it up — not everything listed below.
-
Empty fields. A field with no data is exported as
nullin JSON, and as an empty cell in CSV. - Nested fields. Some fields are objects or lists rather than single values. lineitems is the only one whose individual sub-fields you can pick one by one; totals, shipping_address, billing_address, attribution, extra_identifiers, properties and variant_options are selected as a whole.
- Personal data. Fields marked as containing personal data can be anonymised or renamed when you configure the export, including individual line-item fields.
File formats
Order events can be exported as JSON or CSV.
[{'sku': 'SS14-059493-S5', 'quantity': 2}]). That text is not valid JSON and a standard JSON parser will reject it.JSON exports are written as newline-delimited JSON: one complete order object per line, rather than one array wrapping the whole file.
How often an order appears in your export
A scheduled order export includes every order that was created or changed during the run window — not only orders placed in that window.
This means an order you have already received can appear again in a later file. For example, an order placed in January and refunded in March is included in both the January file (as placed) and the March file (with the refund applied). Its timestamp does not change, because that is always the time the order was placed.
Backfills
You can backfill historical orders as far back as your account's data retention period allows. If your account has no retention limit, you can backfill your full order history. Your Customer Success Representative can tell you what applies to your account.
Order details
| Field | Type | Description |
| id | String |
Your unique identifier for the order, as sent to Ometria.
|
| timestamp | Date and time |
The date and time the order was placed. This does not change when the order is later updated.
|
| grand_total | Number |
The order value: the grand total after tax, shipping and discount.
|
| subtotal | Number |
The order subtotal, before tax, shipping and discount.
|
| discount | Number |
The total discount applied to the order.
|
| tax | Number |
The total tax applied to the order.
|
| shipping | Number |
The total shipping cost of the order.
|
| total_refunded | Number |
The total amount refunded against the order.
|
| total_unit_quantity | Number |
The total number of units in the order, across all line items.
|
| total_unit_quantity_refunded | Number |
The total number of units refunded from the order.
|
| currency | String |
The three-letter currency code recorded on the order. See also: Currency
|
| totals | Object |
The order amounts in both your account's standard currency (
|
| status | String |
The status of the order, as sent to Ometria.
|
| is_valid | Boolean |
Whether this order counts towards revenue reporting in Ometria. Cancelled and otherwise excluded orders are See also: Valid orders in Ometria
|
| channel | String |
The channel the order was placed through, for example online, instore or amazon.
|
| store | String |
The identifier of the store the order was placed in, as configured for your account.
|
| payment_method | String |
The payment method used for the order.
|
| shipping_method | String |
The shipping method used for the order.
|
| coupon_code | String |
The coupon code applied to the order, if any.
|
| web_id | String |
Your web or display identifier for the order, where this differs from id.
|
| ip_address | String |
The IP address the order was placed from. Contains personal data.
|
| properties | Object |
Custom key/value properties attached to the order.
|
| lineitems | List of objects | The individual products in the order. See Line items. |
Campaign attribution
These fields show which of your Ometria campaigns the order is attributed to, using Ometria's standard order attribution logic. They are empty when the order isn't attributed to a campaign. They come from Ometria's email attribution and are not part of the Ometria Order API.
See also: Email order attribution
| Field | Type | Description |
| campaign_name | String |
The title of the campaign the order is attributed to. Automation campaigns take precedence; broadcast campaigns are used otherwise.
|
| variant_name | String |
The name of the broadcast campaign variant the order is attributed to, where applicable.
|
Customer details
These fields describe the contact the order is linked to in Ometria. An order that could not be matched to a contact — for example a guest checkout with no usable identifier — exports these fields as null.
| Field | Type | Description |
| customer_id | String |
Your unique identifier for the customer who placed the order.
|
| String |
The email address of the customer who placed the order. Contains personal data.
|
|
| firstname | String |
The first name of the customer who placed the order. Contains personal data.
|
| lastname | String |
The last name of the customer who placed the order. Contains personal data.
|
| phone_number | String |
The phone number of the customer who placed the order. Contains personal data.
|
| profile_hash | String |
A secure hash uniquely identifying the contact in Ometria, sometimes called a profile ID. The same value identifies the contact in your contacts and email events exports, which makes it the field to join those exports on.
|
| ometria_profile_id | String |
Deprecated — use profile_hash instead. It holds the same value and will be removed in a future release.
|
| extra_identifiers | List of objects |
Additional identifiers configured for your account for this customer, such as a loyalty ID. Contains personal data. See also: Custom identifiers
|
Addresses
Both address fields are single objects containing the four sub-fields below. They are selected as a whole, not sub-field by sub-field. Both contain personal data.
| Field | Type | Description |
| shipping_address | Object |
The delivery address for the order.
|
| billing_address | Object |
The billing address for the order.
|
| Sub-field | Type | Description |
| city | String | The city or town. |
| state | String | The state or county. |
| postcode | String | The postcode or zip code. |
| country_code | String | The two letter country code (ISO 3166-1 alpha-2). |
Session and traffic attribution
attribution is a single object describing the browsing session the order came from. It is selected as a whole, not sub-field by sub-field. It is separate from Campaign attribution, which reports the Ometria campaign the order is credited to.
| Sub-field | Type | Description |
| session_id | String | The identifier of the browsing session the order was placed in. |
| utm_source | String | The utm_source value recorded for the session. |
| utm_medium | String | The utm_medium value recorded for the session. |
| utm_campaign | String | The utm_campaign value recorded for the session. |
| utm_content | String | The utm_content value recorded for the session. |
| utm_terms | String | The utm_term value recorded for the session. |
| device_type | String | The type of device the order was placed on. |
| referring_domain | String | The domain that referred the session. |
"attribution": {"session_id": "b2f1c9e0", "utm_source": "newsletter", "utm_medium": "email", "utm_campaign": "winter_sale", "utm_content": "hero_cta", "utm_terms": null, "device_type": "mobile", "referring_domain": "mail.google.com"}
Line items
Each order has a lineitems field: a list of the individual products in that order, with one entry per product. Unlike the other nested fields, you can select line-item fields individually — tick Line item to include them all, or pick only the ones you need.
| Field | Type | Description |
| product_id | String |
Your identifier for the product in this line item.
|
| variant_id | String |
Your identifier for the product variant, where applicable.
|
| sku | String |
The stock-keeping unit of the purchased product.
|
| quantity | Number |
The number of units of the product purchased.
|
| quantity_refunded | Number |
The number of units of the product that were refunded.
|
| unit_price | Number |
The price paid per unit of the product.
|
| subtotal | Number |
The line-item subtotal, before tax and discount.
|
| discount | Number |
The total discount applied to this line item.
|
| tax | Number |
The total tax applied to this line item.
|
| total | Number |
The line-item total, after tax and discount.
|
| refunded | Number |
The total amount refunded against this line item.
|
| currency | String |
The three-letter currency code for the line-item amounts.
|
| is_on_sale | Boolean |
Whether the product was on sale at the time of purchase.
|
| variant_options | List of objects |
The variant options of the purchased product, such as size or colour.
|
| totals | Object |
The line-item amounts in both your account's standard currency (
|
| properties | Object |
Custom key/value properties attached to this line item.
|
Example record
One line of a JSON order export, with every field selected:
{
"id": "ORD-58211",
"timestamp": "2026-09-10T14:32:00+00:00",
"customer_id": "546548",
"email": "sample@ometria.com",
"firstname": "John",
"lastname": "Smith",
"phone_number": "+447700900123",
"profile_hash": "8cdcf152e871646a",
"campaign_name": "Winter Sale",
"variant_name": "Variation B",
"subtotal": 91.41,
"discount": 10.00,
"tax": 11.41,
"shipping": 4.99,
"grand_total": 96.40,
"total_refunded": 0.00,
"total_unit_quantity": 2,
"total_unit_quantity_refunded": 0,
"currency": "GBP",
"totals": {
"base": {"subtotal": 91.41, "discount": 10.00, "shipping": 4.99, "tax": 11.41, "grand_total": 96.40, "refunded": 0.00, "currency": "GBP"},
"local": {"subtotal": 106.03, "discount": 11.60, "shipping": 5.79, "tax": 13.24, "grand_total": 111.82, "refunded": 0.00, "currency": "EUR"}
},
"status": "complete",
"is_valid": true,
"channel": "online",
"store": "uk-web",
"coupon_code": "SAVE10",
"shipping_method": "standard",
"payment_method": "card",
"web_id": "58211-web",
"ip_address": "203.0.113.42",
"extra_identifiers": [{"type": "loyalty_id", "value": "LOY-7898734"}],
"shipping_address": {"city": "London", "state": "Greater London", "postcode": "W1K 4TG", "country_code": "GB"},
"billing_address": {"city": "London", "state": "Greater London", "postcode": "W1K 4TG", "country_code": "GB"},
"attribution": {"session_id": "b2f1c9e0", "utm_source": "newsletter", "utm_medium": "email", "utm_campaign": "winter_sale", "utm_content": "hero_cta", "utm_terms": null, "device_type": "mobile", "referring_domain": "mail.google.com"},
"properties": {"gift_wrap": "true"},
"lineitems": [
{
"product_id": "SS14-059493",
"variant_id": "SS14-059493-S5",
"sku": "SS14-059493-S5",
"quantity": 2,
"quantity_refunded": 0,
"unit_price": 50.00,
"subtotal": 100.00,
"discount": 10.00,
"tax": 0.00,
"total": 90.00,
"refunded": 0.00,
"currency": "GBP",
"is_on_sale": true,
"variant_options": [{"type": "size", "id": "large", "label": "Large"}],
"totals": {
"base": {"subtotal": 100.00, "discount": 10.00, "tax": 0.00, "total": 90.00, "unit_price": 50.00, "refunded": 0.00, "currency": "GBP"},
"local": {"subtotal": 116.00, "discount": 11.60, "tax": 0.00, "total": 104.40, "unit_price": 58.00, "refunded": 0.00, "currency": "EUR"}
},
"properties": {"engraving": "J.S."}
}
]
}
Comments
0 comments
Please sign in to leave a comment.