Short answer. The lot is an entity: product, supplier number, a single date, a state, an original reception; it is not a text field on a movement. Every stock movement, receipt, issue, transfer, return, names the lot and the location, and stock per lot is the sum of movements, as in the stock guide. At reception, the case is scanned: the GS1-128 code carries product, lot number and date under standard identifiers, and the application reads them at once; without a code, entry is guided and an internal label is printed. The lot has states: available, quarantine, blocked, expired, depleted; a quarantined lot exists in stock and is available to nobody. Exit is proposed by closest expiry date, under each customer’s remaining-shelf-life rule, sixty days for one, none for another; the picker can change it, but writes why, and scans the lot that goes out. The lot is written on the delivery note and invoice line. The recall is a query: where the lot is, who received it, how much; blocking comes first, and returns are linked.
This guide is for the wholesaler in food, cosmetics, pharmaceuticals or agricultural inputs whose products carry a date, the distributor delivering to retailers demanding on remaining shelf life, the manufacturer who must be able to recall a lot, and the founder based in France who wants to see at a glance what is expiring in their depots in Algiers and Sétif. It does not repeat how to keep stock right, nor how to structure the catalogue into model, variants and packagings, described in the stock guide and the product record guide; it adds the dimension those two guides lack for anything with a date, and it extends our software engineering page. It does not cover the regulatory obligations of each sector: which categories are lot-tracked and which go through quarantine are the company’s decisions, taken with its advisers.
Receiving a lot properly, in six steps
Everything starts at the receiving dock: a badly received lot cannot be fixed at exit.
Scan the case. Many cases carry a GS1-128 code: according to GS1’s public list of application identifiers, the product is encoded under identifier 01 on fourteen digits, the lot number under identifier 10 up to twenty characters, and the expiry date under identifier 17 on six digits, year, month, day; some carry a best-before date under identifier 15 instead. One scan fills the three fields; when the case has only a product code, lot and date entry is guided, and the application refuses a past date or a date without a lot. Create or find the lot: a lot is a product plus a supplier number; if it already exists with another date, that is an anomaly to settle, not a second date. Count and match: the received quantity is compared with the order, and the gap is recorded on the reception, never silently corrected.
Decide the state: available, or quarantine if the category requires inspection at reception; it is a rule written by the manager in the first week, not the storekeeper’s choice. Put away and label: the location is recorded per lot, and an internal label with lot and date is printed, following the printing guide, when the case has no readable code. Write the movement: a dated receipt with product, lot, quantity, location, reception and author, in the ledger of the stock guide, where the lot column can no longer be empty for tracked categories.
Picking 120 units: four lots, one rule, one order of exit
The figure follows a pick on 10 November. The picker no longer looks for the right case, they confirm a proposal.
Four lots of the same product are in stock. The first is in quarantine, awaiting the inspection result: it exists, it counts in inventory, and it is available to nobody. The second expires in ten days: it is below this customer’s remaining-shelf-life rule, sixty days, and is excluded from this pick, but offered to a customer without a rule or to clearance, because a rule per customer is not a rule for everyone. The last two are compliant and go out in date order: forty from the closest, eighty from the next.
The proposal writes two movements, each with its lot, its location and the delivery note line. The picker can change the order, a damaged case, a customer who asked for a specific lot, but writes why, and the deviation appears in the Monday review. At exit, the lot is scanned, and a lot different from the proposed one without justification is refused. The depot’s offline terminals follow the same rules with their local copy, following the offline guide. Lots, dates, quantities and rule are a constructed example.
«A quarantined lot exists in stock and is available to nobody; a lot too short for this customer may be fine for another.»
Six real situations, and what the application does
Every row is a sentence heard in a warehouse, and the answer is a construction, not a shelving instruction.
The oldest lot is at the back: exit is proposed by date, the location is known per lot, and the deviation is justified; the case thrown out a month becomes a measure that falls. The customer refuses a short date: the remaining-shelf-life rule is carried by the customer record, from the same reference data as the B2B ordering guide, and the short lot is excluded before the dock. The supplier recalls a lot: blocked within the minute, list of customers and quantities, linked return notes.
The lot has not been inspected yet: the quarantine state makes it invisible to sales, and its release is traced, who, when, on which result. Two lots mixed on one shelf: the location is per lot, scanning the lot at exit is mandatory, and mixing is refused at put-away. The customer asks which lot they got: the lot is on the note and invoice line, and the history per customer answers; complaints in the after-sales guide start from that lot. For the cold chain, temperature readings attach to the same lot, following the cold chain guide.
The recall of lot L2409A: fourteen minutes, not three days
The figure follows a supplier recall received at 9:12. Nothing is dug through: everything is in the movement ledger.
Block first: at 9:13, the lot switches to blocked, with the reason, and is no longer sellable anywhere, including on offline terminals as soon as they sync; blocking is a right of the manager and the quality lead, following the roles guide. List: one query on the movement ledger gives the original reception, the 140 units still in stock in Algiers, the 120 transferred to Sétif and all delivered, the seven delivery notes and the five customers with quantities received; the morning truck, carrying 24 units of the lot, is called back before delivery.
Notify: a message goes to each customer through the channel described in the notifications guide, with the lot, quantities and what to do; the customer without WhatsApp is called, and the call is recorded. Returns: one return note per customer is created, linked to the lot and the original delivery notes, and returned units come in as blocked, never as available. The same ledger answers the reverse question, which lots did this customer receive, and the recall query is dry-run during the seventh week, before it is needed. Lot, customers, quantities and minutes are a constructed example.
«A recall is a query, not an investigation: every movement carried the lot, and the customer is at the end of every movement.»
Traceability by lot, in five layers
Movements are the accented layer: if a single one forgets the lot, exit by date lies and the recall becomes an investigation.
Lot. An entity with product, supplier number, single date, state, supplier and original reception; a lot is not deleted, it is depleted or archived. Movements. Every receipt, issue, transfer and return names the lot and the location; stock per lot is the sum; for tracked categories the column is mandatory, and the database refuses, not an instruction. States and rules. Available, quarantine, blocked, expired, depleted; minimum remaining shelf life per customer; alerts at ninety, sixty and thirty days before the date, computed every night by the jobs of the background jobs guide and sent to the manager, with the list of lots to clear or to offer on promotion.
Exit by date. Proposal by closest date under the customer’s rules; change allowed, justified; lot scanned at exit. Documents and recall. Lot on the delivery note and invoice line, printed and in the customer space; recall query; linked returns; history per customer and per lot. Losses to expiry, dock refusals and recall time are three figures of the manager’s dashboard, each with a single definition.
Tracing by lot in 2027, in weeks
Seven weeks, the first without code, and two for the lot and reception, because that is where everything is decided.
- What the manager sees: lots expiring at ninety, sixty and thirty days, lots in quarantine, justified exit deviations, and a recall that fits in one query.
- What the storekeeper can no longer do: receive a date without a lot, issue a lot without scanning it, mix two lots in one location, sell a quarantined lot.
- What is measured: losses to expiry, dock refusals for short dates, recall time, unknown lots at take-over and their fate.
Week 1, rules: with the manager and the storekeeper, which categories are lot-tracked, which go through quarantine, which remaining shelf lives customers require, which alert thresholds; no code. Weeks 2 and 3, lot and reception: the lot entity, GS1-128 scan and guided entry, states, internal label, receipt movement with lot. Week 4, exit by date: proposal, rules per customer, lot scanned at exit, justified deviation. Week 5, documents: lot on notes and invoices, history per customer, alerts to the manager.
Week 6, take-over: a count by lot of tracked categories, dates entered, unknown lots flagged as such rather than invented, with the same dry run as the import guide. Week 7, recall and measurement: the recall query dry-run on a real lot, linked returns, and the three Monday figures. Going live follows the delivery guide: one depot first, the others after.
- Why is the lot an entity and not a field?
- Because a lot has a date, a state, locations and an original reception, and a text field on the movement can carry neither a state nor a single date. With an entity, a blocked lot is blocked everywhere at once, and the date is entered only once.
- What is read from the case barcode?
- When the case carries a GS1-128 code, product, lot number and date are encoded under standard identifiers, according to GS1’s public list of application identifiers: 01 for the product, 10 for the lot, 17 for the expiry date, 15 for a best-before date. One scan fills the three fields; without a code, entry is guided.
- Is exit by date imposed on the picker?
- It is proposed, and it is the default rule. The picker can change it, but writes why, and scans the lot that goes out. A change without justification is refused, and deviations are reviewed on Monday.
- One customer requires sixty days of remaining shelf life, another nothing. How?
- The rule is carried by the customer record, not by the product. At picking, lots below this customer’s rule are excluded and offered to other customers or to clearance. Rules are written in the first week.
- How long does a recall take?
- In the example, fourteen minutes: one to block, zero to list, five to notify, eight to create the returns. Because every movement carried the lot. The query is dry-run before it is needed.
- And categories without a date?
- They are not lot-tracked, and the column stays optional for them. Choosing the tracked categories is the company’s decision, taken in the first week with its advisers; this guide does not cover the regulatory obligations of each sector.
- How long to set this up?
- Seven weeks in the typical calendar, the first without code and two for the lot and reception. A company that already has the movement ledger of the stock guide takes less; one starting from an Excel file without lots takes all seven.