Batch ID tracking
Batch IDs are compliance identifiers scoped to a Production Order + Flavour + Region combination. Each unique flavour in a PO gets one batch ID, and that ID follows a strict three-stage lifecycle: generated, printed, and applied. Batch IDs are how EMS links a specific production run to a specific set of excise stamps — the chain of evidence that CRA auditors follow.
Why batch IDs matter
Canadian excise compliance requires full traceability from an individual excise stamp back to the product it was applied to and the production batch that created it. Batch IDs are the bridge between these layers:
- Stamp to batch. Each excise stamp is associated with a batch ID that tells you exactly which production run it belongs to.
- Batch to product. Each batch ID maps to a specific flavour variant within a specific production order, so you know the exact product — brand, name, flavour, mL, and nicotine strength.
- Batch to AWB. Because the PO references the source shipment's Air Waybill number, the batch ID also connects back to the import record, completing the chain from the border to the shelf.
During a CRA audit, an inspector may pick up a stamped product from a retail shelf and ask: "Show me the production batch, the source shipment, and the stamp allocation for this unit." With batch IDs in EMS, you can answer that question in seconds by searching the batch ID string printed on the label.
If a production order contains three flavours (e.g. Blueberry, Mango, and Watermelon), EMS generates three batch IDs — one per flavour. This granularity matters because stamps are applied per variant, and auditors trace at the variant level.
Generating batch IDs
To generate batch IDs for a production order:
- Navigate to the Batch ID Tracking page from the main navigation.
- Select a production order from the PO dropdown. The dropdown only shows POs that are in Open or In Production status and have not already had batch IDs generated.
- Click Generate.
EMS creates one batch ID for each unique flavour in the selected PO. When generation completes, you will see a confirmation message on screen, for example: "Generated 5 batch IDs covering 2,400 units for PO-0042".
Behind the scenes, the production order is flagged as having its batch IDs generated, which prevents duplicate generation and removes it from the dropdown. The batch IDs appear immediately in the tracking table below.
Only generate batch IDs after the PO's line items are finalized. Once generated, batch IDs are locked to the PO's current flavour list. If you add or remove flavours from the PO after generation, the batch IDs will not update to reflect those changes.
Batch ID format
Each batch ID is a human-readable string built from tokens. The default format is:
The default batch ID looks like: 20260115-7842AB3C-ON-0001
That is: date, followed by the air waybill reference, followed by the region, followed by a sequence number.
The parts that make up a batch ID are:
- Year — four-digit year of generation
- Month — two-digit month
- Day — two-digit day
- AWB — first 8 characters of the source shipment's Air Waybill number
- Region — first 2 characters of the target region (e.g. "ON" for Ontario, "AB" for Alberta, "FE" for Federal)
- Sequence — a 4-digit sequence number, unique within the production order (0001, 0002, 0003, ...)
- Product — first 6 letters of the flavour name (e.g. "BLUEBE" for Blueberry Ice)
You can customise the template in Settings → Batch IDs → Format Template. For example, if you want the flavour in the ID, the result would look like: 20260115-BLUEBE-ON-0001.
If you print batch IDs as barcodes on your labels, keep the format under 30 characters. Long IDs produce dense barcodes that are harder to scan reliably at speed.
Marking as printed
Once you've physically printed batch ID labels for a production run, record that fact in EMS:
- Find the batch ID row in the tracking table (it will be in Generated status).
- Click the printer icon in the Actions column.
- The status changes to Printed.
EMS records the timestamp and the user who performed the action. The labels-printed count defaults to the full quantity for that batch ID — for example, if the batch covers 480 units of Blueberry Ice, the printed count is set to 480.
The printed status is your confirmation that physical labels exist and are ready for application on the production floor. It serves as a checkpoint between the digital record (generated) and the physical action (applied).
Marking as applied
After the production team has physically applied the batch ID labels to the stamped products:
- Find the batch ID row in the tracking table (it must be in Printed status).
- Click the checkmark icon in the Actions column.
- The status changes to Applied.
The applied count defaults to the printed count. EMS records the timestamp and operator for audit purposes.
The lifecycle is strictly linear: Generated → Printed → Applied. Clicking the checkmark on a Generated row does nothing — you must mark it as Printed first. This enforces the physical workflow: labels must exist before they can be applied.
Generated (batch ID is created and linked to the production order, flavour, and region)
↓ Click the printer icon
Printed (labels are physically printed; timestamp and user are logged)
↓ Click the checkmark icon
Applied (labels are physically applied to products; timestamp and user are logged)
Tracking and filtering
The Batch ID Tracking table is your central view of all batch IDs across all production orders. Each row shows:
- Batch ID — the formatted ID string in monospace
- Flavour — the product variant this batch covers
- PO # — the production order number
- AWB — the source shipment's Air Waybill
- Region — the target excise region (Federal, Ontario, etc.)
- Quantity — the number of units this batch ID covers
- Progress bar — visual indicator showing generated / printed / applied progress
- Status — Generated, Printed, or Applied
- Actions — printer icon, checkmark icon, and eye icon (detail view)
You can filter the table by:
- Search text — matches against the batch ID string, flavour name, PO number, or AWB
- Status — show only Generated, Printed, or Applied batch IDs
- Region — show only batch IDs for a specific province or Federal
Filter to "Generated" to see which labels still need printing. Filter to "Printed" to see which labels are waiting for the floor team to apply. This makes morning stand-ups fast — everyone can see what's pending at a glance.
Batch ID detail modal
Click the eye icon on any batch ID row to open the detail modal. This view gives you the complete picture for a single batch ID:
- Batch ID — displayed in large monospace text for easy reading and verification against physical labels
- Flavour — the full variant name (e.g. "Blueberry Ice")
- Region — the target excise region
- PO reference — the production order number, clickable to navigate to the PO
- AWB reference — the Air Waybill number, clickable to navigate to the shipment
- Brand / mL / Nicotine — the full product specification for this variant
- Status — the current lifecycle stage with a colour-coded badge
- Unit coverage — three numbers with a progress bar:
- Total — how many units this batch ID covers
- Printed — how many labels have been printed
- Applied — how many labels have been applied
- Audit timestamps — when the batch ID was generated, when it was marked as printed, and when it was marked as applied, each with the operator who performed the action
The detail modal is read-only — status changes are performed from the main tracking table using the action icons.
Limitations and tips
Keep these constraints in mind when working with batch IDs:
- The lifecycle is strictly linear. You cannot move a batch ID backward — from Applied to Printed, or from Printed to Generated. If a mistake is made (e.g. labels were printed but need to be reprinted), the current status stands and you should note the discrepancy in the PO's notes.
- Once generated, batch IDs are locked to the PO. If you add flavours to a PO after generating batch IDs, the new flavours will not get batch IDs. You would need to create a separate PO for the additional flavours and generate a fresh set of batch IDs for it.
- Partial counts are supported in the backend. The data model supports printing and applying partial quantities (e.g. printing 200 of 480 labels in the first pass). However, the UI currently defaults to the full quantity when marking as printed or applied. If you need to track partial progress, the counts can be adjusted through the API.
- One batch ID per flavour per PO. You cannot generate multiple batch IDs for the same flavour within the same production order. If you need to split a flavour across batches, use separate POs.
If you run many POs per day, develop a habit of generating batch IDs immediately after the PO is created and finalized. This prevents a backlog of POs sitting in "no batch IDs" state, which can delay the floor team when they're ready to print labels.
