# View order history and track fulfillment

**Flow key:** `order-history-and-tracking`

## Outcome

The authorized customer can find the correct orders and understand current fulfillment, payment, shipment, delivery, and next-action state.

## Actors

- Customer
- Order service
- Fulfillment/carrier integration
- Support

## Preconditions and entry points

- The synthetic user owns orders in multiple states.
- Carrier test events include delayed, delivered, returned, and unknown.

## Required test data

Use synthetic, isolated, resettable data. Never use real credentials, payment instruments, private customer records, or production notifications.

| Data | Canonical valid seed | Critical variations |
|---|---|---|
| Orders | recent paid/fulfilled test order | pending, canceled, refunded, old, split shipment |
| Identity | owning customer | guest lookup, other user/tenant, support role |
| Tracking | valid test tracking event stream | no tracking, delayed, duplicate/out-of-order, carrier outage |
| Pagination/filter | date and status filters | empty, large history, invalid deep link |

## Canonical steps

Treat this as the ordinary successful path inferred from common product behavior. Adapt it to observed labels, business rules, APIs, and implementation evidence; do not invent a requirement.

| Step | User or system action | Expected evidence |
|---:|---|---|
| 1 | Open order history or guest lookup. | Only authorized orders appear with stable identifiers and truthful summaries. |
| 2 | Filter, sort, page, or search. | Counts, order, URL state, and visible results agree. |
| 3 | Open one order. | Detail matches original order, payment, addresses, items, totals, and current lifecycle. |
| 4 | Open shipment tracking. | Carrier events are safely rendered, ordered, time-zoned, and labeled with freshness. |
| 5 | Refresh after a new fulfillment event. | State converges without duplicate milestones or false delivery. |
| 6 | Use available next actions. | Cancel/return/support eligibility derives from authoritative state and authorization. |

## Alternate paths

- Signed-in history
- Guest order lookup
- Multiple shipments
- Store pickup
- Digital delivery

## Failure and recovery paths

- Carrier unavailable
- Events arrive out of order
- Order ownership changes/refund occurs
- Cache shows stale status
- Predictable order ID leaks data

## Completion oracle

- The stated outcome is true in visible UI and authoritative persisted state.
- Exactly one intended business result and no unintended side effect occurred.
- Identity, tenant, authorization, money/data, lifecycle, notifications, integrations, analytics, and audit agree where applicable.
- Refresh, retry, back/forward, and a second authorized read do not reveal a contradictory result.
- Any partial, delayed, canceled, failed, or unknown outcome is labeled truthfully and has a safe recovery path.

## Evidence to capture

- Entry context, actor, tenant, role, feature flags, locale, time zone, and initial identifiers/state.
- Step-level screenshots or DOM state plus request/response, correlation, job, event, and stable business IDs where available.
- Before/after authoritative records, versions, totals, permissions, lifecycle states, and downstream side effects.
- Notifications, audit events, integration deliveries, retries, deduplication, latency, and recovery evidence.
- Untested branches, unsafe-to-run cases, product decisions, and evidence tier.

## Product decisions to resolve

- Exact eligibility, required data, authorization, and validation rules.
- Which steps are synchronous, asynchronous, optional, skippable, reversible, or irreversible.
- Idempotency, concurrency, timeout, retry, cancellation, and compensation semantics.
- Retention, privacy, notification, audit, performance, accessibility, and localization commitments.

## Related CARBON items

- [timeline and feed](../../items/views/timeline-and-feed.md)
- [list](../../items/views/list.md)
- [filter](../../items/organization/filter.md)
- [tenant and organization isolation](../../items/identity/tenant-and-organization-isolation.md)

[Back to Commerce and billing flows](index.md)
