Good lot and expiry control means every unit in your warehouse has a lot and an expiry date from the moment it is received. The system picks the earliest-expiring lot first, stock under question cannot be sold, and you can trace any lot to every customer in minutes. Software can enforce these rules, or it can let people skip them. Buy the kind that enforces them.
Which US rules make lot and expiry control mandatory?
No single rule says "use FEFO software". Several rules together make lot control unavoidable for a US wholesaler:
| Rule | What it requires | What it means for software |
|---|---|---|
| 21 CFR 211.150 | Oldest approved stock distributed first, with temporary and appropriate deviation allowed; a system to determine the distribution of each lot for recall | Lot-controlled picking and a lot-to-customer trace |
| 21 CFR 205.50 | A quarantine area for outdated, damaged, deteriorated, misbranded or adulterated drugs, kept physically separate; written recall procedures; records available for inspection for 3 years | Quarantine status that blocks sale; record retention |
| 21 CFR Part 7 | Recall classes, depth and effectiveness checks | A fast forward trace from lot to consignees |
| DSCSA (21 U.S.C. 360eee-1) | Product identifiers with lot and expiry; package-level transaction data; 6-year records | Scanning of GS1 DataMatrix and a link to your DSCSA data |
| USP <1079> | Good storage and transport practice, including temperature excursion evaluation | Temperature zones and logs linked to stock |
State boards of pharmacy license wholesalers and may add their own rules on top of these.
What is FEFO and why not FIFO?
FIFO (first in, first out) ships the oldest receipt first. FEFO (first expiry, first out) ships the lot with the nearest expiry date first. In most weeks the two give the same answer. They differ when a supplier ships a short-dated lot after a long-dated one. If you follow FIFO then, you ship the long-dated stock and the short-dated lot expires on your shelf. The cGMP wording is "oldest approved stock", and most distributors meet it with FEFO plus a documented reason for any exception.
Good software also enforces minimum remaining shelf life per customer. Many hospital and chain contracts refuse stock with less than a set number of months left.
What should lot and expiry software do at each step?
- Receipt: read lot and expiry from the GS1 DataMatrix, or require them by hand. Reject expired or short-dated lots against your receiving rule. Put new stock into quarantine when your procedure requires inspection first.
- Quality release: only authorized users can move stock from quarantine to released. The system records who, when and why.
- Storage: put-away to a location that matches the product's temperature class (ambient, 2–8°C, frozen), with a temperature log for each zone.
- Picking: suggest the lot by FEFO. If a user overrides it, record the reason. Block expired, quarantined and recalled lots completely.
- Invoicing: print lot and expiry on the invoice or packing list, and store them on the invoice line.
- Returns: receive returns into quarantine against the original invoice. Release them only after inspection and, for saleable returns under DSCSA, identifier verification.
- Expiry management: send near-expiry alerts at 3, 6 and 12 months so you can return, discount or transfer stock in time.
- Recall: put one lot on hold and list every customer and quantity that received it.
How do the main software categories compare?
Pharmaceutical wholesalers typically choose from four kinds of system. None is right for everyone.
| Category | Typical strengths | What to check |
|---|---|---|
| General mid-market ERP with lot-tracking and DSCSA add-ons | Broad accounting, large partner networks, many integrations | Whether quarantine, FEFO and recall are standard features or custom work, and the partner implementation cost |
| Distribution ERP with pharma features | Built for wholesale: pricing, contracts, EDI, often DEA and DSCSA features | Deployment model (cloud or hosted), user pricing, and how DSCSA data is exchanged |
| Pharma-specific ERP | Batch, expiry, QC release and recall workflows ready to use | Depth of accounting, US tax and US-specific integrations |
| Standalone DSCSA / serialization service | EPCIS exchange, verification and six-year serialized records | It does not run your stock, orders or invoicing. You need an ERP next to it |
Many small wholesalers combine an ERP from one of the first three rows with a DSCSA service from the fourth.
What questions should you ask in a software demo?
- Can an invoice be posted without a lot number? The answer should be no.
- Can a user pick a quarantined or expired lot? What happens when they try?
- Who can release quarantine, and where is that recorded?
- Show me every customer who received lot X, including free goods, samples and transfers, and show me what is left on hand.
- How are GS1 DataMatrix barcodes read at receipt and at dispatch?
- How does the system connect to our DSCSA provider?
- Can we export the full audit trail for an inspector?
- What happens to stock levels and lot records when an invoice is cancelled or a customer returns goods?
How Asli Pharma ERP helps
Asli Pharma ERP is a pharma-specific cloud ERP. It records lot and expiry at receipt, picks by FEFO, and holds stock in quarantine until an authorized QC release. It supports GS1 DataMatrix scanning, cold-chain zones with a temperature log, and batch recall with a full customer trace and notices. Approvals and an audit trail cover each step. It runs today at a licensed UAE drug store. For US customers, DSCSA data exchange through an integration partner and US sales tax through Avalara or TaxJar are on the roadmap and not yet available.
Frequently asked questions
Is FEFO required by US regulation?
The cGMP rule 21 CFR 211.150 requires the oldest approved stock to be distributed first, with temporary and appropriate deviations allowed. For products with expiry dates, most wholesalers apply this as first-expiry-first-out (FEFO), because the earliest-expiring lot is not always the oldest received. Customer contracts often add minimum remaining shelf-life rules on top.
What is the difference between lot tracking and serialization?
Lot tracking records which batch each unit belongs to and where each batch went. Serialization gives each saleable pack a unique serial number. DSCSA requires package-level serialized data between most trading partners, but lot and expiry tracking is still what drives picking, expiry control and most recall work.
What should quarantine mean in the software?
Quarantined stock should be visible in inventory but impossible to pick, sell or transfer until an authorized person releases it with a recorded reason. 21 CFR 205.50 requires outdated, damaged or adulterated drugs to be quarantined and physically separated until they are destroyed or returned.
Do I need a pharma-specific ERP or can I add modules to a general ERP?
Both approaches work. A general ERP with lot-tracking and DSCSA add-ons suits companies that already run it or need wide accounting depth. A pharma-specific ERP comes with quarantine, recall and expiry workflows already set up. Compare them on the workflows in this guide, not on feature lists.
How do I test lot traceability before buying software?
Ask for a live demonstration using your own sample data. Receive two lots of the same product, sell from both, then ask the system to list every customer who received one lot and the quantity still on hand. Time it, and check that free goods and returns are included.
Sources
- 21 CFR 211.150: distribution procedures (Cornell LII)
- 21 CFR 205.50: minimum requirements for wholesale drug distributors (Cornell LII)
- 21 CFR 7.3: recall definitions (Cornell LII)
- 21 U.S.C. 360eee-1: DSCSA requirements for trading partners (Cornell LII)
- GS1 US: Implementing GS1 standards to meet DSCSA guidelines
- USP General Chapter 1079: risks and mitigation strategies for storage and transportation
- FDA: Drug Supply Chain Security Act overview