This is a draft cheat sheet. It is a work in progress and is not finished yet.
x12 Mandatory Segments
ISA- Interchange Header - This contains information about the sender and recipient
Interchange Envelope (ISA/IEA) The interchange envelope is the wrapper for all the data to be sent in one transmission. It can contain multiple functional groups. This means that transactions of different types can be included in the interchange envelope, with each type of transaction stored in a separate functional group.
IEA- End of Interchange - It contains information about the number of functional groups and the interchange control reference number
ST- Transaction Set Header - segment of an X12 document
Transaction Set (ST/SE) Each transaction set (also called a transaction) contains three things: A transaction set header A transaction set trailer A single message, enveloped within the header and footer The transaction has a three-digit code, a text title, and a two-letter code; for example, 997, Functional Acknowledgment (FA)
SE- Transaction Set Trailer - segment of an X12 document. This marks the end of a transaction set
GS- Functional Group Header - segment of a set of X12 documents of the same document type (transaction set). Here you'll find information about the functional group, e.g. codes for the sender, recipient, and date/time of preparation
Functional Group (GS/GE) A functional group is composed of one or more transaction sets, all of the same type, that can be batched together in one transmission. The functional group is defined by the header and trailer; the Functional Group Header (GS) appears at the beginning, and the Functional Group Trailer (GE) appears at the end. Many transaction sets can be included in the functional group, but all transactions must be of the same type
GE- Functional Group Trailer - segment of a set of X12 documents of the same transaction set. It tells you the number of functional groups and the control group number. It also marks the end of a group of transaction sets