Batch codes and lot numbering:
design it once, so it survives growth.
Every traceability system stands on its coding scheme. Get it right and every record snaps together; get it wrong and you will be paying the interest for years, ambiguous codes, un-parseable labels, and a renumbering project nobody wants. Here is how to design lot codes properly the first time, and the legal minimums underneath.
The legal minimum: what a lot mark must do
EU Directive 2011/91/EU requires prepacked foodstuffs to carry an indication that identifies the lot, a batch of units produced under practically the same conditions, preceded by the letter 'L' where it is not otherwise distinguishable from other label information. If a date of minimum durability or use-by date in uncoded day/month form appears on the label, that date can itself serve as the lot indication.
The lot is defined by the producer: you decide its size and boundaries, a make-day, a vat, a production run, a filling shift. The law cares that the mark identifies the lot; your certifier and customers care that the lot boundaries are small enough to keep a recall's blast radius survivable.
Lot size: the recall blast-radius decision
Every coding decision trades convenience against exposure. One code per week of production means fewer labels and simpler records, and a recall that takes out a week of output. One code per vat or per line-hour means finer records and a recall measured in hundreds of units, not tonnes. The right answer is the largest lot you could afford to lose in a single recall event, and for most artisan and mid-size producers that lands at one code per make-day per product, subdivided where a day covers multiple vats or recipe variants.
Designing the code format
Common format patterns compared
| Pattern | Example | Strengths | Watch out for |
|---|---|---|---|
| Julian date | L26114 | Compact; date recoverable; printer-friendly | Opaque to customers; collides across years without a year digit |
| Date + sequence | L240426-02 | Human-readable; sorts naturally | Longer; needs discipline on the sequence part |
| Sequential + register | B-10442 | Short; no structure to get wrong | Meaningless without the register, the register becomes a single point of failure |
| Structured composite | B-26-114-V3 | Parseable by humans and software; encodes vat/line | Keep it to 3–4 fields or labels get crowded |
Private label: the second code you don't control
Supplying retailers under their own label gives every product a second identity, the retailer's SKU code and description, and your traceability now includes a mapping table you must maintain: which customer code resolves to which internal product, with effective dates so a spec change doesn't orphan historic dispatches. When the retailer's technical team queries 'SKU 47712, best-before 14 June', your records must resolve that to an internal batch without a human translator.
This mapping is one of Keystone's core objects: customer SKU codes map bidirectionally to internal products, so a trace can start from either side, the exact situation a retailer query or a vertical audit creates. If you stay on spreadsheets, keep the mapping as a dated, version-controlled sheet with a named owner; it is the most underestimated document in private-label supply.
The mistakes that hurt two years later
- EU law (Directive 2011/91/EU) requires a lot indication, the producer defines the lot boundaries.
- Size lots by recall blast radius: the largest batch you could afford to lose, typically one code per make-day per product.
- Make codes parseable and year-unique; never recycle a code inside your record-retention window.
- Intermediates (silos, brines, rework) need identities that link parent and child batches.
- Private label adds a customer-code mapping you must maintain with effective dates, own it like a controlled document.
Frequently asked questions
What legally has to be on a food lot mark in the EU?
Who decides how big a lot is?
Is a Julian date code a good batch code?
How should batch codes handle rework?
Do I need different codes for private-label products?
See this done in software, on real production data.
Keystone runs the full chain, supplier delivery → batch → dispatch → customer, in under 30 seconds. 20-minute discovery call, no sales pitch.