The organization already received serial data from manufacturing, but the files were not a traceability system by themselves. They described what had been produced. They did not reliably answer where a particular unit went.

Model the chain, not just the identifier.

A common implementation stores serial numbers in one large table and treats lookup as the product. That works until the business needs to explain the movement of a specific unit.

We separated the chain into distinct relationships: serial to manufactured carton, carton to warehouse handling, carton to dispatched order, and serial to public validation status. Each relationship has its own timing and failure modes.

Design principle

Traceability is a sequence of evidence. The serial number is the key that lets the evidence be assembled.

Do not let public validation expose the operating system.

The customer-facing question was intentionally narrow: is this serial recognized and valid? The internal question was much richer: when was it received, which carton contained it, whether that carton was dispatched, and which order carried it.

Keeping those surfaces separate protects operational detail and makes the public response easier to reason about. A validation page should reveal only what the customer needs, while internal users retain the chain required for investigation.

The architecture emphasized three boundaries

  • Factory data entered through a controlled intake process before becoming trusted inventory evidence.
  • Warehouse actions linked cartons to fulfillment records without rewriting the original manufacturing evidence.
  • Public validation read a purpose-limited status rather than exposing operational tables or order data.

Traceability must tolerate incomplete history.

Real operations do not produce every event in perfect order. A carton can arrive before its file, a file can be resent, or an investigation can begin while an order is still open. The system therefore treats “not linked yet” differently from “invalid.”

That distinction prevents premature conclusions and gives operations a clear place to resolve gaps. It also makes future reporting possible: the business can measure missing links without corrupting the evidence it already has.

Reusable pattern: preserve each source event, model the relationships explicitly, and publish only the smallest safe interpretation to external users.