Lot Traceability
Lot Traceability answers one question fast in a recall situation: "which finished batches were made using this ingredient batch (or this ingredient)?" — searching by batch number or ingredient name and listing every production run that used it.
Overview
Search in one of two modes — By Batch Number (the exact batch/lot number from a supplier invoice or purchase order) or By Ingredient Name (e.g. "Wheat Flour") — and BazaarPOS lists every production run that consumed it.
Each result is a collapsible Run Card showing the production run's name, its production date and a shortened Run ID; expanding it lists every ingredient used in that run, its batch number (if tracked) and the quantity used.
Lot data is captured automatically the moment a production run is marked Done on the Production Schedule page — nothing needs to be manually logged here for traceability to work.
Before you search anything, the page shows a short "How to use for a recall" guide walking through the exact steps to follow when a supplier issues a recall notice.
Before You Start
- Requires the Enterprise plan tier; below Enterprise, Lot Traceability is hidden from the Bakery sidebar entirely.
- At least one Production Run must have been completed (marked Done) on the Production Schedule for any lot data to exist — this page has nothing to search before that.
Step-by-Step Guide
1 Search by batch number (typical recall workflow)
- Make sure the mode toggle is set to By Batch Number.
- Get the exact batch/lot number from the supplier's recall notice, invoice or purchase order.
- Type it into the search box and press Enter or click Search.
- Review the list of production runs that consumed that batch, along with the date each run happened and the quantity of that ingredient used.
2 Search by ingredient name
- Switch the mode toggle to By Ingredient Name — this clears any previous search and results.
- Type the ingredient's name (e.g. "Wheat Flour") and press Enter or click Search.
- Review every production run that used that ingredient at all, regardless of which specific batch was used each time.
3 Drill into a specific production run
- Click a Run Card's header to expand it and see every ingredient used in that run.
- Each ingredient line shows its batch number (in monospace, if tracked) or "No batch tracked" if it wasn't, plus the quantity used and unit.
Every Field & Button, Explained
| Field / Button | What it does |
|---|---|
By Batch Number / By Ingredient Name toggle | Switches the search mode; changing it clears the current query and results. |
Search box | Enter the exact batch number or the ingredient name to search for, depending on the selected mode. |
Search button | Runs the search; also triggered by pressing Enter in the search box. Disabled while a search is in progress. |
Result count badge | Shows how many production runs used the searched batch/ingredient. |
Run Card header | Production run name (or "Unnamed Run"), production date, a shortened Run ID, and a count of ingredients used in that run. |
Ingredient line (expanded) | Ingredient name, its batch number if tracked (or "No batch tracked"), and the quantity + unit used in that run. |
"How to use for a recall" guide | Shown only before any search has been run; a 4-step reminder of the recall process using this page. |
Tips & Best Practices
- Always search By Batch Number first when you receive a supplier recall notice — it is the most precise way to find every affected production run.
- If you don't have the exact batch number handy, search By Ingredient Name to get a broader (but still useful) list of runs to review manually.
- Remember this only covers production runs marked Done — if your team forgets to complete runs on the Production Schedule, those runs won't show up here.
Troubleshooting & FAQ
Clicking Search does nothing.
No production runs found, but I know we used this ingredient.
Searching by batch number returns nothing.
My results disappeared when I switched modes.
🧑💻 Developer Notes
Source component(s):
frontend-app/packages/pos-react-lib/src/pages/fnb/LotTraceabilityPage.jsx
Backend endpoints used:
GET /bakery/lot-traceability
Related tables (db-core repositories):
ProductionLotUsage
Feature flag key: lot_traceability (requires enterprise plan tier or above)
The component accepts an apiPrefix prop (default /bakery) and queries GET {apiPrefix}/lot-traceability with either a batchNumber or ingredientName query param depending on the selected mode. The underlying ProductionLotUsage table is generic across production types (its productionRunType column supports both bakery and restaurant), so the same traceability mechanism also backs the Wholesale Orders lot-traceability endpoint.