A lot code is the identifier stamped on food that ties a finished unit back to a specific production run, the same product made on the same line under uniform conditions in a defined window of time. It is the difference between a recall that says "everything we shipped" and one that says "these four pallets."

Every regulator, customer, and auditor eventually asks the same question: given a problem package, what else was made with it, and where did it go? Lot coding is how you answer without guessing. This post covers what a lot actually is, how to structure a code, where to apply it, how to verify it, and why tighter lots shrink recalls.

What is a lot in food manufacturing?

A lot is a quantity of product made under conditions uniform enough that, if one unit has a problem, every unit in the lot is suspect. That "uniform enough" is a decision you make, not a number handed to you. Most plants define a lot by some combination of product, line, date, shift, and a change point, a new raw-material lot, a sanitation break, a batch of dough, a fresh reel of film.

The practical test: when something goes wrong, would you be comfortable clearing the rest of the lot on the same evidence that condemns the bad unit? If a mid-shift ingredient change means the second half of the run is genuinely different, that change point should break the lot. A lot is a promise about sameness, and every code you print is a claim that those units share a fate.

What does a lot code contain?

A working lot code encodes enough to rebuild the run's story from records: what, where, and when it was made, and which slice of the day it belongs to. Most codes are built from a handful of fields:

In GS1 terms these map to application identifiers: AI (10) for batch/lot, AI (11) for production date, AI (17) for expiry, printed as a human-readable string and often a barcode. The exact recipe matters less than two rules: the code must be unique enough to isolate one run, and every field must reconcile to a record you actually keep.

Anatomy of a lot code One code, four claims you can prove L2 197 B 0143 LINE 2 line log DAY 197 = Jul 16 production record SHIFT B crew roster SEQ 0143 batch sheet every segment must reconcile to a record you keep, a code you can't trace back is decoration
A lot code is only as good as the records behind it. Each field should point at a document that proves what the segment claims.

Where do you apply the lot code?

Code at every level of packaging, because a recall travels through all of them. The three coding points are the primary package the consumer holds, the case that ships, and the pallet that moves. If only the case is coded and cases are broken open in a distribution center, you lose the thread at the last mile. If only the primary unit is coded, your warehouse can't act on a hold without opening cases.

The codes at each level must reconcile upward: cases roll into a pallet record, primary units roll into a case. When they do, a single scanned pallet tells you every lot it carries, and a single consumer package tells you which pallet it left on.

The three coding points Code at every level a recall travels through Primary package bag / can / carton code Case case label + barcode, holds many primaries Pallet SSCC license plate, holds many cases codes reconcile upward scan a pallet, learn every lot on it; scan one package, find its pallet
Coding all three levels lets a hold act on whichever unit is in hand, package on the shelf, case in the DC, pallet in the yard.

How do you design a lot-coding scheme?

Designing the scheme is a one-time engineering job that pays off on the worst day you have. Work it in order:

  1. Define what breaks a lot. List every change point, new ingredient lot, sanitation break, batch, shift, line, and decide which ones start a fresh code. This decision sets how tight your lots will be.
  2. Choose the fields. Pick the minimum set that makes a code unique and traceable: item, date, line, shift/time, sequence. Add facility if you run multiple sites.
  3. Fix the format. Write the exact character order and meaning down as a controlled document so operations, quality, and customer service all read a code the same way.
  4. Map every field to a record. For each segment, name the log or record that proves it. If a field has no record behind it, drop the field or create the record.
  5. Assign coding points and print methods. Decide primary, case, and pallet coding and the printer technology for each surface and speed.
  6. Set verification. Define who checks codes, how often, and what happens when a code is missing, wrong, or unreadable.

How do you verify lot codes are right and legible?

A lot code that is present but wrong is worse than no code, because it points the recall at the wrong product. Verification has two jobs: confirm the code is correct for the run, and confirm it is readable by both humans and scanners.

These checks are ordinary quality tasks, but they fail quietly on paper: a startup verification signed for a code no one actually looked at. Moving code checks onto tablets with a required photo or scan makes the record match reality, the same digitize-the-paper move Harmony runs across production and quality logs (see how CLS did it).

Why do tight lots mean narrower recalls?

A recall's cost is set by the size of the lot you can't clear. If your smallest traceable unit is a full day on a line, a single contaminated batch condemns the whole day. If your lots break by shift or by ingredient lot, the same problem condemns a slice. Nothing about the hazard changed, only how precisely you can draw the line around it.

Tight lots narrow the recall Same problem, two lot definitions WIDE: one lot = full day entire day recalled TIGHT: one lot = one shift shift A · clear shift B · recalled shift C · clear tighter lots condemn less product, the cheapest recall insurance you can print
Lot size is a design choice. The tighter you define a lot, the less product a single failure drags down with it.

There is a tradeoff: tighter lots mean more code changes, more startup verifications, and more discipline at changeovers. The right granularity balances recall exposure against the cost of managing more codes. High-risk, ready-to-eat products lean tight; low-risk shelf-stable products can run wider. Tie the decision to your recall plan and HACCP hazard analysis, and pressure-test it in a mock recall. In USDA-inspected plants the discipline is doubly load-bearing, because a positive pathogen result maps directly to a lot (see meat processing compliance), and lot codes are what let a genuine metal-detection reject define its own contained hold.

How does FSMA 204 change lot coding?

FDA's Food Traceability Rule (FSMA 204) adds a formal concept: the Traceability Lot Code (TLC), a code assigned when a food on the Food Traceability List is initially packed, received after transformation, or transformed. For covered foods, the TLC must be linked to Key Data Elements at each Critical Tracking Event and shared down the chain, so the whole supply chain uses one consistent lot identifier during a traceback.

The rule's compliance date was extended: FDA and Congress pushed enforcement to July 20, 2028 but the substantive requirements are unchanged, so the smart move is to build TLC-compatible coding now. Even if your product is not on the list, designing codes that could carry a TLC keeps you ready and improves everyday traceability. The mechanics are covered in our guide to FSMA 204 food traceability.

Facts worth pinning, from the primary sources:

Lot coding is a small line item that decides how much product you lose on your worst day. Print codes you can prove, code every level, verify at the source, and draw your lots as tight as your process honestly allows. Then connect the codes to real records so a recall is a query, not a search party, the plant-floor problem Harmony was built for (see the platform).