Loading

Message Maps and Control Numbers

An EDI message is a structured set of segments and elements. A map connects those to the slots on your documents.

Mapping

Each mapping line ties an element position to a document slot — an element within a particular segment becomes the order number, another becomes the delivery date. Because it maps to document slots rather than directly to your columns, the same map works regardless of what you called your columns; the binding resolves the rest.

Maps are per partner

Two partners on the same standard will still differ, because the standards permit choices and everyone makes them differently. Expect a map per partner, and do not assume a working map can be copied without checking.

Control numbers

EDI uses control numbers at interchange, group and transaction level to sequence messages. Partners check them: a gap suggests something was lost, and a repeat suggests a duplicate.

Allocation is atomic, so two messages sent simultaneously cannot take the same number. This is the sort of thing that appears to work in testing and fails under load, which is why it is handled centrally rather than by each transport.

Nothing is applied twice

Every message carries a unique key across the partner, direction and control numbers. A redelivered interchange — which partners do routinely after a timeout — is recorded once and applied once. Without this, a resent order becomes two orders, and the customer receives double.

When a map is wrong

A mismapped element usually shows up as a sensible-looking document with one field wrong: a date in the wrong place, a quantity against the wrong line. Compare against the partner's specification rather than against what looks reasonable — EDI element positions are not intuitive, and a plausible guess is how the error arrived.

Test with real messages

Ask the partner for genuine sample messages rather than constructing your own. Real traffic contains the optional segments, unusual characters and edge cases that a clean test message will not.