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:
- Product / item identifier a SKU or, in GS1 systems, the GTIN of the traded unit.
- Date production or pack date. A Julian date (day-of-year, e.g. 197 for July 16) is common because it is compact and unambiguous across formats.
- Line or facility which line and, for multi-plant firms, which site.
- Shift or time the slice of the day; an hour or shift letter narrows a lot without extra runs.
- Sequence / batch a firm-assigned counter or batch number that makes the code unique within the date.
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.
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.
- Primary package inkjet, laser, or thermal-transfer code on the bag, can, or carton. This is the unit a consumer or inspector reads.
- Case printed or labeled case code, usually with a barcode, so warehouses can pick and hold by lot.
- Pallet a license-plate label (often GS1 SSCC) that links the pallet to its cases and their lots in your traceability records.
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.
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:
- 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.
- 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.
- 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.
- 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.
- Assign coding points and print methods. Decide primary, case, and pallet coding and the printer technology for each surface and speed.
- 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.
- Startup and changeover checks. The operator confirms the printed code matches the scheduled product, date, and lot at the start of every run and after every changeover, and records it.
- In-line vision or scan verification. Camera systems read the printed code and reject or alarm on missing, smeared, or mismatched print. On coded barcodes, a verifier grades print quality, not just readability.
- Periodic legibility checks. Someone pulls units through the run and confirms the code is sharp, correctly placed, and durable through the process (retort, freezer, wash-down).
- Reconciliation. Counts of coded units tie back to production and shipping records, so a lot's size is known, you can't hold what you can't count.
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.
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:
- A Traceability Lot Code uniquely identifies a traceability lot within a firm's records and must be linked to KDEs at defined events (FDA, Traceability Lot Code).
- The Food Traceability Rule's compliance date was extended by 30 months to July 20, 2028 (Federal Register, Aug 7, 2025).
- The rule's substantive recordkeeping requirements for foods on the list were not amended by the extension (FDA, FSMA Final Rule).
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).