runbookify
← All plans
Warehouse & Inventory Management / Lot, Batch, Expiry & Serial Tracking

Lot & Batch Capture at Receipt: Traceability From the First Minute

Capture lot/batch number, manufacture and expiry dates, and the supplier COA reference on every received line; validate the lot format and expiry, then a quality lead approves before it posts to lot-tracked on-hand.

IntermediateA weekendBuilds onNext.jsSupabaseResend
What you'll build

An internal web tool where receiving clerks capture lot/batch, manufacture and expiry dates, and the COA reference per received line; the tool validates the lot format and that expiry isn't blank or past; a quality/receiving lead reviews and approves; and you export a clean lot-tracked receipt CSV plus a full audit trail.

Gated download

Enter your email — the plan downloads instantly and a copy lands in your inbox.

By submitting your email you'll also receive the weekly runbookify newsletter. You can unsubscribe at any time.

Before you start

  • A Supabase account (free)
  • A Vercel account (free)
  • Exports you already have: a receipts/PO-lines CSV (or a Google Sheet), and your lot/expiry data from labels or COAs
  • Your lot-format rules and the list of SKUs that must be lot-tracked
  • Claude Code or any AI coding agent

The problem this kills

A pallet hits the dock. The clock on traceability starts the moment it's in the building — but in most warehouses the lot number, the manufacture date, the expiry date, and the supplier's certificate of analysis (the COA — the document proving the batch met spec) live on a label, a printout, or in someone's head. They get keyed in later, if at all. By the time quality or a customer asks "which lot did this ship on, and when does it expire?" the trail is cold.

That's where the expensive failures hide. A short-dated batch slips onto the shelf because nobody flagged the expiry. A lot that should never have been received without a COA gets put away anyway. A recall lands and you can't say which receipts the affected lot touched. The same PO line gets received twice under two different lot numbers and your on-hand is quietly wrong. None of this is anybody's fault exactly — it's that the capture happens too late, by hand, with nothing checking it.

You don't need a six-figure WMS module to fix this. You can build the capture-and-validate step yourself, this weekend.

What you'll build

An internal web tool your receiving team logs into. You import the receipts or PO lines you're expecting (the CSV you already pull, or a Google Sheet). For each line a clerk captures the lot/batch number, the manufacture and expiry dates, and the COA reference — straight off the label or COA as the pallet comes in. The tool checks the work as they type: it confirms the expiry isn't blank or already past, that the lot matches your format rules, and — for SKUs you've flagged — that a lot is actually required and a COA is on file.

Clean lines wait in a review queue. A quality or receiving lead works the screen, sees every flag spelled out, and approves or holds each line. Only approved lines become a lot-tracked receipt you export as a CSV in the exact columns your system of record expects, alongside a complete audit trail. It handles the real-world mess too: partial receipts against one PO line, the same line received in several lots, and a hard duplicate guard so the same PO line + lot can't be posted twice.

What's inside the Implementation Plan

The downloadable plan is a single markdown file you paste into an AI coding agent. It opens by interviewing you about your own receiving process — your lot-number format, which SKUs must be lot-tracked, how your COA reference looks, your typical and peak receiving volumes, who's allowed to approve, and your messiest edge cases — and then it reads a short spec back for your thumbs-up before it builds a thing. That's the difference between a tool shaped to your warehouse and a generic template you have to fight.

From there it walks the agent through the data model (receipts, PO lines, captured lots, and approvals), the importer, the capture screen with live validation, the lot-format and expiry rules engine, the required-lot/COA logic for flagged SKUs, the duplicate guard, the review-and-approve queue, and the final lot-tracked receipt export. Every step ends with a ready-to-copy prompt. There's a full "No API yet?" path: import receipts from a sheet, export the lot-tracked receipt as a clean CSV, and you never have to touch your WMS or ERP API to ship.

The governance it includes (this is the point)

This is traceability — the controls are the product. The plan builds them in: a login so only your team can use it; row-level security so each organization only ever sees its own receipts; a complete audit trail of who captured, validated, approved, held, and exported, and when; a hard human-approval gate so nothing posts to lot-tracked on-hand until a quality/receiving lead signs off; and a duplicate guard (on PO line + lot) so the same receipt can't be processed twice. A line that fails format or expiry validation physically cannot be exported until someone with authority clears it. That's the recall-ready audit story your quality manager wants.

Who it's for

Receiving clerks, quality and compliance staff, and inventory control owners who need every unit traceable from the first minute it's in the building. If you can explain to a new hire what a good lot number looks like and which products you'd never put away without a COA, you can build this — no developer required.

You've got this — open the plan, paste the first prompt, answer a few questions about how your receiving actually runs, and you'll watch your first lot-tracked receipt validate itself.

Gated download

Enter your email — the plan downloads instantly and a copy lands in your inbox.

By submitting your email you'll also receive the weekly runbookify newsletter. You can unsubscribe at any time.