Inventory & traceability

FEFO allocation for pharmaceutical orders

By NextEdge LabsUpdated 7 min read

For Warehouse managers and distribution planners · Compare approaches

TL;DR — what you’ll learn

  • Apply first-expiry-first-out after checking whether stock meets the order's quality, product and delivery requirements.
  • Calculate remaining shelf life at the relevant receipt date, with an explicit convention for date boundaries.
  • Follow a two-lot example showing why the earliest expiry can be unsuitable for one customer but eligible for another.
  • Recheck allocations after delays, holds and order changes, then measure exceptions without hiding expiry exposure.

A distributor allocates the earliest-expiring lot to a customer order. The warehouse follows the pick list correctly, but the customer rejects the delivery because the remaining shelf life is shorter than the agreed requirement. The team followed first-expiry-first-out, or FEFO, without first establishing which lots were eligible for that order.

FEFO is a sequencing rule within an eligible stock population. It should not override an applicable hold, a product-market restriction or an agreed delivery requirement. The practical design has two stages: establish eligibility for the actual order, then select among eligible lots using the approved rotation policy.

WHO's distribution guidance describes FEFO stock rotation. The order-specific eligibility calculations below are an operating design built around that concept. WHO storage and distribution guidance.

Decide what the customer requirement means

“Sixty days remaining” is incomplete until the team agrees the reference date and calculation. Does the requirement apply when the goods leave the depot, reach the customer or complete a receiving appointment? Is it a fixed number of calendar days or a percentage of labelled shelf life? Which contract or approved instruction governs a disagreement?

Store the requirement with its source and effective scope. A sales representative's informal note should not silently replace a controlled customer rule. If exceptions are permitted, establish who may authorise them and what must be recorded before dispatch.

Also resolve how the system interprets expiry labels that show a month and year rather than an exact day. Use the applicable product labelling and approved interpretation. Guessing the first or last day can change eligibility. Keep the original labelled value available alongside any controlled date representation.

Filter stock before sorting it

Create the candidate population at the product, presentation, market and location scope needed for the order. Confirm the applicable quality status and exclude stock already consumed or committed elsewhere. Check any relevant packaging or customer restrictions before applying date logic.

A useful allocation result explains why each candidate passed or failed. That explanation is especially valuable when a planner can see physically present stock that is unavailable for the current order.

Scroll horizontally to see all columns.

Filter stock before sorting it
CheckExample rejection reasonOwner of the missing decision
Product and presentationDifferent pack sizeOrder management
Quality eligibilityApplicable hold remains openAuthorised quality role
Remaining shelf lifeBelow the agreed threshold at expected receiptPlanning and commercial owner
AvailabilityQuantity already reservedAllocation owner
Route feasibilityCannot reach the agreed destination in timeLogistics

Some failures can be resolved by correcting data. Others require an authorised business or quality decision. The application should distinguish them rather than offering one unrestricted override button.

Calculate the two-lot example

Consider an illustrative delivery expected on 20 October 2026. The customer requires at least 60 calendar days remaining at receipt. For this example, the calculation is the expiry date minus the receipt date, excluding the receipt day; the contract and approved date convention must govern a real implementation.

Lot A expires on 15 December 2026. It has 56 days remaining on the expected receipt date: 11 days after 20 October in October, 30 in November and 15 in December. Lot B expires on 31 December 2026 and has 72 days remaining.

Scroll horizontally to see all columns.

Calculate the two-lot example
LotExpiryRemaining days on 20 OctoberEligible for this requirement
A15 December 202656No
B31 December 202672Yes, subject to the other checks

Selecting Lot B does not violate the intended FEFO control. Lot A is outside the eligible population for this order. The warehouse should still see Lot A's expiry exposure and seek an appropriate demand or disposition pathway rather than letting it disappear from the planning view.

Suppose another customer has an agreed 45-day requirement for the same receipt date and all other conditions are satisfied. Lot A may then be the first candidate for that order. Do not treat this as permission to alter customer requirements merely to move stock.

Recheck when the expected receipt date changes

An allocation made today is based on the facts available today. If the delivery date moves, the remaining-life calculation changes. In the example, moving receipt from 20 October to 5 November reduces Lot B's remaining life to 56 days, so it no longer meets the 60-day requirement.

Create explicit recheck triggers for changed receipt dates, holds, quantity changes, cancelled transfers and modified customer requirements. Decide which events require replanning and which can be handled through the existing approval workflow. Make affected allocations visible before the warehouse reaches dispatch.

Avoid recalculating a historical order against today's policy and presenting it as the decision made at the time. Retain the requirement version, date assumption and allocation outcome used for that transaction. A later review can then distinguish a correct earlier decision from a failure to react to new information.

Reserve once across channels and depots

FEFO selection does not solve competing commitments. If ecommerce, a sales team and a depot planner all allocate from separate copies of the same balance, they can choose the correct lot and still promise it several times.

Commit reservations through one authoritative process for the applicable stock scope. Return a reservation reference, allocated quantity and unresolved shortfall. A preview of possible stock should remain distinguishable from a confirmed reservation.

For inter-depot supply, include the transfer's actual availability and receipt assumptions. Stock in transit should not appear as independently available at both depots. The multi-warehouse reservations guide develops this transaction model.

When a reservation is cancelled, release only the quantity and commitment being cancelled. A retry of the same cancellation should not add stock again. These small interface details directly affect whether the next FEFO allocation is trustworthy.

Handle exceptions without erasing the rule

Operators need a path for legitimate exceptions, but the path should record the actual decision. Identify the requested departure, affected order and lot, reason, required approval and conditions. Preserve the original eligibility result.

A customer agreement about remaining shelf life cannot remove a quality hold or authorise distribution of expired goods. Keep different decisions with their responsible owners. For returned stock, the returns disposition guide explains why a commercial credit and inventory eligibility must remain separate.

Do not use one default shelf-life threshold for every customer just because the software supports only one field. Either model the actual rules or narrow the initial rollout to a scope that the configuration can represent accurately.

Test the boundary cases and explain the measures

Before rollout, test lots just below, exactly at and just above the agreed threshold. Include month-end labels, a leap-year date where relevant, a delayed delivery, a partial allocation and a new hold after reservation. Confirm that the expected date convention is applied consistently in the planner and handheld interface.

Track manual allocation changes by reason, customer rejections linked to remaining life and stock approaching expiry without eligible demand. Interpret each measure in context. Fewer manual changes may reflect a better rule, or it may mean operators stopped recording exceptions.

Review a small transaction sample with warehouse and order-management staff. They should be able to explain why the selected lot was eligible and why an earlier-expiring lot was excluded without asking the software team to interpret a database query.

NextEdge Labs can help connect customer rules, stock status and reservation events into this decision trail. Begin with the inventory eligibility model so rotation logic rests on reliable stock information.

Summary and next actions

FEFO works when the system first establishes which stock can satisfy the specific order. The chosen lot should meet the applicable requirements at the relevant delivery date and remain protected from competing commitments.

  • Agree the reference date, units and boundary convention for each remaining-life requirement.
  • Recalculate representative orders manually and explain every excluded lot.
  • Add rechecks for delays, holds and changed customer or order requirements.
  • Test threshold boundaries and reservation conflicts before using the rules across all depots.

Compare this workflow with your current setup

Share the step that takes the most manual work, the systems involved and the exceptions your team handles. That gives us a concrete starting point for comparing approaches.

START A CONVERSATION

Let’s talk about your next build.

Prepare your brief below, then review and send it in your email app to sales@nextlabsonline.com.

SELECTED INDUSTRYPharma & life sciences

Article: FEFO allocation for pharmaceutical orders

THE FIRST CONVERSATION

Your product idea, AI opportunity or automation challenge—and a useful first milestone.

All fields are required.

A few sentences about the problem, your users and timing are enough.

We’ll use your details to respond to your enquiry. Please don’t include patient records, passwords or confidential information. Privacy Policy · Website Terms.

About this guide

NextEdge Labs develops software, integrations and AI-assisted workflows. This guide presents practical workflow analysis with linked source references. Worked examples are illustrative, not client results.

Apply the sources within their stated market and scope, together with your approved procedures and the decisions of the responsible specialists.

Browse all Pharma & life sciences guides or explore our engineering capabilities.