Dataset
Online retail datasets of order histories for AI training
An online retail dataset of order histories is an order-level record from a store's commerce platform and order management system: carts and line items, discounts, payment status, fulfillment and shipment events, edits, cancellations, returns with reason codes and refunds. SourceX sources these histories to a buyer's spec from established retailers and direct-to-consumer brands, with pseudonymous customer keys so repeat purchases stay linked and, where the store recorded it, whether each line was kept, exchanged or sent back. Each dataset is de-identified and licensed for an agreed permitted use.
Dataset manifest
Sourced to your spec- What it is
- Order-level records that follow every line to its end: canceled, kept, exchanged, returned or refunded
- Typical systems
- Shopify, Adobe Commerce, BigCommerce, WooCommerce, Salesforce Commerce Cloud, NetSuite, returns and shipping apps
- Typical history
- Specified by the buyer; limited by platform migrations and by when returns moved into a system that records them
- Modality
- Structured order, line, payment, fulfillment and return tables with an event timeline; short free-text notes
- Delivery formats
- Agreed per order; typically Parquet or JSONL per entity with shared keys, plus the store's reason-code lists
- Preparation
- Shoppers pseudonymized with stable keys; names, emails, phones and street addresses removed; locations coarsened
- Licensing
- Rights reviewed against the store's privacy notice and platform terms; permitted use set in the license
- Availability
- Sourced to your spec; supply is not guaranteed and return detail depends on the partner's systems
What a delivery contains
Fields vary by source system and are fixed per order. A typical delivery includes:
| Field | Type | What it holds |
|---|---|---|
| order_id | string | Pseudonymous order key shared by lines, payments, fulfillments, returns and refunds. |
| customer_key | string | Stable pseudonym for the shopper's account or hashed guest email, so repeat orders link without identifying anyone. |
| placed_at | timestamp | Checkout time in UTC, with the store's time zone kept. |
| sales_channel | enum | Online store, mobile app, marketplace feed, draft order entered by staff, subscription renewal or point of sale. |
| ship_to_region | object | Coarsened delivery location, such as country, state and a truncated postal area. |
| lines | array | One row per item: SKU and variant pseudonyms, category, quantity ordered, current quantity after edits and unit price. |
| lines[].final_state | enum | What became of each unit: kept, canceled before shipment, exchanged, returned, refunded without return or replaced. |
| discounts | array | Each code or automatic rule applied, its type, and the amount allocated to each line. |
| payment | object | Tender type and the dated history of financial status from authorization to refund. No card numbers or tokens. |
| edits | array | Changes after checkout: lines added or removed, quantity changes, address corrections and shipping upgrades, with actor role and time. |
| fulfillments | array | Each shipment: fulfilling location, lines in the box, holds and their reasons, service level, ship and delivery times. |
| cancellation | object | Whole or partial, the reason code as the platform stored it, and whether the customer, staff or a fraud rule started it. |
| returns | array | Each return request: lines, the customer's reason code and note, the decision, receipt date and inspected condition. |
| refunds | array | Each refund: amount by line, shipping and adjustment portions, restock type, method and time. |
Field names from the table above; values are masked placeholders.
Example record
{
"order_id": "ord_8c21f0",
"customer_key": "cust_41d9",
"placed_at": "2023-11-24T19:42:08Z",
"sales_channel": "online_store",
"ship_to_region": { "country": "US", "state": "OR", "postal_prefix": "972" },
"lines": [
{ "line": 1, "sku": "sku_boot_w_8", "qty_ordered": 1, "qty_current": 1, "unit_price": 148.00, "final_state": "exchanged" },
{ "line": 2, "sku": "sku_sock_3pk", "qty_ordered": 2, "qty_current": 1, "unit_price": 18.00, "final_state": "kept" },
{ "line": 3, "sku": "sku_scarf_gry", "qty_ordered": 1, "qty_current": 1, "unit_price": 42.00, "final_state": "returned" }
],
"discounts": [
{ "code": "[PROMO_CODE]", "type": "percentage", "value": 20,
"allocated": [{ "line": 1, "amount": 29.60 }, { "line": 2, "amount": 7.20 }, { "line": 3, "amount": 8.40 }] }
],
"payment": { "tender": "card", "status_history": [
{ "t": "2023-11-24T19:42:09Z", "status": "paid" },
{ "t": "2023-11-24T20:05:10Z", "status": "partially_refunded" }
] },
"edits": [
{ "t": "2023-11-24T20:05:00Z", "actor": "staff_for_customer", "change": "quantity_decrease", "line": 2, "from": 2, "to": 1 }
],
"fulfillments": [
{ "id": "ful_1", "location": "wh_west", "lines": [2, 3], "shipped_at": "2023-11-25T15:10:00Z" },
{ "id": "ful_2", "location": "wh_east", "lines": [1], "hold": "awaiting_stock", "shipped_at": "2023-11-29T13:02:00Z" }
],
"cancellation": null,
"returns": [
{ "return_id": "ret_77a", "requested_at": "2023-12-04T02:11:00Z", "received_at": "2023-12-08T16:20:00Z",
"lines": [
{ "line": 1, "reason": "size_too_small", "note": "Runs a half size small", "resolution": "exchange",
"exchange_order_id": "ord_9d17b2" },
{ "line": 3, "reason": "not_as_described", "note": "Color is lighter than the photo", "resolution": "refund" }
] }
],
"refunds": [
{ "t": "2023-11-24T20:05:10Z", "amount": 14.40, "lines": [{ "line": 2, "qty": 1, "restock_type": "cancel" }] },
{ "t": "2023-12-09T17:31:00Z", "amount": 33.60, "lines": [{ "line": 3, "qty": 1, "restock_type": "return" }] }
]
}Synthetic record for illustration. Field names, structure and format are agreed per order.
What AI teams use it for
Train order-support agents
The timeline of edits, shipments, returns and refunds lets an agent learn to say where an order stands and what can still be changed.
Predict returns line by line
Kept and returned labels on each unit, with reason codes and notes, support return-propensity and size or fit models that order totals cannot.
Seed commerce agent environments
Order state at each timestamp can populate a simulated store where an agent has to cancel, edit, split or refund correctly.
Model customer value net of returns
Pseudonymous customer keys link orders over time, so retention and lifetime value can be computed on what shoppers kept, not on gross sales.
Test analytics and text-to-SQL agents
A real multi-table schema with partial refunds, split shipments and edited lines is a hard check of whether an agent computes net revenue correctly.
Use-case guides: Customer support agents, Enterprise and computer-use agents, Private evaluation sets
What makes this data valuable
Final state per line
Every unit resolves to kept, canceled, exchanged, returned or refunded, not only an order status.
Reasons with notes
Return reason codes come with the customer's own note and the store's code list for each period.
Dated events
Status changes are events with timestamps, so the order can be rebuilt as it stood on any day.
Refunds that reconcile
Refund amounts tie to lines, shipping and adjustments, and totals agree with the payment record.
Stable customer keys
Guest and account orders by the same shopper share one pseudonym across the history.
Exchanges linked
A replacement order points back to the return that created it.
Record timeline
Online retail dataset
The return leg is what public retail data lacks
The public retail sets used in tutorials and papers are mostly invoice-line or order tables in which a sale is final once recorded. One long-used set marks a canceled invoice with a letter in front of the invoice number and does not say why, or tell an order stopped before dispatch from goods that came back weeks later. In a working store items are returned, swapped for another size, or refunded without being sent back because the postage costs more than the product. A model trained on gross orders counts a dress bought in three sizes, with two sent back, as three sales.
An order history is complete only when each unit on each line shows whether it was kept, exchanged or returned, and for what stated reason. Platforms store the reason as a code from a short list plus an optional note. Shopify's long-standing list offers size too small, size too large, color, style, defective, not as described, wrong item, unwanted and other. Shoppers can pick the first plausible code that produces a label, so the note often carries the information. Shopify's restock type on a refunded line tells a line canceled before shipping from goods returned to stock and from a refund that put nothing back in stock.
The return leg often lives outside the commerce platform, in a returns portal or warehouse system, while the platform holds only the money going back. Exchanges are the weakest point, since one may be stored as a refund plus an unrelated new order. Ask which system holds each part, and from what date.
An order is a sequence of events, not a row
The order row in a reporting table is the last state of something that changed many times. A customer corrects the address, support removes a line and refunds the difference, a fraud check holds the order, and an out-of-stock item splits it between two warehouses. Shopify keeps both the ordered and the current quantity on an edited line, and tracks warehouse work in fulfillment orders that can be held or moved to another location line by line. Order-level status compresses all of it: one financial status, partially refunded, covers a goodwill credit on shipping and the return of four items out of five.
A commerce or support agent works in the middle states. Whether an address can still be changed depends on whether the shipment was released to the warehouse, and in the example record, why the customer got 14.40 back depends on the edit that removed one pack of socks. Ask for the timeline: every change with its time, the actor's role and the value before and after.
Check how the archive was built, since extraction decides whether the sequence survived. A nightly data-warehouse snapshot keeps one state per day and loses the order of same-day changes. Shopify's order API returns only the last 60 days of orders by default, unless the app has been granted wider access, so an archive built by an app can be shallower than the store. A platform migration may have imported old orders as closed records with no events.
What to check before licensing
- Have counsel confirm that the store's privacy notice and the commerce platform's terms allow licensing de-identified order records for AI training, including for shoppers in places with their own consumer privacy laws.
- Check shopper de-identification beyond the name fields. Gift messages, order notes, delivery instructions and company names on an address often hold names, phone numbers and door codes.
- Agree how delivery locations are coarsened. A full postal code with an order date and an unusual product can single out a household, so ask for a region or truncated postal area and test for small cells.
- Decide how sensitive purchases are treated. Orders for health, pregnancy, sexual wellness or religious products can reveal things about a person even under a pseudonym, so agree exclusions or generalization first.
- Confirm that no payment credentials are present: no card numbers, security codes, bank details or gateway tokens. Tender type and card brand are usually enough.
- Reconcile on a sample. Refunds should tie to lines, shipping and adjustments, and order totals less refunds should match the payment record. Ask how exchanges, store credit and gift cards were recorded.
- Ask what share of refunded lines carry a reason code, year by year, and for the reason list in force in each period, since stores edit these lists.
Delivery No files move before a signed license. A listing or a request grants no files by itself.
How licensing works through SourceX
- 1
Define
Send the domain, modality, volume, format, timeline and permitted use you need.
- 2
Source
SourceX identifies businesses that hold matching data and are open to licensing it.
- 3
Qualify
Fit, rights and quality are checked, and you review samples before committing.
- 4
License
Scope, permitted use, exclusivity, price and obligations are agreed in writing.
- 5
Deliver
Approved data is prepared, de-identified where required and transferred securely.
Questions Acquisition Partners ask
How is this different from the public online retail datasets?
It adds what happened after the sale. Public sets are mostly invoice-line or order tables, and they rarely carry return reasons, refunds tied to lines, linked exchanges or the sequence of edits and shipments. A licensed order history can be scoped to include the return leg and the timeline where the store recorded them.
Can orders be linked to the same customer over time?
Yes, through a pseudonymous customer key. Account holders keep one key, and guest checkouts can be linked by a keyed hash of the email address, which misses shoppers who use several addresses. Ask how the key was built and what share of orders are guest orders.
Are product details included?
Yes, usually as pseudonymous SKU and variant keys with category, size, color and price. Titles, descriptions and images identify the brand, so they are included only where the partner agrees. Full product content with its edit history is a separate kind of dataset.
Which orders are normally flagged or left out?
Test orders, staff and gifted orders, wholesale orders placed through the same store and orders canceled by fraud screening are the usual ones, because they behave differently from ordinary retail orders. Ask for them to be flagged, not silently dropped, since fraud cancellations and staff-entered draft orders are useful for some tasks.
Does the data include customer service conversations about the orders?
Not unless you ask for them. An order history carries short structured notes and the actor behind each change, but the emails and chats in which a customer asked for that change live in a help desk. Where one partner holds both and agrees, conversations can be joined to orders by key.
How should I treat orders too recent to have been returned?
Treat their return labels as unfinished. An order delivered a week before the export may still come back, so a kept label on it is not yet true. Ask for the store's return window and the export date, then drop lines whose window was still open or model the delay.
Related datasets
- Supply chain and logistics operations records
Linked orders, shipments, tracking events, exceptions and freight documents from real operations
- Product catalogs and product information records
One holder's product master: variant trees, taxonomy, typed attributes, localized copy, images and the edit history from supplier submission to publication
- Subscription billing and churn histories
Per-subscriber lifecycle records from a billing system: plan changes, invoices, payment attempts, dunning steps, cancellations and returns
- Web and product analytics events
Event-level logs from a first-party site or app, with the tracking plan and keys to business outcomes
- Returns and reverse logistics records
Return files from request to final disposition, with stated reason, inspection grade, photos, route and refund
Evaluating this data for procurement?
Diligence packets are prepared per dataset. Rights, privacy processing and quality differ between datasets.
Request dataset diligenceTell us what your models need
Send your spec — domain, volume, format, timeline and permitted use — and SourceX will match it against partner data and come back with what can be licensed.
Updated 25 November 2026.