Batch Traceability
Batch traceability provides end-to-end tracking of materials from supplier delivery through production to customer shipment. This is critical for food safety, quality control, regulatory compliance, and efficient recall management.
Batch Traceability Overview
Batch traceability is an optional feature that, when enabled, adds lot tracking, FIFO consumption, expiration date management, and recall simulation capabilities to your platform. Enable it in Settings > Features.
- Navigate to Settings > Features.
- Enable the Batch Tracking toggle. This activates the batch traceability system across the platform.
- Optionally enable Expiration Date Tracking to monitor material and product shelf life.
- Once enabled, the following capabilities become available: Lot/batch number tracking on all materials and products, FIFO consumption (oldest batches are used first in production), Expiration date alerts on the Dashboard, and Recall simulation reports for tracing contaminated batches.
- Material batches are created automatically when you receive deliveries from suppliers.
- Product batches are created automatically when production batches are completed.
Material Batches
Material batches represent specific lots of raw materials received from suppliers. Each batch has a unique identifier, quantity tracking, and optional expiration date.
- Navigate to a material's detail page and find the Batches section.
- Each batch shows: Batch/Lot Number (from the supplier), Material Name, Quantity Received (original amount), Quantity Remaining (current amount after consumption), Expiration Date (if applicable), and Supplier Delivery link.
- Batches are consumed using FIFO (First In, First Out) — when production uses this material, the oldest batch is consumed first.
- As batches are consumed in production, the Quantity Remaining decreases automatically.
- Batches approaching their expiration date trigger alerts on the Dashboard.
- Click on a batch to see its full history: when it was received, how much has been consumed, and in which production batches it was used.
Product Batches
Product batches are created when production is completed. They track finished product lots with production dates, expiration dates, and links back to the production batch that created them.
- Navigate to a product's detail page and find the Batches section.
- Each product batch shows: Batch Number (auto-generated or from production batch), Quantity Produced (original), Quantity Remaining (after shipments), Production Date, Expiration Date (if applicable), and Linked Production Batch.
- Click on the Linked Production Batch to see which materials (and their specific batches) were used to produce this product batch.
- When products are shipped to customers, the system tracks which product batches were included in each shipment.
- This bidirectional traceability (supplier → material batch → production batch → product batch → customer shipment) is the foundation of recall management.
Recall Simulation
The recall simulation feature lets you trace the entire downstream chain from a specific material batch. If a supplier notifies you of a contamination issue with a particular lot, you can instantly identify all affected products and customers.
- Navigate to the Batch Traceability or Recall section (accessible from the sidebar or the material batch detail page).
- Select the material batch you want to trace (e.g., a specific lot number flagged by a supplier).
- Click Run Recall Simulation (or Trace Batch).
- The system traces the full chain: Material Batch → Production Batches that used this material → Product Batches that were produced → Shipments/Customers that received these products.
- A complete recall report is generated showing every affected entity in the chain.
- The report includes: affected production batches (with dates and quantities), affected product batches (with remaining quantities), and affected customers (with shipment details).
- Use this report to quickly notify affected customers, quarantine remaining stock, and take corrective action.
- You can export the report for regulatory authorities or internal documentation.
Batch Quality Status
Every material and product batch has a quality status that determines whether it can be used in production or shipped to customers. Only batches with Released status are available for FIFO consumption.
- Navigate to the Product Batches or Material Batches page.
- Each batch row has a Quality Status dropdown with four options:
- Pending Check — the batch is awaiting quality inspection. Not available for FIFO.
- Released — the batch has passed inspection. Available for production use and shipment.
- On Hold — the batch is temporarily blocked (e.g., suspected defect). Not available for FIFO.
- Rejected — the batch has been rejected. Not available for FIFO.
- Select the desired status from the dropdown — the status updates instantly.
- Expired batches (past their expiration date) are also automatically excluded from FIFO selection, regardless of quality status.
QR Codes for Batches
You can generate a QR code for any batch containing its batch number. The QR code can be downloaded as a PNG file for use in your warehouse or production floor.
- On the Product Batches or Material Batches page, find the desired batch.
- Click the QR icon button in the actions column.
- A dialog will open displaying the batch QR code.
- Click Download QR to save the QR code as a PNG file.
- The QR code contains the batch number and can be scanned with any QR scanner.
Batch Label Printing
For product batches, you can print a label containing the batch number, product name, production and expiration dates, and a QR code.
- On the Product Batches page, find the desired batch.
- Click the Printer icon button in the actions column.
- A label preview will open showing the batch number, product name, dates, and QR code.
- Click Print Label — your browser's standard print dialog will open.
- The label is optimized for 80×50 mm print size.
Quality Checks & Certificate of Analysis
For each product batch, you can maintain a quality checks log and generate a Certificate of Analysis (CoA) as a PDF document.
- On the Product Batches page, click the View (eye) icon for the desired batch.
- In the traceability dialog, scroll down to the Quality Checks section.
- Click Add Check to create a new quality check record.
- Fill in the fields: Check Type (visual, chemical, microbiological, physical, organoleptic), Parameter (pH, color, moisture, etc.), Value (measurement result), Result (Pass / Fail), and Notes.
- After adding checks, click Download CoA to generate a PDF Certificate of Analysis.
- The PDF includes: company information, batch details (number, product, dates, quantity), and a table of all quality checks with results.
Custom Batch Numbers
When creating a production batch output, you can specify a custom batch number instead of using the auto-generated one.
- Navigate to a production batch detail page and click Add Output.
- In the add output dialog, you'll see a Batch Number (optional) field.
- Enter your desired batch number. The system will check for uniqueness.
- If left empty, the number will be auto-generated in the format `PROD-XXXXXX-NNN`.
- If the entered number already exists, an error will be displayed.
Expiration Alert Configuration
You can configure a per-product alert threshold for expiration date warnings. This allows you to receive earlier notifications for perishable products.
- Navigate to the Products page and open the desired product.
- Find the Expiration Alert (days) field next to the shelf life field.
- Enter the number of days before expiration to trigger an alert.
- If left empty, the global threshold (default 7 days) is used.
- The Dashboard alerts section will show batches whose expiration date falls within the configured threshold.