DEV Community

Isaac Mwendwa Muthui
Isaac Mwendwa Muthui

Posted on Originally published at factoraerp.com

QA Holds That Actually Hold: Modelling Lot Status So Bad Batches Cannot Ship

By Isaac Muthui, CEO, Tamalaki Business Network Ltd. Originally published at factoraerp.com.

If you build inventory, WMS or ERP software for manufacturers, here is a bug class worth designing out: a batch that failed (or has not finished) quality control gets shipped anyway. In small food and agro factories in Kenya, where I work, the lab test is rarely the weak point. The weak point is that "on hold" is a note somewhere, not a state the stock actually has.

This post covers two things: how to model hold status so held lots physically cannot ship, and the seven-question release checklist that the operations side runs before a batch leaves the warehouse. The checklist is the spec; the data model is how you enforce it.

Model hold as a stock state, not a comment

A common anti-pattern is a free-text qc_notes column or a boolean qc_ok that nothing downstream reads. The picker's screen queries available quantity, the hold is ignored, and the system gives everyone false comfort.

A sturdier approach:

  • Stock is tracked per lot. Every quantity row carries a lot_id with production date, line, shift and expiry.
  • Each lot has a QA status with a small, explicit set of values, for example ON_HOLD, RELEASED, QUARANTINED, REJECTED.
  • Hold is the default. When finished goods are received from production, the lot is created as ON_HOLD. Release is an explicit transition, never an implicit one.
  • Available-to-promise excludes non-released lots. Allocation, picking and delivery-note generation only ever see quantity where qa_status = RELEASED. Enforce this in the query layer or database view that every dispatch path uses, not in one UI screen.
  • Transitions are audited and permissioned. ON_HOLD -> RELEASED requires a role (for example QA lead or deputy) and writes an immutable event: user, timestamp, test results referenced, exceptions accepted.
  • Holds can be applied from outside. A complaint on a related lot, or a problem with a raw material lot, should be able to push every downstream finished-goods lot back to QUARANTINED via your genealogy (lot-to-lot) links.

A minimal sketch:

-- illustrative schema, not a production design
CREATE TYPE qa_status AS ENUM ('ON_HOLD','RELEASED','QUARANTINED','REJECTED');

CREATE TABLE lot (
  id           uuid PRIMARY KEY,
  item_id      uuid NOT NULL,
  produced_at  timestamptz NOT NULL,
  expires_on   date,
  qa_status    qa_status NOT NULL DEFAULT 'ON_HOLD'
);

CREATE TABLE lot_status_event (
  id          bigserial PRIMARY KEY,
  lot_id      uuid NOT NULL REFERENCES lot(id),
  from_status qa_status NOT NULL,
  to_status   qa_status NOT NULL,
  actor_id    uuid NOT NULL,
  reason      text,
  created_at  timestamptz NOT NULL DEFAULT now()
);

-- every dispatch path reads from this view, never from raw stock
CREATE VIEW available_stock AS
SELECT s.item_id, s.lot_id, s.location_id, s.qty
FROM stock s JOIN lot l ON l.id = s.lot_id
WHERE l.qa_status = 'RELEASED';
Enter fullscreen mode Exit fullscreen mode

The test of the design is simple: can a user who loads the lorry ship a held lot without anyone else's involvement? If yes, you have a label, not a hold.

The rest of this post is the operational checklist your model needs to support. It is an operations guide, not legal advice. Regulators and standards bodies in Kenya, such as KEBS, and sector rules such as those for dairy, expect product to be identifiable by batch, and non-conforming product may need to be held, reworked or withdrawn.

The 7-question QA hold checklist

Run these questions for each batch (or lot) before you allow it onto a delivery note. Keep the answers written down, on paper or in a system, so you can show them later.

1. Do we know exactly which batch this is?

Every pallet, carton or bag in the release should carry a batch or lot number that matches your production record. Check:

  • The batch number on the product matches the batch number on the production sheet.
  • The production date, shift and line are recorded against that batch.
  • No unlabelled or mixed-batch cartons are hiding in the pallet.

If you cannot identify a carton, you cannot release it. Set it aside until you can.

2. Has QC actually passed this batch?

"We usually pass" is not a result. Confirm that the tests your process requires for this product have been done and recorded as passed. Depending on your product, that might mean moisture for flour, fat and acidity checks for milk products, Brix and pH for juice, or microbiology results where your plan requires them.

Ask:

  • Are all required results recorded, with the date and the name of the person who did them?
  • Are any results pending, such as lab work sent to an external laboratory?
  • Did any result fall outside your specification, and if so, what was decided?

A batch with pending results stays on hold.

3. Is the labelling and date-marking correct?

Labelling errors are one of the most common reasons product is pulled back. The East African general standard for labelling prepackaged foods (EAS 38) and your product's own standard set out what a label should carry. On the warehouse floor, check the basics:

  • Product name and pack size are correct for this batch.
  • Batch number and production date are printed and legible.
  • The "best before" or "use by" date is correct for the shelf life you have validated, not copied from yesterday's run.
  • Any required marks or statements for your product are present.

Pick a few units from different cartons, not just the top layer.

4. Is the packaging intact?

A perfect product in a damaged pack is a damaged product. Before release, inspect a sample for:

  • Torn sachets, leaking pouches, swollen or dented containers.
  • Broken seals or caps that are not fully closed.
  • Wet, crushed or stained cartons that suggest a spill or poor storage.

If you find damage, decide whether the affected units are removed and the rest released, or whether the whole batch needs a closer look. Record the decision.

5. Does the quantity match the order and the stock record?

Quality is not only about the product. It is also about sending the right amount of the right thing. Check:

  • The quantity being released matches the production record minus any samples, rejects or rework.
  • The quantity on the delivery note matches what is physically loaded.
  • The batch being sent follows your stock rotation rule (for most perishable goods, first-expiry-first-out).

Mismatches here are often the first sign of an earlier problem: a miscount on the line, an unrecorded reject, or the wrong pallet picked.

6. Have all holds and quarantines been cleared?

Sometimes a batch is placed on hold for a reason outside routine testing: a customer complaint about a related batch, a raw material problem from a supplier, an equipment fault during the run, or a pest sighting in the store. Before release:

  • Check whether any open hold or quarantine applies to this batch or to the raw materials used in it.
  • Confirm the hold was closed by the right person, with a reason.
  • Make sure quarantined stock is physically separated and clearly marked, not just "known about."

A hold that only exists in someone's memory is not a hold.

7. Who released it, and can we prove it?

The final question is about accountability. Every release should record:

  • Who approved the release (by name and role).
  • The date and time of release.
  • Which checks were done and any exceptions accepted.

This document trail is what you will reach for if a customer, auditor or regulator asks about the batch later. It is also the starting point of any traceability exercise or mock recall.

Make the checklist hard to skip

A checklist only works if the busy day cannot bypass it. A few practical habits help:

  • Default to hold. New finished goods start in "on hold" status. Release is an active decision, not the default.
  • Separate physically. Use a marked hold area or coloured tags for held stock, so pickers cannot grab it by accident.
  • Name the releasers. Agree who can release product (for example, the QA lead and one deputy). Others cannot.
  • Link release to dispatch. The delivery note should only be issued for released batches. If your store can issue a delivery note for held stock, the hold is decorative.
  • Review exceptions weekly. Look at any batches released with exceptions, or held for a long time, and ask why.

Illustration (not real data): imagine a juice packer whose QA lead is off sick. Without a hold status, the store clerk sees pallets on the floor and loads them for a waiting distributor, unaware that the Brix result for one batch was outside specification. With a hold status linked to stock, that batch simply does not appear as available to dispatch, so the clerk cannot pick it, however urgent the order.

Where an ERP helps

You can run this checklist on paper, and many factories should start there. The challenge comes as volumes grow: more batches, more shifts, more products, more customers. Paper holds and spreadsheet flags drift away from the actual stock.

FactoraERP links QC results and holds directly to stock. When a batch is on hold, it is not available for picking or delivery notes, so it cannot be dispatched by mistake. When QA releases it, the release is recorded with the user, time and results, and the batch becomes available. Because every batch is traceable from raw material to customer, your release record also supports traceability and recall work. If you want to see how that works for your products, you can request a walkthrough at factoraerp.com.

FAQ

What is a QA hold in a food factory?
A QA hold is a status that keeps a batch of finished goods (or raw materials) from being used or sold until quality checks are complete and someone with authority releases it.

Who should be allowed to release a batch?
Usually the QA lead or a named deputy. The key point is that release authority is limited to specific people and every release is recorded with their name and the time.

What should happen to a batch that fails a check?
It stays on hold while you decide on the next step, which may include rework, downgrading, destruction or, if it has already left, withdrawal. Record the decision and the reason. For regulated products, follow the guidance of the relevant authority.

Can a small factory run a QA hold without software?
Yes. A marked hold area, a simple release log and a rule that delivery notes are only issued for released batches will cover the basics. Software becomes useful when batches and orders grow and paper records drift from physical stock.


Isaac Muthui, CEO, Tamalaki Business Network Ltd

Top comments (0)