EDIFACT Syntax
The anatomy of EDIFACT messages
EDIFACT files are structured with a strictly defined syntax, to facilitate common interpretation of information. EDIFACT file has a hierarchical structure where the top level is referred to as an interchange, and lower levels contain one or more messages which consist of segments, which in turn consist of composites and simple data elements.
The EDIFACT file structure is specified using EDIFACT service segments. UNA segment, if present, will override the default separators and other service character used in the interchange. UNB-UNZ, UNG-UNE and UNH-UNT are used to tag envelopes.
On a more detailed level an EDIFACT message consists of following items:
Segments
Sets of data that contain logically related information. The segments used in a message shall appear in the sequence specified in the message diagram.
Segment groups
Segment groups are an invisible part of an EDIFACT file. Segment groups specify a logical structure of a message. This structure is specified as a diagram. When EDIFACT message is processed, this diagram is used as a basis to interpret the meaning of each segment and their relationship with each other.
Trigger segments
The trigger segment determines the function of a group. It is the group’s first segment. No repetition is allowed for this segment and it is mandatory within the group.
Composite data element
A data element that consists of two or more component data elements separated by a component separator.
Data elements
A data element is the smallest unit of information within the structure of a message, and there are two types of data elements: a simple data element and a component data element, used in composite data elements. A data element represents a single piece of information, such as an article number.
Coded data elements
A coded data element is an element which has as its value a code described in a code lists directory. There are two types of UN/EDIFACT coded data elements: those which are qualifiers, and those which are other coded data elements. Coded data elements which are qualifiers shall not have data elements 1131/3055 associated with them. Generic coded simple data elements can be specified, in a composite data element, in conjunction with conditional data elements 1131/3055. If data elements 1131 and 3055 are not used, the value of the associated coded data element value is from the UN/EDIFACT maintained code list.
Qualifiers
A data element whose value shall be expressed as a code that gives specific meaning to the function of another data element, composite data element or segment.
Example of EDIFACT file
The following example show the above items in practice:
How you benefit from the use of Truugo?
Because EDIFACT segments as such are universal, it does not suffice that both the parties agree to the use of a certain EDIFACT message type. There always needs to be a more specific instruction set that defines how this message type should be applied to the certain use case.
Making, and especially maintaining these definitions (Message Implementation Guideline, MIG) is hard and time-consuming without the right tools. Truugo offers the unquestionably easiest and most effective solution, EDIFACT Subset Editor, for this need. Please check also our EDIFACT Browser if you need a solution for browsing and fixing EDIFACT files.