The EDIFACT standard provides:
The work of maintenance and further development of this standard is done through the United Nations Centre for Trade Facilitation and Electronic Business (UN/CEFACT) under the UN Economic Commission for Europe, in the Finance Domain working group UN CEFACT TBG5.
UNH+1809661+INVOIC:D:97A:UN ' BGM+380+1809661+9' DTM+137+20180921:102' FTX+DUT+++VAT "rate" is zero per cent:Customer has 13A authorisation Number 86/07743/102006.' RFF+VA+APPTNO123445' NAD+DP+783LOC++Redsis Corp+2201 SW 145th Ave+Suite 209+Miramar+FL+33027+US' NAD+SE+848000++IBM Brazil+101+13186-900+Brazil+SP+33027+BR' NAD+SF+783000++IBM Brazil+101+13186-900+Brazil+SP+33027+BR' CTA+PD+:BATCHCODE' COM+:416-448-4846:TE' CUX+2:USD:4' PAT+18+2::91' TDT+20++3++CARRIER IBM FROM:172' TOD++PP+FOB' PAC+++CS' MEA+PD+AAD+KGM:10' LIN+1++++1' QTY+47:2:PCE' PCI+24+217508300' LIN+1++99Y0691:BP++2' IMD+F++···IBM MODEL 2498-B40 SAN40B-4 MODEL B40 ENTERRISE-CLASS 8GBPS FC SWITCH 40 PORT 99Y0691' QTY+47-2-PCE' PRI+CAL:1779' LIN+2++99Y0651:BP++2' IMD+F++···IBM MODEL FC SWITCH 40 PORT 99Y0691' QTY+47-2-PCE' PRI+CAL:32509' ALI+US' MOA+203:10667.16:::5' RFF+ON:4600403027' PAC+++CS' PCI+24+217508300' UNS+S' CNT+11:1:CS' MOA+203:34288:::5'
The UNA segment is optional. If present, it specifies the special characters that are to be used to interpret the remainder of the message. There are six characters following UNA in this order:
With the exception of the decimal mark (see below), the special characters in the sample UNA segment above are also the default values.
The component data element separator and data element separator are the "first level" and "second level" separators of data elements within a message segment. Referring to them as + and : for brevity, the + separates top-level or composite data elements, and : separates second-level data elements nested within composite data elements. Trailing empty (or null) data elements and their leading separators are omitted to reduce message size.
The decimal mark is used to separate the integer from the fractional part of non-integer numbers. The optional nature of the UNA segment and the initial choice of the comma (",") as the default decimal mark provide a source of common confusion. Versions 1 through 3 of the ISO 9735 syntax rules specify the comma as the default; version 4 states that the decimal mark position in the UNA segment is to be ignored and that the comma and the dot (".") may be used indifferently in numeric data values. The UNB segment indicates which version of the syntax rules is in effect. ISO 9735: 1988 and ISO 9735-1:2002
Release character (analogous to the \ in regular expressions) is used as a prefix to remove special meaning from the separator, segment termination, and release characters when they are used as plain text.
Segment terminator indicates the end of a message segment.
Note: The line breaks after each segment in this example have been added for readability. There are typically no line breaks in EDI data.
UNH+1+PAORES:93:1:IA'- This is the message header segment which is required at the start of every message. This code specifies that the message name and version is PAORES 93 revision 1 and it was defined by the organisation IA (IATA).
IFT+3+NO MORE FLIGHTS' - This is an "Interactive Free Text" segment containing the text "NO MORE FLIGHTS".
UNT+13+1' - This is the message trailer segment. It indicated that the message sent contains 13 segments.
A group or segment can be mandatory (M) or conditional (C) and can be specified to repeat. For example :
- C99 indicates between 0 and 99 repetitions of a segment or group - M99 signifies between 1 and 99 repetitions of a segment or group
A group, like a message, is a sequence of segments or groups. The first segment or group beneath a group must be mandatory, and the group should be made conditional if the logic of the situation demands it.
Service String Advice UNA Optional +----- Interchange Header UNB Mandatory | +--- Functional Group Header UNG Conditional | | +- Message Header UNH Mandatory | | | User Data Segments As required | | +- Message Trailer UNT Mandatory | +--- Functional Group Trailer UNE Conditional +----- Interchange Trailer UNZ Mandatory