Conclusion first: an EDI control number gap audit in a warehouse starts with stopping, not resending. A missing number tells you a sequence has a hole. It does not tell you a shipment was lost. A duplicate number tells you a number was used twice. It does not tell you your partner processed the freight twice. Every control number gap audit I run follows the same order: separate the ISA, GS, and ST layers, match each number against send logs, then against 997 acknowledgments, then against document status. Resending is the last step, never the first.

I have watched this go wrong three times: someone spots a gap, resends everything that looks missing, and the original files surface from a partner queue the next morning — leaving the warehouse with two copies of the same 940.

Split the Three Layers Before You Touch Anything

A control number is not one number. The ISA number identifies the whole interchange envelope. The GS number identifies a functional group inside it. The ST number identifies a single transaction, one 940 or one 945. A gap at each layer means something different, and mixing them up is how audits turn into guesswork.

Here is the decision table I hand to operations teams:

Gap location Suspect first First action
ISA level Whole interchange never left, or was rejected whole Check transmission log and acknowledgment before touching individual documents
GS level One group failed during mapping or generation Check whether the mapping job died mid-run
ST level One transaction was voided or never generated Check document status for the order behind the number
Duplicate ST Counter rollback, two servers issuing numbers, or a resend that kept the old number Freeze that partner's number range and check for concurrent issuers

Here is the counterintuitive part: an occasional ST gap is often the footprint of something healthy. A test order that failed validation and got voided still consumed a number. The danger is not the gap itself. The danger is a gap nobody can explain. An audit does not ask whether the sequence is continuous. It asks whether every number has a documented destination.

Case One: Seventeen Missing Numbers, Zero Lost Orders

In November 2023, at a 3PL warehouse near Columbus, Ohio, shipping home goods to two retail chains, the operations lead brought me a Monday spreadsheet: seventeen GS control numbers from the previous week were missing. Had they lost seventeen shipments?

We did not resend anything. We exported the week's transmissions and sorted ISA, GS, and ST separately, looked at five numbers on either side of each gap to find clustering, matched those windows against mapping logs, and only then looked at the orders.

Fourteen numbers belonged to test orders that had failed validation in week two after go-live — correctly blocked, but the numbers were already issued. The other three were skipped when a mapping service restarted Friday afternoon and a rerun jumped allocated-but-unused numbers. Not one real order was missing. Had we resent all seventeen, fourteen test documents would have entered the warehouse as live work. That is why my go-live night checklist carries one line in bold: reconcile the gap against logs and document status before anyone says resend.

Partner Never Received It, or You Never Sent It

This is the central question of any control number gap audit, and only three pieces of evidence answer it, in this order of reliability.

First, transmission evidence. Did the file actually leave your system? A generated file is not a sent file — I have found files sitting in an outbound folder for three days while everyone blamed the partner. Look for a completed transmission record with matching timestamp and file name.

Second, acknowledgment evidence. Did a 997 come back, and did it accept or reject? A 997 proves the partner received the file and checked its structure. It does not prove their business system posted the order.

Third, business evidence. Does the partner's order or receiving record contain the document? When the first two disagree, this settles it, usually with a short call where you read out the ISA number and they search their intake queue.

The combinations point straight at the fix. Send record plus accepted 997 means the partner has it, so chase their posting step and do not resend. Send record but no 997 means the file may be stuck in a channel or queue, so ask the partner to search by ISA number before resending. No send record and the document still open means you never sent it, so fix the mapping or scheduler and send it normally, not as a resend. No send record and the document voided means the number was consumed by a void, and the audit closes with one ledger note.

Case Two: A Duplicate 945 in Texas

In June 2024, at an apparel 3PL outside Dallas, Texas, a retailer flagged that the same shipment's 945 appeared twice and opened a compliance inquiry. The cause was simple: for peak season the warehouse had added a second application server, each server kept its own local counter cache, and in the same minute both issued the same ST number for two different shipments.

Why did the partner not catch it? Many receiving systems deduplicate at the ISA level; the duplicates traveled inside different envelopes, so both passed. Never rely on a partner to deduplicate for you.

Cleanup ran in three steps: freeze the affected range and move issuing to a single database sequence; contact the partner with the duplicate list and agree which copy is valid; give every affected number an audit note. I have seen this bug three times, always from multiple independent issuers. The only reliable fix is a single issuing point — a database sequence or a proper lock.

Reconcile 997s by Number Range, Not by Day

Most warehouses reconcile by daily totals: 300 transactions sent, 298 acknowledgments back, close enough, check again tomorrow. That habit hides gaps permanently, because a late acknowledgment from yesterday pads today's count and the totals always look roughly right.

Reconcile by number range instead. Export a daily ledger with partner, ISA, GS, and ST numbers, document reference, and send time. Match every returned 997 back to its ST numbers. Anything still unmatched after the confirmation window in your partner agreement — which varies widely by retailer, so check the current agreement — goes onto an open items list. Classify each: partner never received it, we never sent it, or a void consumed the number. Review weekly and watch which category grows: never-sent points at your scheduler, never-received at the channel.

The arithmetic is simple. A warehouse sending around 300 transactions a day, audited manually monthly, burns roughly half a day of two people's time on one gap dispute. A daily automated range check leaves a handful of open items and cuts that to about thirty minutes.

Ledger and Alert Thresholds: Watch Three Numbers

A control number ledger does not need a dashboard. It needs to answer three questions for any number: did it go out, did the acknowledgment come back, and if not, why not. Keep the partner, layer, control number, document reference, send time, 997 status, classification, and owner on one row.

For alert thresholds, start here and tune to your volume. Alert when a single partner shows three unexplained gaps in one layer in a day, and clear them before the shift ends. Alert on a single duplicate, immediately, because duplicates have no acceptable quota. Escalate when open items past the partner's confirmation window grow by five in a day.

One more judgment: loose thresholds beat noisy ones. Dallas actually had duplicate alerting before their incident, but it fired dozens of low-value alerts a day, so operations muted it.

One Sequence for Every Partner Is a 3PL Trap

Sharing one sequence across all partners causes three predictable problems. Test orders for one partner chew holes you must explain to another partner's audit team. One counter failure contaminates every partner at once. And partners differ in control number requirements, per each partner's current EDI implementation guide, so a shared scheme eventually collides with someone's special rule.

Split sequences by partner, at least logically: an independent range per partner, partner recorded on every ledger row, alerts counted per partner. Migration is small — an issuing key plus one column. Not doing it costs you a peak-season night when two clients call about numbers you cannot explain.

Print this order on the wall: layer first, send log second, 997 third, document status fourth, resend last. Numbers may break. The record of where each went may not.

By Lin Xiao, WMS Implementation Consultant