A lot number is the one identifier that has to work everywhere: on a label at receiving, in a pick list at 6 a.m., in a recall spreadsheet at midnight. Most sellers invent their batch coding system in a hurry and only discover its flaws during an audit, when a code that looked fine on a carton turns out to be ambiguous, unsortable, or duplicated. This guide walks through what a lot code must do, the common schemes with real examples, and the pitfalls that quietly break traceability.
What a lot code actually has to do
Strip away the formatting debates and a lot number has four jobs. Judge every scheme against these before you print a single label.
- Unique — one code maps to exactly one batch of one product, forever. Reused codes turn a recall into an archaeology project.
- Sortable — codes that sort chronologically as plain text make FEFO checks, stock counts, and audits dramatically faster.
- Human-readable — a picker glancing at a shelf label should be able to compare two lots without a scanner. Eight characters is comfortable; twenty is not.
- Scannable and typeable — the code will be keyed into systems by hand at some point. Avoid characters that fail that test (more below).
Notice what is missing: the code does not need to encode everything. Supplier, product, expiry date, and receiving quantity belong in your batch record, linked to the lot — not crammed into the code itself. A lot number is a key, not a database row. If you need extra structured data per batch, attach it as custom batch fields rather than lengthening the code.
The four common schemes, compared
Almost every working lot number format is a variation on one of four schemes. Here they are with lot code examples and honest trade-offs.
| Scheme | Example | Pros | Cons |
|---|---|---|---|
| Date-based (YYMMDD) | 260915-A | Sorts chronologically as text; anyone can read the date; near-zero training | Needs a suffix when two batches of the same product arrive the same day |
| Julian date (YDDD) | 6258 | Very short; common in food manufacturing; fits small labels | Opaque to humans (day 258 of 2026); year digit repeats every decade |
| Supplier-prefix | ACM-260915 | Encodes provenance at a glance; useful when one SKU has multiple suppliers | Longer codes; prefix list needs governance or it drifts |
| Sequential with product code | GRN45-0187 | Compact; unambiguous; works for manufactured batches with no natural date | Not chronologically meaningful without a lookup; counter must never reset |
For most e-commerce sellers receiving finished goods, date-based with a suffix (260915-A, 260915-B) is the right default: it is sortable, readable, and self-explanatory to a temp picker on day one. Julian dates earn their keep only when label space is genuinely scarce. If you manufacture or repack, a sequential scheme scoped per product avoids the awkward question of which date a multi-day production run should carry.
The ambiguity pitfalls that break codes
Codes fail in the field, not on the whiteboard. The classic failure is character ambiguity: O versus 0, I versus 1, S versus 5, B versus 8. A handwritten receiving log or a squinted-at thermal label turns LOT-1O0 and LOT-100 into two different keys pointing at the same physical batch, and your ledger silently forks. The fix is simple: ban the letters O, I, and ideally S and B from any alphanumeric portion of your codes, or go fully numeric with letter suffixes drawn from a safe set (A, C, D, E, F).
- Ban ambiguous characters: no O, I, and preferably no S or B in codes.
- Fix the length. Variable-length codes invite truncation and padding errors; 200915 and 0200915 should never both be plausible.
- Never reuse a code, even years later and even for a different product. Uniqueness is forever.
- Skip homemade checksums unless you print barcodes. A check digit helps machines but adds a character humans must copy correctly; a barcode with the code beneath it solves both problems at once.
Supplier lot versus internal lot: keep both
A recurring audit finding is a warehouse that overwrote the supplier’s lot code with its own at receiving. When the supplier later issues a recall for their lot 7734-K, you cannot answer the only question that matters: which of your internal lots came from it. The rule is keep both and link them. Record the supplier’s code exactly as printed on the carton, assign your own internal code in your format, and store the pair in the batch record. Trace-back (your lot to their lot) and trace-forward (their lot to your customers) both become a single lookup. If terms like trace-back and trace-forward are new, the batch and lot tracking glossary covers the vocabulary auditors use.
THE SCHEME YOU CAN FOLLOW BEATS THE SCHEME YOU ADMIRE
An elegant 14-character code that encodes supplier, line, shift, and date fails the moment someone transcribes it wrong at 7 a.m. Audits are passed by boring, short, consistently applied codes — not clever ones.
Lot codes are only useful if the records behind them hold up
TraceLot keeps a per-lot batch ledger — receipt, every order deduction with its order reference, corrections, and transfers — plus attached COAs and custom fields, so any lot code resolves to a complete, exportable history.
See how audit-ready records workWhere lot codes go to work: FEFO and recalls
A lot code earns its keep downstream. In daily operations, each lot carries its expiry date, and FEFO allocation uses that pairing to route the earliest-expiring lot onto each order automatically as orders sync from Veeqo or Shopify. In a crisis, the flow reverses: a supplier notice names a lot, and your records must produce every shipped order, customer, quantity, and date for it. That is precisely the export a one-click recall CSV generates — but only if the codes going in were unique and consistently captured. Once your format is settled, pressure-test it with a one-hour mock recall; a code scheme that survives that exercise will survive an auditor.
Frequently asked questions
What is the best lot number format for a small e-commerce business?
A date-based format such as YYMMDD with a letter suffix (for example 260915-A) is the best default: it sorts chronologically as plain text, is readable without training, and stays unique as long as suffixes distinguish same-day batches of the same product.
Should I replace the supplier’s lot number with my own?
No. Keep both. Record the supplier’s lot code exactly as printed, assign your own internal lot code, and link the two in your batch record. Supplier recalls reference their code, so discarding it breaks trace-back.
How long should a lot number be?
Six to ten characters covers almost every operation. Keep the length fixed, keep the code short enough to compare by eye on a shelf label, and store descriptive data (supplier, expiry, quantity) in the batch record instead of the code.
Which characters should be avoided in lot codes?
Avoid the letter O (confused with zero), the letter I (confused with one), and ideally S and B (confused with 5 and 8). Fully numeric codes with a small safe set of suffix letters such as A, C, D, E, and F eliminate transcription ambiguity.
Never ship expired stock again.
TraceLot adds batch tracking, FEFO allocation, and audit-ready records to Veeqo and Shopify. First month free.