Keystone
by CloudVoro
Guide · Operations

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.

9 min read Updated 2026-07-08By the CloudVoro team

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.

Rule of thumb
Price your worst-case recall at each candidate lot size (units × value + disposal + customer disruption). The lot size where that number stops being frightening is your ceiling; go one level finer if the record-keeping cost is tolerable.

Designing the code format

Make it parseable, not clever
B-2026-114-03 (prefix–year–Julian day–vat) can be read by a human at the dispatch bay and parsed by software. Codes encoding secret meaning (shift initials, freezer positions) rot when people change.
Never recycle within retention
If records must survive 5 years, a code must not repeat inside 5 years. Year-in-the-code solves this permanently.
One code system across departments
Production, QC, warehouse and dispatch must call the batch the same thing. The classic failure is production using vat numbers while dispatch uses production dates, with a human translator in between.
Plan for intermediates
Silo runs, brines, sub-assemblies and rework need their own identity that links parent and child batches, or your internal traceability chain has holes exactly where auditors look.
Avoid ambiguity characters
Drop O/0 and I/1 collisions if codes are ever handwritten. Dispatch-bay biro is a data-entry system; design for it.

Common format patterns compared

PatternExampleStrengthsWatch out for
Julian dateL26114Compact; date recoverable; printer-friendlyOpaque to customers; collides across years without a year digit
Date + sequenceL240426-02Human-readable; sorts naturallyLonger; needs discipline on the sequence part
Sequential + registerB-10442Short; no structure to get wrongMeaningless without the register, the register becomes a single point of failure
Structured compositeB-26-114-V3Parseable by humans and software; encodes vat/lineKeep 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

Codes that mean something, until they don't
Encoding line numbers or staff initials that later change forces either lying codes or a renumbering project.
Best-before doubling as lot code without a register
Legal under 2011/91/EU when the date is uncoded, but two production runs with the same date become indistinguishable, pair it with an internal batch register.
Re-keying between systems
Every manual transcription of a code (production book → dispatch sheet → invoice) is an error site. Auditors find transposed digits depressingly often.
No code on the pallet
Case-level codes with unmarked mixed pallets make warehouse recall segregation guesswork. SSCC pallet labels solve this and Irish multiples increasingly expect them.
Key takeaways
  • 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.
Free 5-part email course
Get audit-ready in five short emails.
The 18-point checklist PDF, the 30-second traceability test, what BRCGS auditors actually flag, and how Cashel Blue got audit-ready, one email every few days. No spam, one-click unsubscribe.
GDPR-friendly: we store your email for this course only. Unsubscribe link in every email.

Frequently asked questions

What legally has to be on a food lot mark in the EU?
Directive 2011/91/EU requires prepacked food to carry an indication identifying the production lot, preceded by 'L' where it isn't otherwise distinguishable. An uncoded day/month date of minimum durability or use-by date on the label can serve as the lot indication.
Who decides how big a lot is?
You do, the producer defines the lot as units produced under practically the same conditions. Certifiers and customers then judge whether your lot size keeps recall exposure sensible; per make-day per product is the common landing point for small and mid-size producers.
Is a Julian date code a good batch code?
It is compact and printer-friendly, but add a year indicator (L26114 rather than L114) so codes never collide across years, and keep an internal register linking each code to its full production record.
How should batch codes handle rework?
Rework needs its own lot identity recording which batches it came from and which batch consumed it, with weights. Without that link your mass balance will not close and your internal traceability has a documented hole.
Do I need different codes for private-label products?
Usually the retailer specifies their own SKU codes and label format. Your job is a maintained mapping between their codes and your internal products/batches, with effective dates, so a query quoting only the retailer code resolves to an internal batch instantly.

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.

Compliance & trust

How we keep your
data and your audits safe.

Enterprise-grade controls as standard, encryption, MFA for every user, tenant isolation and immutable audit trails, on EU cloud or your own servers. Privacy queries go to privacy@cloudvoro.com. Sub-processor list at /legal/sub-processors. Full security posture at /site/security.

Live
Hosted in EU / Ireland, or on-premise
Customer data resides on AWS Ireland (eu-west-1) and never leaves the EU. Local on-premise deployment available where policy requires it.
Live
GDPR · Privacy Contact named
Internal Data Protection Lead handles subject access requests. Owner is ADPO Ireland member.
Live
MFA for every user
TOTP multi-factor authentication across all roles, with rate limiting, brute-force lockout and reCAPTCHA bot protection on public forms.
Live
ISO 27001 · aligned controls
Security controls mapped to the ISO/IEC 27001:2022 Annex A framework, access management, encryption, logging, incident response.
Live
NIS2 · supporting evidence
Tenant isolation, MFA and immutable audit trails give customers in NIS2 scope direct supporting evidence for their obligations.
Live
Encryption · at rest & in transit
TLS 1.3 in transit, industry-standard symmetric ciphers at rest, KMS-managed keys.