O ORPAON
Machine Vision & Quality

How to Build a Batch Traceability System: Coding and Recall

A batch traceability system is software that links material batches, process batches and finished goods batches under a single coding scheme, so that every material issue, process step and inspection can be queried and evidenced. Its value is not how much data it stores, but how quickly the full flow of a given batch can be pinned down when something goes wrong.

Overview of a batch traceability system: raw material, process and finished goods batches linked by one coding scheme and queried from shop floor scanning terminals

Batch traceability versus flipping through production records

Many plants claim they "have traceability". In practice they keep paper route cards and spreadsheet ledgers, and a few people go looking when the need arises.

That approach looks fine day to day. It is tested in three moments: when a customer complains and asks for evidence, when a regulator audits, and when an anomaly appears and the affected flow must be defined. All three share one property — time is short, and nobody has the hours to reassemble records scattered across the plant.

A batch traceability system differs in three ways.

  • Records are captured, not reconstructed: the batch number is written at the moment of issue, transfer and inspection, not entered after the handover
  • Links are built by the system, not strung together by people: parent-child relations from material batch to process batch to finished batch are generated by rules
  • Queries run in both directions: finished goods back to raw material, and raw material forward to every finished item it entered

One practical test: pick any finished goods batch number. If you can list every material batch it consumed within a few minutes, the traceability is real.

Fixing the coding rules: batch, barcode and container tiers

The foundation of traceability is the coding scheme. If it is not settled, every later link will drift.

A common approach splits the code into three tiers, each responsible for one thing.

TierWhat it identifiesTypical approachWhat to settle up front
Material batch tierThe identity of one lot of materialSupplier lot number plus an internal batch suffixWhether split deliveries of the same lot count as one batch
Process batch tierWhich process steps the material passedWork order number plus step sequence and time sliceWhether rework creates a new batch or keeps the original
Container or unit tierThe identity of one carton or one pieceBarcode, QR code or RFIDWhether codes continue after repacking or splitting
Three-tier coding scheme diagram: material batch tier, process batch tier and container or unit tier, with the rule each tier must settle

The coding scheme should be confirmed in writing at project start. If the rules change after production begins, historical data ends up with two coexisting conventions.

Two coding families are commonly referenced in industry. The GS1 family (including GTIN and SSCC identifiers) suits scenarios that interface with retail or logistics parties. Company-specific codes are more flexible but demand stronger internal discipline. Neither is universally right — the answer follows the downstream flow of the product.

Which fields a process link must keep

Being able to query a batch does not mean the trace chain holds up. What auditors and customers actually read is which fields the chain carries.

An acceptable trace record usually contains six families of information.

  • Timestamp: the exact moment of material issue, transfer, inspection and packing
  • Batch links: the material batch consumed and the semi-finished or finished batch produced
  • Equipment and station: which machine and which station completed the step, traceable to the equipment number
  • Operator: who executed and who verified, tied to an authorised account
  • Process parameters: temperature, pressure, speed and time values of key steps
  • Inspection results: inspection items, verdict, sampling ratio and acceptance criteria
Fields in a traceability record: timestamp, batch links, equipment and station, operator, process parameters and inspection results

These six families form the evidence base often described as people, machine, material, method and environment. Miss one and the matching question cannot be answered: without operator data, responsibility cannot be assigned; without process parameters, batch-to-batch variation cannot be defended.

Field count should follow what auditors and customers actually require, not the reverse. More fields mean heavier capture work on the floor, which invites gaps and broken chains.

How to verify the completeness of the trace chain

The worst case is not missing data — it is data that does not connect.

Breaks cluster in three places: stations that fill records by hand, legacy equipment without a communication port, and the shift handover window. These are also the places auditors like to sample.

Completeness is usually verified in two ways.

  • Forward and backward cross-check: run a trace query on any finished batch and confirm the result set matches the manual ledger
  • Break sampling: draw several batches at random and check each stage's timestamps for gaps

For legacy equipment without a communication port, the usual approach is to add a recording interface first and write batch information into the system with manual confirmation and a timestamp, rather than modifying the machine itself. The record is coarser, but the chain stays continuous. Auditors ask for an unbroken chain, not full automation at every step.

Locking a recall scope: from batch to flow

A recall is the most direct test a traceability system faces.

Response normally runs in four steps: trigger, scope lock, execution tracking and closure.

Scope lock is where the real capability shows. It has to answer two questions: which finished goods this material went into, and where those finished goods are now.

Doing this without counting in the field depends on two directions of data already in the system: forward trace from material batch to finished batch, and backward trace of a finished batch's material composition. Only when both directions answer can the scope be defined in a short window.

The boundaries of scope lock should be agreed before go-live: is the scope drawn by batch number or by time window; does the record include downstream customers or logistics destinations; who updates the execution status. If these stay out of the design document, the gap shows up as "the system can query, but the process cannot keep up".

Recall workflow in four steps — trigger, scope lock, execution tracking and closure — with forward and backward trace data used for scope locking

Run one recall drill during the pilot. Pick a real batch, walk the whole flow, and record the time and friction at each step. That is worth more than reading a feature list.

Self-checks, audits and report export

The output of a traceability system is not only a query screen. It also includes reports exported to a fixed convention.

Routine self-checks usually look at three things: the completeness rate of batch records, whether key process parameters are retained, and whether abnormal batches are closed out with a record. Running these weekly or monthly surfaces breaks early.

External audits and customer factory audits tend to ask for data in a fixed format, so the system needs to support the following.

  • Export of the full process and inspection record for a given batch number
  • Export of batch lists by line or by equipment for a time range
  • Fields, timestamps and operator information that stay readable and checkable in the exported record

Report templates should be finalised at handover and cross-checked once against the auditor's convention. Adjusting the format on audit day costs time and carries risk for no benefit.

Delivery boundary and acceptance: what to settle before you start

Disputes in traceability projects cluster in two places: who guarantees the fields, and how the scope is defined. Writing the boundary down before acceptance removes a large share of later explanation.

An acceptance checklist should include the following.

  • Coding rules: three-tier rules and exceptions (rework, splitting, repacking) confirmed in writing
  • Trace test: random batch drawn, forward and backward query run, results compared item by item with the manual ledger
  • Break check: timestamp gaps sampled, fill-in mechanism and owner confirmed
  • Recall drill: scope lock walked through once, time and friction recorded
  • Access and records: account tiers, operation logs and record-revision history traceable
  • Report export: one full report exported to the audit convention, fields and format confirmed usable

Interfaces to upstream and downstream systems (work orders from MES, goods receipt from ERP) are best handled in the same scope confirmation. Changing an interface field after it is frozen costs more than one extra round of discussion beforehand.

Delivery status is normally described in three tiers: delivered (in operation on site), deliverable (solution and references ready, can start immediately) and customised pilot (validated against site conditions). For multi-line or multi-site cases, start with one line or one process area, stabilise the coding rules and the capture paths, then replicate to the remaining lines. The replication cost sits mainly in adding data capture points, not in the platform.

Where traceability lands: cutting the time it takes to evidence

A batch traceability system does not answer whether records should be kept. It answers in what form they exist and how fast they can be retrieved. The coding scheme decides whether the chain can be built, the process fields decide whether it holds, and scope locking decides the reaction speed when something actually goes wrong. Get those three right and traceability stops being a digital ledger.

Summary: putting records in an answerable form

Whether batch traceability succeeds depends less on the size of the system than on how much was settled before go-live: the coding scheme, the process fields, and the boundaries of scope locking. Aim for a state where the flow from raw material to finished goods can be queried in both directions and exported directly to an audit convention, and the design priorities become clear.

Book a solution discussion

If you are working out which traceability fields to keep, or whether existing lines can capture batch information, you can book a solution discussion. We will suggest a coding scheme and field set based on your product flow and audit requirements.

Contact Us