The Parts of EDI

carPart_pzlAs part of our series “EDI Primer” we are going to go over the various parts of EDI. EDI is neither truly delimited, nor fixed width.  EDI has some fixed position components, and uses delimiters in a different way than a truly delimited file.  This post it going to overview some facts about EDI and its parts in an introductory fashion.  If you are unfamiliar with EDI, you might want to start with the post, “What is EDI?

Structure

Two important concepts in EDI are not exactly parts.  They are the structures of Enveloping and Segments:

  • Enveloping, as we discuss in another post, is a way for an EDI file to be self determining.  In the first segment of an EDI file, the ISA segment, all of the information can be found to allow a system designed to interpret EDI to know where it is going, where it came from, what version it is, and what characters it is using as delimiters.
  • Segments following this first segment are not fixed position.  White space is not used unless it is part of the data in the element.  Each segment has a header element that indicates the definition used for the rest of the data elements in that segment.  A segment may not need to use all of the possible elements in its definition.  When this is the case, the segment terminates with the segment delimiter or terminator.

The parts:

  • Standard is a concept that has more than one meaning, There is the standard, that is the overall X12 compliance rules that regulate what is and may be an EDI document.  But there is also the concept of a specific use case, or usage specification.  Both of these are referred to as ‘Standards’ but in this description of the parts of EDI, the standard is the first concept.  This is that when an EDI document is parsed, it must comply with this standard of segments, delimiters, and format, or it is rejected as being corrupt.
  • Version is a sub-component of the standard.  It is declared in the ISA, and lets the parser know what version of the EDI standard will be contained inside the envelope.  This is  important as to format and structure of the data that has changed as technology and needs have matured.
  • Doctype is not declared in the ISA, but is declared in the ST.  We may also know when we see the functional declaration in the GS.  The doctype determines which segments and in what order and structure may be present.  Not all EDI documents will need all segment types, so the doctype is very important when parsing the EDI file.  This is covered more in the ST Enveloping section.
  • Segments are the most basic part that makes and EDI file and EDI file is the segment.  There is a more detailed discussion of the nuances of segments here.  Segments are defined by their type, the characters that are located before the first delimiter in the segment.  And segments are terminated by a special delimiter called either the segment delimiter or segment terminator.
  • Element exist inside the segment.  Elements hold the data.  Elements are separated by element delimiters.  On rare occasions some elements can have sub-elements.  There is a more detailed discussion of elements here.
  • Envelope Segments There are three pairs of special segments that must be found, and can only be found, in the enveloping structure.  Enveloping contains the origin and destination identification, as well as content definition identification values.  A more detailed discussion of enveloping can be found here.
  • Files are not really a part of EDI, but when EDI is formed, it is generally saved in a file.  The file can contain any mix of EDI document types and going to any number of destination.  Generally, for sanity’s sake, this is not done.  But there is nothing in the name of the EDI file that matters to the contents.  There is no really expected extention like “.edi” for instance, and there is not need for white space removal from the begining or end of an EDI file.
  • Documents are another matter.  An EDI document is the sebments that reside within the ST envelope.  As such, they are a set of data that has a single format, (EDI standard), a single sender and single receiver.  Thus when an EDI doscument is discussed, we are really discussing the payload of the EDI envelopes.

Looking for something else relating to EDI?  Check out the EDI Primer post

Next in our series is a more in-depth look into Segments.

Subscribe to "The Integration Engineer" by Email
Find out about the tools and services available at The Integration Engineer's Consulting site.

Related Articles:

2 Responses to “The Parts of EDI”

  1. Alamiyo T. Augustine Says:

    What is EDI?”

  2. Roy Says:

    Good question, and I actually have a good answer here on the blog.

    Take a look at this page, http://www.theintegrationengineer.com/what-is-edi/

    and http://www.theintegrationengineer.com/the-edi-primer/

    to get started and see if they answer your questions.

Leave a Reply

  • Sign up for our FREE Newsletter

  • Catagories


  • Affiliate Ads