Home / Help Center / pos-app-bakery / bakery / Lot Traceability
🔗 bakery

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.

📍 Menu path: Bakery → Lot Traceability
👤 Who uses it: All roles with access to the Bakery menu (the page itself does not add extra permission checks beyond the sidebar's feature/tier gate)
🏷️ Plan tier: enterprise+

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

Step-by-Step Guide

1 Search by batch number (typical recall workflow)

  1. Make sure the mode toggle is set to By Batch Number.
  2. Get the exact batch/lot number from the supplier's recall notice, invoice or purchase order.
  3. Type it into the search box and press Enter or click Search.
  4. 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

  1. Switch the mode toggle to By Ingredient Name — this clears any previous search and results.
  2. Type the ingredient's name (e.g. "Wheat Flour") and press Enter or click Search.
  3. 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

  1. Click a Run Card's header to expand it and see every ingredient used in that run.
  2. 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 / ButtonWhat it does
By Batch Number / By Ingredient Name toggleSwitches the search mode; changing it clears the current query and results.
Search boxEnter the exact batch number or the ingredient name to search for, depending on the selected mode.
Search buttonRuns the search; also triggered by pressing Enter in the search box. Disabled while a search is in progress.
Result count badgeShows how many production runs used the searched batch/ingredient.
Run Card headerProduction 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" guideShown only before any search has been run; a 4-step reminder of the recall process using this page.

Tips & Best Practices

Troubleshooting & FAQ

Clicking Search does nothing.
The search box was empty — BazaarPOS shows a toast asking you to enter a batch number or ingredient name first.
No production runs found, but I know we used this ingredient.
Lot data is only recorded from the point a production run is marked Done on the Production Schedule. Runs completed before that feature was in use, or where the run was never marked Done, will not appear.
Searching by batch number returns nothing.
The search requires an exact match to the batch number as recorded on the ingredient's purchase/receipt. Double-check the number against the supplier invoice or purchase order and retry.
My results disappeared when I switched modes.
That is expected — switching between "By Batch Number" and "By Ingredient Name" intentionally clears the query and results so you start a clean search in the new mode.

🧑‍💻 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.