Architecture |
EDI documents are transmitted as a flat byte stream on communication channels and mostly stored as files. All EDI data is represented by ASCII characters. The structure of EDI document is hierarchical and the following table explains the terminology.
EDI Component | Description |
---|---|
ISA | Interchange protocol header. May contain 1 to N function groups. |
GS Function Group | Function group header. May contain 1 to N transaction sets. |
ST Transaction Set(Actual EDI Document) | Actual user data represented as a document or EBizBot hierarchical rowset. Will contain segments as part of Header, Detail and Summary sections. |
HEADER, DETAIL and SUMMARY Sections | Logical grouping of Segments or Loops of segments |
SEG Segment | Segment may be seen as 1 row of structured data. |
DataElement | Smallest unit of EDI data. This may be seen as a Cell data. |
Ultriva EDI engine parses incoming EDI file or Byte stream and constructs a set of EDI documents represented by Ultriva’s Dataset object. Each EDI document corresponds to one hierarchical Dataset and following represents the relationships. Each Box is a dataset.
Loops may be nested to any depth.
ISA, GS and ST has exactly 1 Row
These columns are followed by a LOOPS or SEGMENTS. The order in which these appear is exactly the same order in which they occur in the document. The order is HEADER, DETAIL and SUMMARY sections. Each of these Datasets may contain either LOOP Datasets or Segement Datasets. LOOP Dataset contains Segment Datasets. Segment is the leaf Dataset and will not contain any Datasets. Segments store the actual tabular data. All these components are defined by the following Dataset definitions.
Trailing segments are used to validate envelopes and then thrown out.
Position always means section character followed by Edi specified position number
Position Number ::= <H | D | S | E><Position number as per EDI Spec>
H – Header
D – Detail
S – Summary
E – Envelope
EDI Component | Dataset Definition name (RowsetDef) |
---|---|
EDI Document. | Edi<Document Type>V<CustomVer>DocDef |
All Segments including ISA, GS Except LOOP | Edi<Segment ID>Def |
LOOP | Edi<DocType>V<Custom Ver>LOOP<Depth><Position>Def |
All segments including ISA, Function Group, Transaction Header are represented by RowsetDef with the name as given. Custom Version is mandatory 3digit number. This number is used to customize a particular segment or set of segments. When an EDI document is opened, caller must pass a custom version. This is a very useful feature of EBizBots EDI implementation.
The outermost object is EDI Document. It’s definition name has an additional part identifying the type of document. For example purchase order 850 document Custom Version 10 is identified by Edi850V010DocDef.
Loops are similar to outer documents. A loop may contain any number of segments and loops. Loops may nest to any depth.
The segment names and loop names are unique among all segments and loops in a given document. The name is composed as follows
SegmentName ::= <Segment ID><underscore char><Depth><Pos. No.>
LoopName ::= Loop<underscore char><Depth><Pos. No.>