Four Reasons Traceability Breaks at the Boundaries
The tracking usually works inside each system. It is the handovers between them that lose the detail, and always in the same four places.
A stock level and a batch level are different things
Your warehouse system knows it holds four hundred units across three batches with three expiry dates. Your online store knows it has four hundred. That simplification is usually correct for selling and completely useless for a recall, because the store cannot tell you which of its orders drew from which batch. The design decision is where the batch is assigned: at pick time in the warehouse, which is accurate and late, or at order time, which is early and needs reservations to hold. Either can work, but it has to be decided rather than assumed, and the assignment has to travel back to the order record.
Capture is a process problem before it is a technical one
A serial number that was never scanned cannot be integrated. In practice the gap is almost always at the counter or the dispatch bench, where a person under pressure can skip the step and the sale still completes. Making capture mandatory in the workflow, giving people a scanner rather than asking them to type sixteen characters, and rejecting a dispatch that lacks required data are process decisions the integration depends on. An integration built on optional capture produces traceability that is right most of the time, which in a recall is the same as wrong.
Expiry changes what allocation means
Selling stock in the order it arrived is the ordinary approach and it is wrong for dated goods. First expired first out means the allocation logic has to consider the expiry date rather than the receipt date, and it has to apply consistently whether the order came from the online store, a wholesale customer or the shop counter. It also means the systems need to agree on minimum remaining shelf life, because a wholesale customer with a contractual requirement for a set number of days remaining will reject a delivery that a purely quantity based allocation happily sent.
Returns are where the chain usually breaks
A serialised item comes back and the question is whether it is the one that went out. Without the outbound serial linked to the order, you cannot verify warranty entitlement, you cannot detect a swapped unit, and you cannot tell whether the returned item belongs to an affected batch. The same applies to dated stock returned from a wholesale customer, which needs its remaining shelf life assessed before it goes back into sellable inventory. Designing the inbound side of traceability is as important as the outbound side and it is routinely left out of scope.