Envelopes
An EDI data structure resembles layers of envelopes. The envelopes separate different types of data and carry the sender and receiver address information. A receiver uses these envelopes to determine if all of the data has been received.
A envelope consists of a header segment, a trailer segment, and EDI data. EDI envelopes are like paper envelopes that enclose paper documents.
A header segment is the first EDI data segment in an envelope. The header segment contains a control number data element that identifies the envelope.
A trailer segment is the last EDI data segment in an envelope. The trailer segment contains a unique control number and the number of segments in the envelope. The control number in the header segment must match the control number in the trailer segment.
The following figure shows the EDI envelope structure:
