The fifteen seconds at goods-in that decide what a recall costs
Everything else in this system can be built after the notice arrives. This part cannot. A batch code that was not written down at delivery is not recoverable from anywhere, at any price, and that single fact is what makes goods-in the whole design.
Key takeaways
Batch codes arrive three ways and a keyboard is the worst of them.
Store supplier, batch, quantity and date together or the row is not traceability.
A photograph of the case label is a legitimate primary record.
Best-before is not a batch code, but it is often the only code there is.
Unreadable is a state to record, not a failure to hide.
Three ways a code arrives
Fig 1. Whatever the route, the same five fields come out, plus an honest note about how they were obtained.
Machine learning
Front-end & mobile
Outside AWS
Why not just type it
Because a batch code is a string with no meaning and no checksum, typed by somebody holding a scanner in the other hand, in a cold room, against a clock. The error rate is high and, worse, the errors are silent: L4127 entered as L4l27 does not fail, it just quietly stops matching the notice that arrives four months later.
A photograph does not have that failure mode. It is wrong or it is unreadable, and both of those are states the system can record and a person can resolve. The image is also the evidence: when an inspector asks how you know that pallet was batch L4127, a picture of the case is a better answer than a database field.
What a traceable row actually contains
Fig 2. Five steps, one of which can stop and ask. Matching a supplier’s description to your own product code is the step that fails, and it fails quietly if you let it.
Storage
Machine learning
Analytics
Front-end & mobile
People
Best-before is not a batch code, and often it is all you have
Plenty of suppliers print no lot code at all, or print one that is really a date in disguise. Recall notices know this, which is why they usually name both: a batch code and a best-before date, sometimes as alternatives. So the register stores both, keeps them distinct, and never derives one from the other.
The temptation is to normalise — to turn 23/156 and L23-156 and 156/23 into one canonical form. Resist it at ingest. Store the string exactly as printed, and do the fuzzy comparison at trace time where a human can see what matched what. A normaliser that silently merges two real batches is worse than no normaliser.
The five fields, and why each one is there
Supplier. One step back. Also the only route to the rest of the batch.
Batch code, verbatim. Exactly as printed, including the parts that look like noise.
Best-before. Separate field. Half of all notices name it instead.
Quantity and site. Turns the batch into a balance you can draw down.
Confidence. Scanned, read from a photo, or assumed. Changes what you can claim later.
The cost of skipping it
Fifteen seconds a delivery line, at a hundred lines a week, is about twenty minutes. The comparison is not against zero, because without it a recall means pulling every unit of the line and writing to every customer who ever bought it — and doing that once costs more than a year of the twenty minutes.
There is a second cost that is easier to miss. A business that cannot bound a recall also cannot defend itself against one. If you can show that only four hundred and ninety-six units of the affected batches ever left your building, that is the size of the problem. If you cannot, the size of the problem is whatever anybody claims.