<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Integration Engineer &#187; b2b</title>
	<atom:link href="http://www.theintegrationengineer.com/category/b2b/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.theintegrationengineer.com</link>
	<description>When it just has to work.</description>
	<lastBuildDate>Fri, 03 Feb 2012 00:21:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Document Choreography of an EDI Purchase</title>
		<link>http://www.theintegrationengineer.com/document-choreography-of-an-edi-purchase/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=document-choreography-of-an-edi-purchase</link>
		<comments>http://www.theintegrationengineer.com/document-choreography-of-an-edi-purchase/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 15:36:20 +0000</pubDate>
		<dc:creator>Roy</dc:creator>
				<category><![CDATA[b2b]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[EDI]]></category>
		<category><![CDATA[810]]></category>
		<category><![CDATA[820]]></category>
		<category><![CDATA[850]]></category>
		<category><![CDATA[855]]></category>
		<category><![CDATA[856]]></category>
		<category><![CDATA[Choreography]]></category>
		<category><![CDATA[Document]]></category>
		<category><![CDATA[document exchange]]></category>
		<category><![CDATA[document flow]]></category>
		<category><![CDATA[Trading Partner]]></category>

		<guid isPermaLink="false">http://www.theintegrationengineer.com/?p=1033</guid>
		<description><![CDATA[So it goes like this: 850 is a Purchase order, and is sent to the Vendor 855 is an Order Response, and is sent from the Vendor.  It confirms, updates or rejects each line, or the PO as a whole. 856 is the Ship Notice. and is sent from the Vendor.  It may contain one [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-1036" title="Choreography" src="http://www.theintegrationengineer.com/wp-content/uploads/2010/02/Choreography.jpeg" alt=" Document Choreography of an EDI Purchase" width="458" height="330" /></p>
<p><span id="more-1033"></span>So it goes like this:</p>
<p>850 is a Purchase order, and is sent to the Vendor</p>
<p>855 is an Order Response, and is sent from the Vendor.  It confirms, updates or rejects each line, or the PO as a whole.</p>
<p>856 is the Ship Notice. and is sent from the Vendor.  It may contain one or more lines from one or more orders and can indicate shipment of partial lines from a PO.</p>
<p>810 is the Invoice, and is sent from the Vendor.  It contains one or more lines from one or more POs, but generally people keep these to only one PO.</p>
<p>820 is Remittance, and is sent to the Vendor.  It contains information relating to payment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.theintegrationengineer.com/document-choreography-of-an-edi-purchase/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Magento Analytics</title>
		<link>http://www.theintegrationengineer.com/magento-analytics/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=magento-analytics</link>
		<comments>http://www.theintegrationengineer.com/magento-analytics/#comments</comments>
		<pubDate>Thu, 22 Jul 2010 16:08:06 +0000</pubDate>
		<dc:creator>Roy</dc:creator>
				<category><![CDATA[b2b]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[analytics]]></category>
		<category><![CDATA[conversions]]></category>
		<category><![CDATA[E-Commerce]]></category>
		<category><![CDATA[google analytics]]></category>
		<category><![CDATA[tracking]]></category>

		<guid isPermaLink="false">http://www.theintegrationengineer.com/?p=1642</guid>
		<description><![CDATA[If you are installing a Magento as a web store for yourself or for someone else, you will want to track how many visitors you have and how many of them convert into customers. Magento makes this really easy if you are using Google Analytic. Here is how it works. First you will need to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.theintegrationengineer.com/wp-content/uploads/2010/04/magento_button.png"><img class="alignleft size-full wp-image-1128" src="http://www.theintegrationengineer.com/wp-content/uploads/2010/04/magento_button.png" alt="magento button Magento Analytics" width="89" height="89" title="Magento Analytics" /></a>If you are installing a Magento as a web store for yourself or for someone else, you will want to track how many visitors you have and how many of them convert into customers.  Magento makes this really easy if you are using Google Analytic.  Here is how it works.</p>
<p>First you will need to have a Google Analytics account.  If you don&#8217;t have one, you might want to check it out.  Its free and you can sign up at <a href="http://www.google.com/analytics">http://www.google.com/analytics</a></p>
<p><span id="more-1642"></span>As soon as you are ready with you Google Analytics account.  And you have told it that you want to monitor your site.  It will generate some code for you to place on every page that you want to monitor.  But don&#8217;t worry, Magento doesn&#8217;t need you to do much to accomplish this.  If you look at your accounts page, you will see something like this:</p>
<p><a href="http://www.theintegrationengineer.com/wp-content/uploads/2010/07/google_analytics_example1.png"><img class="alignnone size-full wp-image-1653" src="http://www.theintegrationengineer.com/wp-content/uploads/2010/07/google_analytics_example1.png" alt="google analytics example1 Magento Analytics" width="357" height="244" title="Magento Analytics" /></a></p>
<p>I have blurred out my domain and account, but what you will see in the red box, is the number that you will need to put into Magento.</p>
<p>So copy it to a text file or just leave the page up and go back to it when you need this number.</p>
<p>Now, go to your Admin page on your Magento installation.  You will need to go to System&gt;configuration as shown below.</p>
<p><a href="http://www.theintegrationengineer.com/wp-content/uploads/2010/07/Magento_navigation_config.png"><img class="alignnone size-full wp-image-1643" src="http://www.theintegrationengineer.com/wp-content/uploads/2010/07/Magento_navigation_config.png" alt="Magento navigation config Magento Analytics" width="594" height="348" title="Magento Analytics" /></a></p>
<p>Once in configuration, you should find a set of navigation links on the left hand of the page.  In the &#8220;Sales&#8221; section you will find a &#8220;GoogleAPI&#8221; selection.</p>
<p>This will take you to the section with a Google Analytics control.</p>
<p><a href="http://www.theintegrationengineer.com/wp-content/uploads/2010/07/Magento_config_sales_GoogleAPI.png"><img class="alignnone size-full wp-image-1644" src="http://www.theintegrationengineer.com/wp-content/uploads/2010/07/Magento_config_sales_GoogleAPI.png" alt="Magento config sales GoogleAPI Magento Analytics" width="253" height="280" title="Magento Analytics" /></a></p>
<p>Expand the Google Analytics control and set Enabled to Yes.</p>
<p>Now here is where you type or past in your account number from the Google Analytics report page we saw at the top of this article.</p>
<p><a href="http://www.theintegrationengineer.com/wp-content/uploads/2010/07/Magento_config_Google_Analytics.png"><img class="alignnone size-full wp-image-1645" src="http://www.theintegrationengineer.com/wp-content/uploads/2010/07/Magento_config_Google_Analytics.png" alt="Magento config Google Analytics Magento Analytics" width="626" height="159" title="Magento Analytics" /></a></p>
<p>Once you have typed it in, click on the &#8220;Save Config&#8221; button.</p>
<p><a href="http://www.theintegrationengineer.com/wp-content/uploads/2010/07/magento_save_config.png"><img class="alignnone size-full wp-image-1646" src="http://www.theintegrationengineer.com/wp-content/uploads/2010/07/magento_save_config.png" alt="magento save config Magento Analytics" width="125" height="38" title="Magento Analytics" /></a></p>
<p>When you see this message, you are ready to go.</p>
<p><a href="http://www.theintegrationengineer.com/wp-content/uploads/2010/07/magento_Config_Saved.png"><img class="alignnone size-full wp-image-1647" src="http://www.theintegrationengineer.com/wp-content/uploads/2010/07/magento_Config_Saved.png" alt="magento Config Saved Magento Analytics" width="239" height="52" title="Magento Analytics" /></a></p>
<p>You might have to wait a few hours before the green check mark appears on the Google Analytics site.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.theintegrationengineer.com/magento-analytics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is SEF?</title>
		<link>http://www.theintegrationengineer.com/what-is-sef/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=what-is-sef</link>
		<comments>http://www.theintegrationengineer.com/what-is-sef/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 14:35:54 +0000</pubDate>
		<dc:creator>Roy</dc:creator>
				<category><![CDATA[b2b]]></category>
		<category><![CDATA[EDI]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[SEF Standards]]></category>
		<category><![CDATA[Standard Exchange Format]]></category>

		<guid isPermaLink="false">http://www.theintegrationengineer.com/?p=318</guid>
		<description><![CDATA[Starting off work on my On-line Status Repository, one of the things that I will be starting with is uploading and downloading SEF file from a data repository.  SEF stand for Standards Exchange Format.  SEF files are repositories of standards information that can then be exchanged between people and applications to define the format of [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-961" src="http://www.theintegrationengineer.com/wp-content/uploads/2009/11/SEF_Matrix.jpg" alt="SEF Matrix What is SEF?  " width="131" height="83" title="What is SEF?  " />Starting off work on my On-line Status Repository, one of the things that I will be starting with is uploading and downloading SEF file from a data repository.  SEF stand for Standards Exchange Format.  SEF files are repositories of standards information that can then be exchanged between people and applications to define the format of EDI documents.</p>
<p>If you have used a standards editor, you probably know what an SEF file is, or have used it.  Some applications and EAI even use SEF files as part of their document creation and validation processes.  It becomes useful to describe briefly what SEF files look like, and what type of information they contain.</p>
<p><span id="more-318"></span></p>
<p><strong>What is in there?</strong></p>
<p>If you are familiar with EDI, and have cracked open an SEF file with your standard text editor of choice, you will already know what I am about to say.  The contents of the SEF file don&#8217;t look that complex to someone who is used to and familiar with how various EDI files look.  For those that are not so brave, I will explain this painlessly.</p>
<p>First, the SEF file is really just a text file.  It can be edited by hand, but I don&#8217;t really recommend it.  (not because you can&#8217;t, but because it is tedious.)</p>
<p>Second, it contains its data in sections.  There is a section for doc types, segments, elements, and encoded data.  There is also a few housekeeping sections like version and name etc.</p>
<p><strong>What is an SEF file for?</strong></p>
<p>SEF stands for Standards Exchange Format.  This is literally a file format that was designed to contain information about EDI standards.  It was created so that a computer application could understand an EDI file.  It is used by some application like Standard Repositories and Standards Editors to allow us humans to deal with a standard like it was a text document.  While at the same time keeping a repository that can be used by an integration application to form and validate an EDI file.</p>
<p style="padding-left: 30px">If you are familiar with the concept of metadata then an SEF file is the EDI standard&#8217;s metadata.  If you are not familiar with metadata, then skip this part.</p>
<p><strong>Do I need to know about SEF files and EDI?</strong></p>
<p>Nope.  SEF is only useful if you are exchanging standards using the format.  If your standard and usage is in the form of a PDF or a spreadsheet, that is fine.  Many people do just that.</p>
<p>For me, I need to know this because I am trying to build some Standard Repository tools, and want to use the SEF format to manage them.</p>
<p>And for those that want a deeper look, I will be following this article with some deeper and more detailed articles dealing with the internals of the SEF file.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.theintegrationengineer.com/what-is-sef/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Usage of EDI specifications</title>
		<link>http://www.theintegrationengineer.com/usage-of-edi-specifications/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=usage-of-edi-specifications</link>
		<comments>http://www.theintegrationengineer.com/usage-of-edi-specifications/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 15:54:48 +0000</pubDate>
		<dc:creator>Roy</dc:creator>
				<category><![CDATA[b2b]]></category>
		<category><![CDATA[EDI]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[integration plan]]></category>
		<category><![CDATA[Specification]]></category>
		<category><![CDATA[Standard]]></category>
		<category><![CDATA[usage]]></category>

		<guid isPermaLink="false">http://www.theintegrationengineer.com/?p=45</guid>
		<description><![CDATA[When two trading partners agree to send each other electronic documents.  And they begin to describe what EDI documents they will exchange and how the documents will flow, they should also exchange EDI specification documents.  EDI usage or specification documents describe what fields and what segments a trading partner will send or expect to convey [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-875" src="http://www.theintegrationengineer.com/wp-content/uploads/2009/11/blue2_pzl.jpg" alt="blue2 pzl Usage of EDI specifications" width="192" height="145" title="Usage of EDI specifications" />When two trading partners agree to send each other electronic documents.  And they begin to describe what EDI documents they will exchange and how the documents will flow, they should also exchange EDI specification documents.  EDI usage or specification documents describe what fields and what segments a trading partner will send or expect to convey the information necessary to complete a transaction.  It doesn&#8217;t matter if we are ordering widgets, or invoicing, or transmitting catalog data, or checking insurance claims eligibility, the EDI needs to contain the data that the two parties need to communicate.  To explain this, and document it to that both trading partners know what is expected, we create an EDI usage specification.</p>
<p><span id="more-45"></span></p>
<p><strong>EDI Specifications</strong></p>
<p>In the larger sense, the EDI specification is the set of rules that define each document type, the segments they contain, and the size and type of data in the elements.  When we talk about the EDI Standard Specification, we are talking about the whole set of valid EDI document types.  If something is valid EDI, then it complies with the EDI Standard Specification.  However, this large, all encompassing specification is not useful in coordinating the exchange of documents between two trading partners.</p>
<p><strong>What goes in an EDI Usage Specification?</strong></p>
<p>So we take EDI Standard Specification and we reduce it.  We remove the unused document types and the unused segments within the documents we will use.  And we even remove the unused elements and encoded values within the segments we will use.  At this point, we have created an EDI Usage Specification.  We can also add to the specification by including values that we need, like designating the an optional value or ID as required and specifying what type is should be.</p>
<p><strong>How is an EDI specification Used?</strong></p>
<p>Now that we have a usage specification we can use it to do to basic things.  First, it is the source of information for us to set-up our integration for our EDI document exchange.  And Second it is the format that we validate our EDI documents with to determine a valid transaction.</p>
<p>EDI Usage Specifications can be a source of data and integration documentation.  This can become extremely valuable when the choices and information about how your EDI interface works is recorded into the notes of the Usage Specification.</p>
<p>Beyond a visual validation of looking at the EDI file and comparing it with the specification, many times a specification can be found in the form of an SEF file.  The SEF file can be used in an EDI validation application.  This allows a potentially large and unwieldy EDI file to be scanned for compliance and accuracy.</p>
<p>There may be other uses, but these are the main two, integration data repository, tool for EDI validation.</p>
<p><strong>EDI Specification Examples:</strong></p>
<p>To walk through how a usage specification works, and is used, check out this review of <a href="http://www.theintegrationengineer.com/booknetcanada-real-life-standards-and-usage-spec/">BookNet Canada&#8217;s specification.</a></p>
<p>Then you can take a look at the <a href="http://www.macysnet.com/edi/">EDI specifications published by Macy&#8217;sNet</a> that they keep online to assist their trading partners in making and keeping effective integrations.</p>
<p>Sometimes we only use the EDI specification, they way we have always used them.  It can be instructive to browse the usage specifications of other companies.  We see what they remove, what they include, what comments they make, and what rules they document.  And seeing how others do things can help us to be more effective in how we use EDI specification documents.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.theintegrationengineer.com/usage-of-edi-specifications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Line Item Part Three, The ACK</title>
		<link>http://www.theintegrationengineer.com/line-item-part-three-the-ack/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=line-item-part-three-the-ack</link>
		<comments>http://www.theintegrationengineer.com/line-item-part-three-the-ack/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 17:03:57 +0000</pubDate>
		<dc:creator>Roy</dc:creator>
				<category><![CDATA[b2b]]></category>
		<category><![CDATA[EDI]]></category>
		<category><![CDATA[Line Item]]></category>
		<category><![CDATA[Segments]]></category>
		<category><![CDATA[ACK]]></category>
		<category><![CDATA[PO1]]></category>
		<category><![CDATA[Segment]]></category>

		<guid isPermaLink="false">http://www.theintegrationengineer.com/?p=831</guid>
		<description><![CDATA[ACK is an Acknowledgment segment. It is commonly found on response transactions to Purchase Orders or 855. It is one of the lines found in the PO1 loop or group.  As this line modifies the PO1 line data from the Purchase Order, what it can contain and how that data is handled is important for [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-840" src="http://www.theintegrationengineer.com/wp-content/uploads/2009/10/ACK_Block.png" alt="ACK Block Line Item Part Three, The ACK" width="120" height="40" title="Line Item Part Three, The ACK" />ACK is an Acknowledgment segment.  It is commonly found on response transactions to Purchase Orders or 855.  It is one of the lines found in the PO1 loop or group.  As this line modifies the PO1 line data from the Purchase Order, what it can contain and how that data is handled is important for the stability of the supply chain integration.  For clarity, we are going to use the 4010 x12 standard.</p>
<p><span id="more-831"></span></p>
<p><strong>Parts of ACK</strong></p>
<p>Here is a diagram of a sample ACK segment:</p>
<p><strong><img class="alignnone size-full wp-image-844" src="http://www.theintegrationengineer.com/wp-content/uploads/2009/10/ACK_Diagram.png" alt="ACK Diagram Line Item Part Three, The ACK" width="629" height="304" title="Line Item Part Three, The ACK" /><br />
</strong></p>
<p>Like any other segment in EDI, the ACK segment is composed of elements.  Here is a list, element by element and what it contains.</p>
<table border="1" cellspacing="0" cellpadding="5" width="100%">
<tbody>
<tr>
<td width="10%" align="left" valign="top"><em>ACK_01</em></td>
<td>This is the Line Item Status Code.  This code can be the entire purpose of the ACK line if it indicates that the line is cancelled, or it can indicate that something has changed.  The Diagram above has a Status Code of &#8220;IP&#8221; indicating that the price from the Order has changed.  The ACK should then reflect the changed price here.  In the case of an 855 that indicates the part number has changed or substituted the status will be &#8220;IS&#8221; and the new part number will be listed in the Product or Service ID element.  The PO1 line that this ACK is a part of should contain the original part number, price, quantity, or whatever was on the order, and the ACK will contain the modification.</td>
</tr>
<tr>
<td width="10%" align="left" valign="top"><em>ACK_02 </em></td>
<td>This is the quantity modified.  This is not required, but is very important.  If the order was for 10 items, and there is a change, substitution or delay in 5 of them, a PO1 group should contain 2 ACK lines one with the accepted status on the 5 that are ok, and another for the 5 that are</td>
</tr>
<tr>
<td width="10%" align="left" valign="top"><em>ACK_03 </em></td>
<td>This is the Unit of Measure.  It is a 2 character, Alpha-Numeric value.  It is also an encoded value.  Being “encoded” means that there is a list of acceptable values for this element, any value outside of that set is invalid and will cause an exception.When the ACK_02 and ACK_03 are used together, we can tell how much of something is being modified or acknowledged</td>
</tr>
<tr>
<td width="10%" align="left" valign="top"><em>ACK_04 </em></td>
<td>This is the date Qualifier.  This is not required, even if ACK_05 is present, this element may be empty.  When it is present, it is an encoded value that identifies what type of data is in the ACK_05.  In the case of our example, it is the PO date.</td>
</tr>
<tr>
<td width="10%" align="left" valign="top"><em>ACK_05 </em></td>
<td>This is a Date element.  It is required if ACK_04 is populated.  The format is CCYYMMDD.  This element is always 8 characters long when it is populated.</td>
</tr>
<tr>
<td width="10%" align="left" valign="top"><em>ACK_06 </em></td>
<td>This is a reference number.  I have never seen this used, but if you have a use for it, go ahead.</td>
</tr>
<tr>
<td width="10%" align="left" valign="top"><em>ACK_07 </em></td>
<td>This is a Product or Service Qualifier.  This element is a 2 character, encoded value.  All of the “Qualifier” defined elements are encoded values.  This, again, means that there is a list of acceptable values for this element, any value outside of that set is invalid and will cause an exception.This qualifier defines what type of value is found in the next element, the ACK_08.  So if the ACK_07 has a “VC”, then the ACK_08 contains a Vendor’s Catalog Number.  (This means it is a part number as found in the Vendor Catalog.)</td>
</tr>
<tr>
<td width="10%" align="left" valign="top"><em>ACK_08 </em></td>
<td>This is a Product or Service ID.  It is Alpha-Numeric, and can be from 1 to 48 characters in length.  It is conditional with the ACK_07, if one is present, the other must be present.  This value is an identifier like a part number or other type of line item data.</td>
</tr>
<tr>
<td width="10%" align="left" valign="top"><em>ACK_09 to ACK_26 </em></td>
<td>This pattern continues all way to <em>ACK_25 </em>and <em>ACK_26. </em>All of the segment pairs from ACK_07 to ACK_26 that have the same potential values for each pair.</td>
</tr>
<tr>
<td width="10%" align="left" valign="top">ACK_27</td>
<td>This is Agency Qualifier Code.  It is an 2 character encoded value to designate what agency, state or entity is being referenced.  It is not required and I have never seen this used.</td>
</tr>
<tr>
<td width="10%" align="left" valign="top">ACK_28</td>
<td>This is Source SubQualifier.  It is an 15 character Alpha-Numeric value that references the source table being used.  It is not required and I have never seen this used.</td>
</tr>
<tr>
<td width="10%" align="left" valign="top">ACK_29</td>
<td>This is Industry Code.  It is an 30 character Alpha-Numeric value that references an industry code list.  It is not required and I have never seen this used.</td>
</tr>
</tbody>
</table>
<p><strong>Best Practices</strong></p>
<p>With the ACK the best practices are more in how to implement and what to expect.  So here are some things to remember when implementing this segment.</p>
<ol>
<li>An ACK is part of a PO1 line for a response to another PO1 line transaction.  This segment supplies a status, and can modify the line item contents.</li>
<li>There can be more than one ACK segment for a line item.  (4010 855s allow 104 repetitions of the ACK)</li>
<li>When an ACK explicitly changes the line item it can only change that one type.</li>
<li>There is a status called Accepted With Changes.  &#8220;AC&#8221;  For this, you will need to parse the ACK and see if any of the values have changed.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.theintegrationengineer.com/line-item-part-three-the-ack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Line Item part two, IT1</title>
		<link>http://www.theintegrationengineer.com/line-item-part-two-it1/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=line-item-part-two-it1</link>
		<comments>http://www.theintegrationengineer.com/line-item-part-two-it1/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 14:56:23 +0000</pubDate>
		<dc:creator>Roy</dc:creator>
				<category><![CDATA[b2b]]></category>
		<category><![CDATA[EDI]]></category>
		<category><![CDATA[Segments]]></category>
		<category><![CDATA[best practice]]></category>
		<category><![CDATA[content]]></category>
		<category><![CDATA[IT1]]></category>
		<category><![CDATA[Line Item]]></category>
		<category><![CDATA[PO1]]></category>
		<category><![CDATA[Segment]]></category>
		<category><![CDATA[usage]]></category>

		<guid isPermaLink="false">http://www.theintegrationengineer.com/?p=726</guid>
		<description><![CDATA[Like the PO1 segment, IT1 is another line item segment used in the supply chain.  This is the line item segment found in invoices.  And since invoices make up an important part of a supply chain, I wanted to spend another article on this segment.  (IT1 is a group or loop so it is more [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-820" src="http://www.theintegrationengineer.com/wp-content/uploads/2009/10/IT1_Block.png" alt="IT1 Block Line Item part two, IT1" width="100" height="75" title="Line Item part two, IT1" />Like the PO1 segment, IT1 is another line item segment used in the supply chain.  This is the line item segment found in invoices.  And since invoices make up an important part of a supply chain, I wanted to spend another article on this segment.  (IT1 is a <a href="../edi-repeated-segments/">group or loop</a> so it is more than just a segment.)  In this article we will discuss what data is found on the IT1 segment, and how it should be handled on both inbound and outbound document.  For clarity, we are going to use the 4010 x12 standard.</p>
<p><span id="more-726"></span></p>
<p><strong>Parts of IT1</strong></p>
<p>Here is a diagram of a sample IT1 segment.<strong><br />
</strong></p>
<p><strong><img class="alignnone size-full wp-image-825" src="http://www.theintegrationengineer.com/wp-content/uploads/2009/10/IT1_Diagram1.png" alt="IT1 Diagram1 Line Item part two, IT1" width="563" height="329" title="Line Item part two, IT1" /><br />
</strong></p>
<p>Like any other segment in EDI, the IT1 segment is composed of elements.  Here is a list, element by element and what it contains.</p>
<table border="1" cellspacing="0" cellpadding="5" width="100%">
<tbody>
<tr>
<td width="10%" align="left" valign="top"><em>IT1_01</em></td>
<td>This is the Line Identifier, or Line Number.  This is a value that must be unique among the lines or IT1 segments of a Invoice.  There is no rule that these must be incrementing integers starting at 1.  But it is normal for these to be Numeric even if the type is Alpha-Numeric.  And it is general practice to have them reflect the Line Number of the Purchase Order they are invoicing.  Because this is some times not possible, the IT101 is optional.  All effort should be made to include it, but for lines that have no number from the PO associated with them, it is sometimes a good practice to just leave this blank.  When handling IT1 lines in invoices produced by others, it is essential that you verify the line item with a secondary value other than just the line number.  Using a part number or &#8220;Product or Service ID Value&#8221; to match against the line is a good best practice.</td>
</tr>
<tr>
<td width="10%" align="left" valign="top"><em>IT1_02 </em></td>
<td>This is the quantity invoiced.  Most of the time people will just call this the quantity, but there are places and times, (like in an invoices) that quantity ordered and other quantities have a distinction.  The quantity is Numeric integers only.  Invoicing fractions of something is not supported.  The IT1_02 is conditional with the IT1_03 and IT1_04, if one exists all others are required.</td>
</tr>
<tr>
<td width="10%" align="left" valign="top"><em>IT1_03 </em></td>
<td>This is the Unit of Measure.  It is a 2 character, Alpha-Numeric value.  It is also an encoded value.  Being “encoded” means that there is a list of acceptable values for this element, any value outside of that set is invalid and will cause an exception.When the IT1_02 and IT1_03 are used together, we can tell how much of something is being Invoiced.  1 CA (1 case) is not the same as Invoicing 1 EA (1 each) of an item.</td>
</tr>
<tr>
<td width="10%" align="left" valign="top"><em>IT1_04 </em></td>
<td>This is the Price.  This is a Numeric, but can be decimal it is not strictly currency formatted, so it is possible to have item prices precise past $0.01.  This is the price of a single item, so we would multiply the IT1_02 and the IT1_04 to arrive at the cost of the line item.  (We might also have a additional charges or tax on a line item in another segment within the IT1 loop.  If this is the case, that cost would also be included in the cost total of the line item but not multiplied by the quantity.)</td>
</tr>
<tr>
<td width="10%" align="left" valign="top"><em>IT1_05 </em></td>
<td>This is the Price Basis Code.  This is optional, and most of the time is not used.  If it is used, it denotes where the IT1_04 price was derived from.</td>
</tr>
<tr>
<td width="10%" align="left" valign="top"><em>IT1_06 </em></td>
<td>Is a Product or Service Qualifier.  This element is a 2 character, encoded value.  All of the “Qualifier” defined elements are encoded values.  This, again, means that there is a list of acceptable values for this element, any value outside of that set is invalid and will cause an exception.This qualifier defines what type of value is found in the next element, the IT1_07.  So if the IT1_06 has a “VC”, then the IT1_07 contains a Vendor’s Catalog Number.  (This means it is a part number as found in the Vendor Catalog.)</td>
</tr>
<tr>
<td width="10%" align="left" valign="top"><em>IT1_07 </em></td>
<td>This is a Product or Service ID.  It is Alpha-Numeric, and can be from 1 to 48 characters in length.  It is conditional with the IT1_06, if one is present, the other must be present.  This value is an identifier like a part number or other type of line item data.</td>
</tr>
<tr>
<td width="10%" align="left" valign="top"><em>IT1_08 </em></td>
<td>The IT1_08 has the exact same definition as the IT1_06 with the exception that it defines the type of value is found in the IT1_09.</td>
</tr>
<tr>
<td width="10%" align="left" valign="top"><em>IT1_09 </em></td>
<td>The IT1_09 has the exact same definition as the IT1_07.  This is a Product or Service ID.  It is Alpha-Numeric, and can be from 1 to 48 characters in length.  It is conditional with the IT1_08, if one is present, the other must be present.  This value is an identifier like a part number or other type of line item data.</td>
</tr>
<tr>
<td width="10%" align="left" valign="top"><em>IT1_06 to IT1_25</em></td>
<td>This pattern continues all way to <em>IT1_24 </em>and <em>IT1_25. </em>All of the segment pairs from IT1_06 to IT1_25 that have the same potential values for each pair.  In earlier version of EDI, like 3010, the IT1 segment only had 23 elements.  Or in other words it was one Product or Service pair shorter that what we have in  4010.</td>
</tr>
</tbody>
</table>
<p>I wrote a section on Line Item Good Form and Best Practices in the article about <a href="http://www.theintegrationengineer.com/line-item-part-one-po1/">PO1 Line Items</a>.  Instead of repeating that I will just let you hop over there are read it.</p>
<p><strong>IT1 Loop Segments</strong></p>
<p>As we said in the beginning, the IT1 is a segment, and a <a href="../edi-repeated-segments/">loop/group.</a> And as you may have noticed, there is data that you may need that is not covered in the elements available in the IT1 Segment that belong to the line item.  Values like Tax information, found in the TAX and TXI segments.  These and other values are found on the line item, but are not on the IT1 segment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.theintegrationengineer.com/line-item-part-two-it1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Line Item Part one, PO1</title>
		<link>http://www.theintegrationengineer.com/line-item-part-one-po1/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=line-item-part-one-po1</link>
		<comments>http://www.theintegrationengineer.com/line-item-part-one-po1/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 16:40:28 +0000</pubDate>
		<dc:creator>Roy</dc:creator>
				<category><![CDATA[b2b]]></category>
		<category><![CDATA[EDI]]></category>
		<category><![CDATA[Elements]]></category>
		<category><![CDATA[Segments]]></category>
		<category><![CDATA[850]]></category>
		<category><![CDATA[E-Commerce]]></category>
		<category><![CDATA[Line Item]]></category>
		<category><![CDATA[PO]]></category>
		<category><![CDATA[Purchase Order]]></category>
		<category><![CDATA[Segment]]></category>

		<guid isPermaLink="false">http://www.theintegrationengineer.com/?p=725</guid>
		<description><![CDATA[When we are dealing with supply chain or e-commerce related EDI, we probably will deal with line item data.  On a Purchase Order, (PO) or 850, the line item data is contained on the PO1 segment or the PO1 group.  (PO1 is a group or loop so it is more than just a segment.)  In [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-761" src="http://www.theintegrationengineer.com/wp-content/uploads/2009/10/PO1_Block.png" alt="PO1 Block Line Item Part one, PO1" width="101" height="54" title="Line Item Part one, PO1" />When we are dealing with supply chain or e-commerce related EDI, we probably will deal with line item data.  On a Purchase Order, (PO) or 850, the line item data is contained on the PO1 segment or the PO1 group.  (PO1 is a <a href="http://www.theintegrationengineer.com/edi-repeated-segments/">group or loop</a> so it is more than just a segment.)  In this article we will discuss what data is found on the PO1 segment, and how it should be handled on both inbound and outbound document.  For clarity, we are going to use the 4010 x12 standard.  The PO1 hasn&#8217;t changed in content for a while, but it has gotten longer, (you will see how this works when we talk about the PO1 elements).<span id="more-725"></span></p>
<p><strong>Parts of the PO1</strong></p>
<p>Here is a diagram of a sample PO1 segment:</p>
<p style="text-align: center">
<p><img class="size-full wp-image-757 aligncenter" src="http://www.theintegrationengineer.com/wp-content/uploads/2009/10/PO1_Diagram.png" alt="PO1 Diagram Line Item Part one, PO1" width="566" height="319" title="Line Item Part one, PO1" /></p>
<p>Like any other segment in EDI, the PO1 segment is composed of elements.  Here is a list, element by element and what it contains.</p>
<table border="1" cellspacing="0" cellpadding="5" width="100%">
<tbody>
<tr>
<td width="10%" align="left" valign="top"><em>PO1_01</em></td>
<td>This is the Line Identifier, or Line Number.  This is a value that must be unique among the lines or PO1 segments of a purchase order.  There is no rule that these must be incrementing integers starting at 1.  But it is normal for these to be Numeric even if the type is Alpha-Numeric.  And it is general practice to have them increment in some fashion.  Thus having the first line item number as 1.  The second as 2, and so forth.  I have also seen the first line item being 10 , the second 20 and so forth.  As well as 001 and 002.</p>
<p>In any case, I would discourage using random numbers.  And I would discourage using Alpha-Numerics.  These may confuse your trading partners and cause them to have exceptions that there is no need to have.  On the other hand, when planning on handling line numbers from other parties, you should expect that they might not be using nice incrementing numbers.  This will prevent getting exceptions in your system when your trading partner does something odd.</td>
</tr>
<tr>
<td width="10%" align="left" valign="top"><em>PO1_02 </em></td>
<td>This is the quantity ordered.  Most of the time people will just call this the quantity, but there are places and times, (like in order responses, invoices and shipping notices) that quantity ordered and other quantities have a distinction.  The quantity is Numeric integers only.  Ordering fractions of something is not supported.  The PO1_02 is conditional with the PO1_03, if one exists the other is required.</td>
</tr>
<tr>
<td width="10%" align="left" valign="top"><em>PO1_03 </em></td>
<td>This is the Unit of Measure.  It is a 2 character, Alpha-Numeric value.  It is also an encoded value.  Being &#8220;encoded&#8221; means that there is a list of acceptable values for this element, any value outside of that set is invalid and will cause an exception.</p>
<p>When the PO1_02 and PO1_03 are used together, we can tell how much of something is being ordered.  1 CA (1 case) is not the same as ordering 1 EA (1 each) of an item.  Generally this is not a problem.  The data in the catalog is accurate.  When there is a problem, it is important to go back to the PO to find out exactly how many items were ordered and in what UOM.</td>
</tr>
<tr>
<td width="10%" align="left" valign="top"><em>PO1_04 </em></td>
<td>This is the Price.  It is optional, but most of the time is present.  It is required if the PO1_05 is present.  This is a Numeric, but can be decimal  it is not strictly currency formatted, so it is possible to have item prices that precise past .01.  This is the price of a single item, so we would multiply the PO1_02 and the PO1_04 to arrive at the cost of the line item.</td>
</tr>
<tr>
<td width="10%" align="left" valign="top"><em>PO1_05 </em></td>
<td>This is the Price Basis Code.  This is optional, and most of the time is not used.  If it is used, it denotes where the PO1_04 price was derived from.</td>
</tr>
<tr>
<td width="10%" align="left" valign="top"><em>PO1_06 </em></td>
<td>Is a Product or Service Qualifier.  This element is a 2 character, encoded value.  All of the &#8220;Qualifier&#8221; defined elements are encoded values.  This, again, means that there is a list of acceptable values for this element, any value outside of that set is invalid and will cause an exception.</p>
<p>This qualifier defines what type of value is found in the next element, the PO1_07.  So if the PO1_06 has a &#8220;VC&#8221;, then the PO1_07 contains a Vendor&#8217;s Catalog Number.  (This means it is a part number as found in the Vendor Catalog.)</td>
</tr>
<tr>
<td width="10%" align="left" valign="top"><em>PO1_07 </em></td>
<td>This is a Product or Service ID.  It is Alpha-Numeric, and can be from 1 to 48 characters in length.  It is conditional with the PO1_06, if one is present, the other must be present.  This value is an identifier like a part number or other type of line item data.</td>
</tr>
<tr>
<td width="10%" align="left" valign="top"><em>PO1_08 </em></td>
<td>The PO1_08 has the exact same definition as the PO1_06 with the exception that it defines the type of value is found in the PO1_09.</td>
</tr>
<tr>
<td width="10%" align="left" valign="top"><em>PO1_09 </em></td>
<td>The PO1_09 has the exact same definition as the PO1_07.  This is a Product or Service ID.  It is Alpha-Numeric, and can be from 1 to 48 characters in length.  It is conditional with the PO1_08, if one is present, the other must be present.  This value is an identifier like a part number or other type of line item data.</td>
</tr>
<tr>
<td width="10%" align="left" valign="top">PO1_06 to PO1_25</td>
<td>This pattern continues all way to <em>PO1_24 </em>and <em>PO1_25. </em>All of the segment pairs from PO1_06 t PO1_25 that have the same potential values for each pair.  In earlier version of EDI, like 3010, the PO1 segment only had 23 elements.  Or in other words it was one Product or Service pair shorter that what we have in  4010.</td>
</tr>
</tbody>
</table>
<p><strong>Good Form on PO1 line</strong></p>
<p><a href="http://www.theintegrationengineer.com/edi-in-good-form/">EDI in Good Form</a> is both style and best practice tips to avoid common exceptions.  Paying attention to good form tips and best practices helps you create an integration solution that is not only complies to the standard, but functions to help you and your trading partner have an unnecessary support burden due to the avoidable unexpected.</p>
<p>1.  It is bad from to have PO1 Product and Service pairs that are empty.  This relates to not having any trailing element delimiters.  It also goes along with not having empty pairs in the line with populated Product and Service element pairs following.  Thus it is best to build your mapping so that optional data doesn&#8217;t create empty elements when it opts out.</p>
<p>2.  When reading a PO1 line, it is best to assume that an expected Product and Service value could be in any pair.  So the map needs to walk down the pairs of elements until it finds the qualifier that indicates the value you are looking for.  This allows you to use the same input map with multiple EDI producing trading partners that may have interpreted the priority of data in different ways, and avoid exceptions.</p>
<p>3.  When producing EDI with a PO1 line, it is best to be as consistent as possible with your placement of the Product and Service data.  Create your logic and mapping so that mandatory data occurs early in the PO1 line, and optional data is moved to the end.  This will keep your required data from hopping around positionally.  This will help your trading partners that may not have had the foresight to follow Good Form Tip number 2 from having exceptions that slow down you process.</p>
<p><strong>PO1 Loop Segments</strong></p>
<p>As we said in the beginning, the PO1 is a segment, and a <a href="http://www.theintegrationengineer.com/edi-repeated-segments/">loop/group.</a> And as you may have noticed, there is data that you may need that is not covered in the elements available in the PO1 Segment that belong to the line item.  Values like Item Description, found in the PID segment. Or Tax information, found in the TAX and TXI segments.  These and other values are found on the line item, but are not on the PO1 segment.  We will have talk about some of these other segments and where to find other common data on another day.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.theintegrationengineer.com/line-item-part-one-po1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Who Owns Data</title>
		<link>http://www.theintegrationengineer.com/who-owns-data/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=who-owns-data</link>
		<comments>http://www.theintegrationengineer.com/who-owns-data/#comments</comments>
		<pubDate>Wed, 29 Jun 2011 12:25:59 +0000</pubDate>
		<dc:creator>Roy</dc:creator>
				<category><![CDATA[b2b]]></category>
		<category><![CDATA[Data]]></category>
		<category><![CDATA[Supply Chain]]></category>

		<guid isPermaLink="false">http://www.theintegrationengineer.com/?p=2380</guid>
		<description><![CDATA[As someone that has been involved in the supply chain industry, this questions has come up more than once, and at more than one place of business. For both vendors and retailers, having access to better, broader and more accurate information is worth money.  And is sometimes the difference between life and death of a [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.theintegrationengineer.com/wp-content/uploads/2009/01/delimitedillustration.jpg"><img class="alignleft size-thumbnail wp-image-72" title="Illustration of Delimited Data" src="http://www.theintegrationengineer.com/wp-content/uploads/2009/01/delimitedillustration-150x150.jpg" alt="delimitedillustration 150x150 Who Owns Data" width="150" height="150" /></a>As someone that has been involved in the supply chain industry, this questions has come up more than once, and at more than one place of business.  For both vendors and retailers, having access to better, broader and more accurate information is worth money.  And is sometimes the difference between life and death of a business in a competitive market.</p>
<p>When businesses realize that the catalog data that they have may be worth as much as the products or services that they sell, they may be tempted to sell that instead.  Before they do, they need to think about who owns the data.</p>
<p><span id="more-2380"></span></p>
<p>Lets say hypothetically that there is an integration tool that helps people that sell widgets, get widget pricing and data from people that make widgets.  And this integration tool also helps people that sell widgets, place orders, and people who make widgets, invoice and collect payment from those that sell.  The data that passes accross this integration tool is, in itself valuable to both the people that sell the widgets, and the people that buy widgets.</p>
<p>Other companies making widgets would be interested to know that there are people selling widgets that are getting shipping delays when they order from other widget makers.  And people who sell widgets would like to know if there are people that make widgets cheaper than from those they are buying from.</p>
<p>But if I make widgets, I don&#8217;t want other widget makers to see what my prices are.   If I sell widgets, I don&#8217;t want other widget sellers to know what I am paying for my widgets.  This information is something that makes me able to compete.  It is the type of information that the widget maker and seller want to own, and control when and if it is released.</p>
<p>But there is one person that knows all of this information about all of the widget makers and sellers.   That is the person that has access to the data of the integration tool.  It is also likely that the manufacturer and retailer have signed contracts about the disclosure of the information.  This information is confidential and can not be disclosed to other parties.</p>
<p>I was involved with one company that sold the information or information about it back to the manufacturers and retailers.  Since we had all of the data, we could easily report when there were discrepancies between orders, and shipments.  So we reported to the retailer patterns of  order anomalies they were having with all of their vendors.  We also reported catalog errors to the vendors so they could see what retailers continued to use bad or old part numbers.</p>
<p>And then the tricky part.  We convinced the vendors and retailers to let us have access to their data for &#8220;Industry Analytic&#8221;  products.  For this the information became abstracted so that no one could see information about a specific retailer or vendor.  But they could see industry trends or get a score card reports of a variety of metrics relating to their supply chain health.</p>
<p>This was a fun project to be a part of.  And the company I was with created whole new products and revenue streams.  But you don&#8217;t have to be a supply chain integration company to make use of data that you own.  If you have vendors here are a three questions that you can ask your database people to provide you with.</p>
<ol>
<li>Order time to Fulfillment time.</li>
<li>Back Order or Out of Stock frequency.</li>
<li>Order Price to Invoice price accuracy.</li>
</ol>
<p>And there are more questions to ask.  Asking them can help you to see places where your supply chain is leaky, and can help you start to leverage data that you own to improve your own bottom line.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.theintegrationengineer.com/who-owns-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Validate to Standard, not to spec</title>
		<link>http://www.theintegrationengineer.com/validate-to-standard-not-to-spec/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=validate-to-standard-not-to-spec</link>
		<comments>http://www.theintegrationengineer.com/validate-to-standard-not-to-spec/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 13:31:08 +0000</pubDate>
		<dc:creator>Roy</dc:creator>
				<category><![CDATA[b2b]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[Supply Chain]]></category>
		<category><![CDATA[analyzer]]></category>
		<category><![CDATA[EDI]]></category>
		<category><![CDATA[exception]]></category>
		<category><![CDATA[Foresight]]></category>
		<category><![CDATA[Standard]]></category>
		<category><![CDATA[validation]]></category>

		<guid isPermaLink="false">http://www.theintegrationengineer.com/?p=334</guid>
		<description><![CDATA[After you have created your usage specification, it can be useful to use a validation tool to check to verify that new trading partners comply during your boarding process. I have used Foresight&#8217;s EDI Analyzer for this many times, and it lets be quickly see where the EDI file departs from the specification. There is [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-542" src="http://www.theintegrationengineer.com/wp-content/uploads/2009/08/valid-logic-pzl.jpg" alt="valid logic pzl Validate to Standard, not to spec" width="160" height="161" title="Validate to Standard, not to spec" />After you have created your usage specification, it can be useful to use a validation tool to check to verify that new trading partners comply during your boarding process.  I have used <a href="http://www.foresightcorp.com/products/analyzer.htm">Foresight&#8217;s EDI Analyzer</a> for this many times, and it lets be quickly see where the EDI file departs from the specification.</p>
<p>There is a temptation to use this same validation in the production integration.  But this would be a mistake.  I&#8217;m not saying, &#8220;Don&#8217;t validate.&#8221;  I highly encourage validation on both standard compliance and required data validation in mapping and integration.  But to use the usage specification has a side effect that I witnessed once.  (Only once.)<span id="more-334"></span></p>
<p><strong>Validating Transactional EDI to Usage Specification</strong></p>
<p>We had an integration requirement once that required that we only allow EDI elements that were in our usage specification.  This was outside of our normal process and we all soon learned why.</p>
<p>When we validated EDI files based on the standard, we would error out documents that were corrupted, or in violation of the full EDi specification. (having mangled segments, or invalid UOMs and such.) But this one time, we thought it would be a good idea to also fail documents that had any extra data that we weren&#8217;t going to use.  So we pulled all of the segments and elements out so that we were just down to what was in our usage specification.</p>
<p>This worked just like we told it to.  As when the next file came in that was in bad form with extra trailing delimiters on the line item, it failed.  And then the next with an extra segment that we didn&#8217;t care about?  Well it failed too.  As so on.</p>
<p>We soon were buried under failed EDI files that were valid EDI, and did contain the data we needed, but simply had something extra.  And we were calling them all exceptions.</p>
<p>At first we added in a few of the common segments that were being sent.  This relieved the lion&#8217;s share of the errors.  But it still cropped up from time to time.  Each time we would have failures for this reason we had to explain why.  This grew tedious and embarrassing.</p>
<p>Eventually we re-mapped the doc-type using the complete standard in our validation.  Magically all of these errors went away, and so did the embarrassing explanations.</p>
<p><strong>Here is the way the process should work, generalized.</strong></p>
<p style="padding-left: 30px">1.  EDI envelop is validated against EDI standard.<br />
2.  EDI document is validated against EDI standard<br />
3.  Mission critical values are validated against Usage Specification.<br />
4.  File is processed.</p>
<p>What this does is to establish an inherent hierarchy of exceptions.  Transactions that fail on step 1 are all falling because the envelope is corrupt or  in error.  Also, Transactions that fail on step 2 are failing for a general EDI reason.  Both of these steps will have exceptions that can be handled by anyone with EDI knowledge.  Operational and Application rules don&#8217;t necessarily need to be known to understand how to handle errors at these levels.</p>
<p>Step 3 and 4 are exactly the opposite.  Errors that happen because of mission critical data that is missing or in error must be handled by someone that knows what the mission critical form is supposed to look like.  And files that pass validation but fail later in processing may need to be corrected and the validation process updated.  Or they may point to an error in the application itself.  In any case, much more knowledge of the whole process is required at these stages.</p>
<p><strong>Take Away</strong></p>
<p>First, by sharing this experience I hope that everyone can appreciate that sometimes requirements make us to funny things.  But I also wanted to share the approach to validation that I have found most helpful.  I have seen implementation that don&#8217;t do any EDI or Enveloping validation.  These are just as dangerous and frustrating as my experience.  But now all of the errors are pushed down to step 3 and 4.</p>
<p>I&#8217;d also like to invite you to subscribe to my <a href="http://www.theintegrationengineer.com/subscribe/">newsletter</a>.  It comes out once a month, starting at the end of this month.  I&#8217;ve got some great ideas for it, and think it will be terrific.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.theintegrationengineer.com/validate-to-standard-not-to-spec/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EDI Standards Reference</title>
		<link>http://www.theintegrationengineer.com/edi-standards-reference/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=edi-standards-reference</link>
		<comments>http://www.theintegrationengineer.com/edi-standards-reference/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 16:25:23 +0000</pubDate>
		<dc:creator>Roy</dc:creator>
				<category><![CDATA[b2b]]></category>
		<category><![CDATA[EDI]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[ASC]]></category>
		<category><![CDATA[doctypes]]></category>
		<category><![CDATA[EDISIM]]></category>
		<category><![CDATA[File]]></category>
		<category><![CDATA[Foresight]]></category>
		<category><![CDATA[format]]></category>
		<category><![CDATA[reference]]></category>
		<category><![CDATA[sample data]]></category>
		<category><![CDATA[SEF]]></category>
		<category><![CDATA[Standard]]></category>
		<category><![CDATA[validation]]></category>
		<category><![CDATA[X12]]></category>

		<guid isPermaLink="false">http://www.theintegrationengineer.com/?p=102</guid>
		<description><![CDATA[I have sitting on my desk, a very expensive book published by the ASC that contain the guidelines for the X12 3010 EDI standard.  I have rarely used them.  The EDI standards tool that I have used the most and can highly recommend is EDISIM from Foresight.  The last version that I used was version [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-450" src="http://www.theintegrationengineer.com/wp-content/uploads/2009/07/DeskBooks_pzl.jpg" alt="DeskBooks pzl EDI Standards Reference" width="113" height="128" title="EDI Standards Reference" />I have sitting on my desk, a very expensive book published by the ASC that contain the guidelines for the X12 3010 EDI standard.  I have rarely used them.  The EDI standards tool that I have used the most and can highly recommend is <a href="http://www.foresightcorp.com/products/edisim.htm">EDISIM from Foresight</a>.  The last version that I used was version 5.0 and they are on version 6.8 as I write this post.  But for a long time, Foresight has nailed the conceptualization of working with EDI standards.</p>
<p>One of the things that in invaluable is the ability to share your standard documentation both internally and externally.  EDISIM is a tool that has allowed me to do that.  They produce a very professional looking document for external consumption and the standard is exportable so that everyone using EDISIM can share the same standards file in a format called SEF.</p>
<p><span id="more-102"></span></p>
<p><strong> Features of a Good Standards Reference</strong></p>
<p><em>Navigate Standards</em> (multiple versions, doctypes, segments, etc)</p>
<p style="padding-left: 30px;">A Standards Reference needs to offer a navigation interface of some kind.  You need to be able to see the versions,  standards and document types.  You will also want to drill in and view the reference outside of the document types, and  browse the segments or data element definitions.  But at the core, you need to be able to see a graphical representation of the standard, view the format and see the structure of how data will be represented in the EDI format and document.</p>
<p><em>Edit Standards</em></p>
<p style="padding-left: 30px;">Just browsing the standard is not going to get the job done.  You need to be able to make alteration so that you don&#8217;t just have the high level X12 standard, like the book on my desk, but can make a standard that is your usage specification.  This means you will need to be able to do two operations on the standard.</p>
<p style="padding-left: 30px;">First you will need to make changes to what elements and segments are displayed, and make changes to the encoded values that these elements support.  Editing these structures will aid you when you use the standard to validate and check for compliance based on your usage specification, and when creating documents to share and publish.</p>
<p style="padding-left: 30px;">Second you will be able to add some of your business rules documentation to clarify the default definition of the standard.  This is especially useful if you need to pass some data that uses a mutually defined qualifier.  This lets you define what the &#8220;mutually defined&#8221; value should be.  This again helps when you publish and share your standard.</p>
<p><em>Export and Import</em> (Read SEF)</p>
<p style="padding-left: 30px;">All of the standards references that I have used had the ability to import and export a standard in an SEF file format.  SEF or &#8220;Standard Exchange Format&#8221; is a file that holds the standard dictionary and format for EDI files.  This is a nice way to  not only transfer and store the standard your company uses so that everyone has a copy of the same usage implementation.  But if no proprietary information is stored in the notes, it can be sent to trading partners out side of the company to aid in their integration efforts.  Any other export and import is a bonus, but SEF is a requirement..</p>
<p><em>Print</em> (export to doc or pdf, or printer)</p>
<p style="padding-left: 30px;">In spite of all this paperlessness, some times we still need to print things out.  Printing to a pdf or printing to paper is useful when sharing the standard and usage specification in a non-editable format so that others can view it, and make use of the information.  So for managers, or clients, or other parties that only need a viewable format to follow, this feature is a must have.</p>
<p><em>Save as editable file</em> (RTF or other.)</p>
<p style="padding-left: 30px;">Ok, just like printing, sometimes companies want all of their documentation to look the same.  To facilitate this, it is nice to be able to save the specification out to a rtf, or doc, and then add the company header, logo, watermark, etc.  This allows you to take the standards reference and really own the edits and notes that you have added.  For companies that have extensive documentation processes, this feature is a must have.</p>
<p><strong>Other Good Reference Features</strong></p>
<p><em>Validation</em></p>
<p style="padding-left: 30px;">Validation is not a feature of an EDI standards reference, but it is a good tool that sometimes comes with them.  Validation tools read and EDI file, and compare the contents with the standard.  They should then identify all of the errors they can see and report on them.</p>
<p style="padding-left: 30px;">In my experience validations may need to be run repeatedly as some errors in an EDI file will mask following errors.  For instance, if  the N1 segment is wrong, the validator may not be able to tell if all of the other lines in the N1 loop are valid.  So when I validate an EDI file, I correct the errors seen on the first pass and re-validate.  This has saved me from telling a trading partner to fix an issue, only to have to tell them about another issue later.  After all, we do want our integrations to go quickly.</p>
<p><em>Test Data</em></p>
<p style="padding-left: 30px;">Sometimes looking at the standard is just not enough to show us how things will look when formed into the document.  Seeing sample data is essential, and one of the first things I request at the beginning of any integration project.  A Standards Reference will sometimes have tools that will create a test data EDI file based on the standard.  This can be useful if you are working with a new document type that you haven&#8217;t encountered before and need to see how the standard looks in the formed document.</p>
<p><strong>Evaluation of Standards Reference Technologies</strong></p>
<p>Is there a feature that I have missed?  Please let me know.  Also,what EDI standards reference tools have you used?  What do you like or dislike about them?  How about any non-EDI specific tools?  Please let me know what you have used.  I would like to compile a list of tools and run some comparisons of what is out there.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.theintegrationengineer.com/edi-standards-reference/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EDI Repeated Segments</title>
		<link>http://www.theintegrationengineer.com/edi-repeated-segments/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=edi-repeated-segments</link>
		<comments>http://www.theintegrationengineer.com/edi-repeated-segments/#comments</comments>
		<pubDate>Sun, 28 Jun 2009 17:13:59 +0000</pubDate>
		<dc:creator>Roy</dc:creator>
				<category><![CDATA[b2b]]></category>
		<category><![CDATA[EDI]]></category>
		<category><![CDATA[Segments]]></category>
		<category><![CDATA[context]]></category>
		<category><![CDATA[Envelope]]></category>
		<category><![CDATA[Group]]></category>
		<category><![CDATA[Loop]]></category>
		<category><![CDATA[Repeating]]></category>
		<category><![CDATA[Segment]]></category>

		<guid isPermaLink="false">http://www.theintegrationengineer.com/?p=133</guid>
		<description><![CDATA[In EDI there is a construct called a Loop.  But this is not like you think of a loop using an while  statement.  EDI is a file format, not a programming language.  When we speak of Loops in EDI, what we are really talking about is repeated structures, or segments. EDI is not a flat [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-134" title="loop" src="http://www.theintegrationengineer.com/wp-content/uploads/2009/05/loop.jpg" alt="loop EDI Repeated Segments" width="102" height="102" />In EDI there is a construct called a Loop.  But this is not like you think of a loop using an while  statement.  EDI is a file format, not a programming language.  When we speak of Loops in EDI, what we are really talking about is repeated structures, or segments.</p>
<p>EDI is not a <a href="http://www.theintegrationengineer.com/flat-files/">flat file</a>, but it does have repeated lines or segments.  Some times this repetition comes in groups and sometimes its just a line that get repeated in part of the document.  Repeating structured data is fundamental to EDI, but can become difficult to interpret at times.  Understanding the types of repeating structures and when and where they may occur can save a lot of time.<span id="more-133"></span></p>
<h2>Repetition</h2>
<p>There are three kinds of loops/repeated segments; First there is a simple segment that can appear more than once.  Lets call this a Repeating Segment.  Second there is a group of segments that appear together, and may repeat.  Lets call this a Repeating Group.  And finally there is a segment or group that repeats within a beginning and ending loop envelope.  Lets call this a Repeating Envelop.</p>
<h2>Repeating Segments</h2>
<p>A repeating segment is pretty much just what it sounds like, a segment that may occur more than one time.  A good example of this would be the AMT segment.  The AMT is a segment that contains a monetary value.  The AMT_01 declares what type of value it is, and the AMT_02 has the amount of money.  In an EDI document like an invoice, we may need to have many values, subtotals, taxes, base price, and so on.  Having a repeating segment lets us put all of these values on their own independent segment to be interpreted and included as best fits the Trading Partners and the nature of the transaction.<a href="http://12967i2wnvdrcfsnl1fdmv2gvr.hop.clickbank.net/" target="_top"><img class="alignright size-full" src="http://www.pdf-creator.us/images/m-softbox.jpg" width="176" height="338" title="EDI Repeated Segments" alt="m softbox EDI Repeated Segments" /></a></p>
<p>Here is an example of an <a href="http://www.theintegrationengineer.com/edi-wrapped-and-unwrapped/">unwrapped</a> N1 group where the N3 is repeated:</p>
<p>N1*AC*ARTHUR JONES*1*9012345918341*11*SE~<br />
N2*GEORGE WASHINGTON~<br />
N3*157 WEST 57TH STREET~<br />
N3*Suite 2001*5th Floor~<br />
N4*CINCINNATI*OH*43017~</p>
<p>When segments are repeatable, they are indicated with a &#8220;Max Use&#8221; value of greater than one in the <a href="http://www.theintegrationengineer.com/tool-box/#Spec">standards and usage specification</a>.  In the N1 Group, the N2 and N3 segments may have a max use of 2.</p>
<h2>Repeating Groups</h2>
<p>A repeating group is also what it sounds like.  It is a group of segments that work together and get repeated.  This loop is generally referred to by the primary segment.  This segment is required in this group.  This means that if this group occurs, this segment must also occur.</p>
<p>Most Repeating Groups are contextual.  This means that they are defined by the segments that surround them, and are terminated by the first segment that is not in the group, or starting the group again.  So a Repeating Group may repeat, but as soon as we move out of the segments in this group, we are done repeating it and move on to the next segments or groups defined in the standard.</p>
<p>The N1 is a good example.  The N1 group contains name, address and contact related information.  The only required segment is the N1.  Subordinate to the N1 (that contains name and such) is the N2 (that contains secondary name or attention type data.) Then comes the N3 (with the street address) and then the N4 (with the city, state, country, zip).</p>
<p>Not all groups have the same letters, like &#8216;N&#8217; and the N1 group is no different.  It also contains the PER segment that contains a persons name, and contact info like phone number or email.  Any PER that happens under an N1 is for that location.</p>
<p>In a document like an order you may want to have the address and contact for the shipper, the receiver, a biller, and a payer.  There are many possibilities, and these are all repeated in this group. Here is an example of an <a href="http://www.theintegrationengineer.com/edi-wrapped-and-unwrapped/">unwrapped</a> N1 group where the that is repeated:</p>
<p>N1*ST*MRS JONES*1*123456789*11*SE~<br />
N2*BEVERLY SIMPSON~<br />
N3*157 WEST 57TH STREET~<br />
N4*CINCINNATI*OH*43017~<br />
N1*SF*MR JONES*1*9012345918341*11*SE~<br />
N2*MAGGIE MCGILLICUTTY~<br />
N3*1001 MAPLE STREET~<br />
N4*PITTSBURGH*PA*86753~</p>
<p>Segments that are in a repeating group are listed as being in a Loop.  They may be repeated whenever the loop is repeated as specified in the <a href="http://www.theintegrationengineer.com/tool-box/#Spec">standards and usage specification</a>.  Thus you may have a max use of the N3 as 2, and an N1 Loop that has a max use of 1000.  So really you could see 2000 N3 segments, (2 for each of the 1000 possible N1 loops).</p>
<h2>Repeating Envelope</h2>
<p>A repeating envelope makes reference to EDI Enveloping.  Basically, the ISA-IEA envelope can contain one or more GS-GE envelopes.  And each GS-GE can contain more than one ST-SE envelope.  These levels of enveloping are covered in greater detail on the <a href="http://www.theintegrationengineer.com/edi-enveloping-part-one/">EDI Enveloping</a> page.  But it doesn&#8217;t have to stop there.  In the 3050 850 document there is a loop called LS-LE that contains terms.  This section happens inside the ST-SE.  And there is nothing to prevent other sub envelops from happening where there is a need.</p>
<p>What is fundamental to these types of loops is that they have a designated beginning, and ending.  They must have both.  Repeating Groups end when a beginning of a new iteration of the loop is found, or a segment that is not in the group is found.  This can leave some ambiguity if the standard is not followed closely.  The Repeating Envelope leaves nothing to chance and declares that it is done.</p>
<h2>A note about Required segments</h2>
<p>You may have noticed in the examples above or in the specification that we referenced that there are required segments in loops that are optional.  This is not a contradiction and I will explain this here.  A loop may be optional.  If it is, then it may be ommitted entirely from a document while still compliant with the standard.  If the loop is included, then the required and optional segments within that loop apply.  And they apply in each instance of the loop.  (We can&#8217;t have an second N1 loop unless we include the required N1 segment.)</p>
<p>Basically this is like scope in XML.  The requirements of mandatory or optional only apply within the scope of the loop where they are defines. in the same fashion as sub nodes in and XML hierarchy.</p>
<h2>Basic Fundamentals to Remember</h2>
<ol>
<li>Some segments can occur more than once, or can be repeated.</li>
<li>Some groups of segments can and often do occur more than once.  These are contextual and are terminated by segments after the group in the standard.</li>
<li>Some segments are encapsulated in beginning and ending segments like enveloping.  These segments can repeat, but only in another encapsulation or envelope.</li>
<li>The standard will indicate when repetition is allowed.</li>
</ol>
<p>&#8211;</p>
<p>Looking for something else relating to EDI?  Check out the <a href="http://www.theintegrationengineer.com/the-edi-primer/">EDI Primer</a> post</p>
<p>&#8211;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.theintegrationengineer.com/edi-repeated-segments/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EDI Enveloping Part Four (The ST)</title>
		<link>http://www.theintegrationengineer.com/edi-enveloping-part-four-the-st/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=edi-enveloping-part-four-the-st</link>
		<comments>http://www.theintegrationengineer.com/edi-enveloping-part-four-the-st/#comments</comments>
		<pubDate>Tue, 26 May 2009 16:00:44 +0000</pubDate>
		<dc:creator>Roy</dc:creator>
				<category><![CDATA[b2b]]></category>
		<category><![CDATA[EDI]]></category>
		<category><![CDATA[Envelope]]></category>
		<category><![CDATA[Segments]]></category>
		<category><![CDATA[ST]]></category>
		<category><![CDATA[Control Numbers]]></category>
		<category><![CDATA[counter]]></category>
		<category><![CDATA[Document]]></category>
		<category><![CDATA[Document Identifier]]></category>
		<category><![CDATA[Document Type]]></category>
		<category><![CDATA[format]]></category>
		<category><![CDATA[SE]]></category>
		<category><![CDATA[segment counter]]></category>
		<category><![CDATA[ST-SE]]></category>

		<guid isPermaLink="false">http://www.theintegrationengineer.com/?p=124</guid>
		<description><![CDATA[The 3rd layer of the EDI envelope is the ST segment.  The ST segment contains a Document Identifier, and a control number. The ST and its partner the SE segment define the beginning and ending of the Document.  The SE segment contains a counter of segments within the document, and the corresponding control number to [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-129" src="http://www.theintegrationengineer.com/wp-content/uploads/2009/05/scroll.jpg" alt="scroll EDI Enveloping Part Four (The ST)" width="76" height="101" title="EDI Enveloping Part Four (The ST)" />The 3rd layer of the EDI envelope is the ST segment.  The ST segment contains a Document Identifier, and a control number. The ST and its partner the SE segment define the beginning and ending of the Document.  The SE segment contains a counter of segments within the document, and the corresponding control number to the ST.  Relatively simple compared to the ISA and the GS.<span id="more-124"></span></p>
<p><strong>Document Identifier</strong></p>
<p>The document Identifier is not encoded.  That is to say, for an 850 the ST document ID is &#8220;850&#8243;.  For an 810, the Document Identifier is &#8220;810&#8243; and so on.  Thus if you open an EDI file, and don&#8217;t recognize the GS_01, skip to the ST_01 and it will tell you what standard you will need to find to read this document.</p>
<p>Good form would dictate that the GS_01 and the ST_01 would specify the same type of document.  The GS would specify it on a functional level, and the ST on the standard level.  Thus they would not be identical strings but would indeed convey the same message about what the document(s) would be.  Some EDI translator or processing software will validate this relationship and some may not.  But in the end consistency is the best policy.</p>
<p><strong>Control Number</strong></p>
<p>The control number is different for the ST than we saw in both the ISA and GS.  The ST_02 is a 3 to 9 digit number.  This means that it will start with 001 not 000000001.  Of course you can still use a 000000001 but don&#8217;t be surprised when you see less than 9 digits in the ST-SE control number.  Whichever you chose, you must do the same for both the ST and SE.</p>
<p>(Using 000 or 000000000 may be allowed, but is not recommended as any application that trims the zeroes will get an empty string and produce an error.  Be nice and only use values greater than zero.)</p>
<p><strong>Segment Counter</strong></p>
<p>The SE segment counter is the part of the ST-SE that gives people hand editing an EDI document the most trouble.  If the counter is inaccurate it indicates that the document is corrupted.  This should fail in all good translators as processing a corrupt EDI file is saying, &#8220;Its okay if we get bad data.&#8221;  This counter represents the number of segment between the ST and before the SE.</p>
<p>And it is just that simple.  Remember that you can have more than one GS-GE envelope inside an ISA-IEA, and you can have more than one ST-SE inside a GS-GE, but you can only have one document of one type in side a ST-SE envelope.</p>
<p>–</p>
<p>For an overview of Enveloping go <a href="http://www.theintegrationengineer.com/edi-enveloping-part-one/">here</a>.</p>
<p>Looking for the <a href="http://www.theintegrationengineer.com/edi-enveloping-part-two-the-isa/">ISA enveloping page</a>?</p>
<p>Looking for the  <a href="http://www.theintegrationengineer.com/edi-enveloping-part-three-the-gs">GS enveloping page?</a></p>
<p>Looking for something else relating to EDI?  Check out the <a href="http://www.theintegrationengineer.com/the-edi-primer/">EDI Primer</a> post</p>
<p> <A HREF="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&#038;MarketPlace=US&#038;ID=V20070822%2FUS%2Ftheinteengi-20%2F8010%2Fb2b49725-0564-4e90-a2d5-2f349cb25499&#038;Operation=NoScript">Amazon.com Widgets</A></p>
]]></content:encoded>
			<wfw:commentRss>http://www.theintegrationengineer.com/edi-enveloping-part-four-the-st/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>EDI:  Wrapped and Unwrapped</title>
		<link>http://www.theintegrationengineer.com/edi-wrapped-and-unwrapped/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=edi-wrapped-and-unwrapped</link>
		<comments>http://www.theintegrationengineer.com/edi-wrapped-and-unwrapped/#comments</comments>
		<pubDate>Mon, 18 May 2009 16:00:14 +0000</pubDate>
		<dc:creator>Roy</dc:creator>
				<category><![CDATA[b2b]]></category>
		<category><![CDATA[EDI]]></category>
		<category><![CDATA[Segments]]></category>
		<category><![CDATA[Flat File]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[MS word]]></category>
		<category><![CDATA[new line]]></category>
		<category><![CDATA[newline]]></category>
		<category><![CDATA[search and replace]]></category>
		<category><![CDATA[substitution]]></category>
		<category><![CDATA[unwrap]]></category>
		<category><![CDATA[Unwrapped]]></category>
		<category><![CDATA[vi]]></category>
		<category><![CDATA[wrap]]></category>
		<category><![CDATA[Wrapped]]></category>
		<category><![CDATA[\n]]></category>

		<guid isPermaLink="false">http://www.theintegrationengineer.com/?p=126</guid>
		<description><![CDATA[EDI in its proper form is wrapped.  This means that there is nothing between the segment terminator and the beginning of the next segment.  Sometimes this is hard to read, for humans anyway.  And at those times people will unwrap the EDI so that it looks more like a flat file.  This is not hard [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-127" title="emptywrapper" src="http://www.theintegrationengineer.com/wp-content/uploads/2009/05/emptywrapper.jpg" alt="emptywrapper EDI:  Wrapped and Unwrapped" width="96" height="96" />EDI in its proper form is wrapped.  This means that there is nothing between the segment terminator and the beginning of the next <a href="http://www.theintegrationengineer.com/edi-segments/">segment</a>.  Sometimes this is hard to read, for humans anyway.  And at those times people will unwrap the EDI so that it looks more like a flat file.  This is not hard to do, and is useful for debugging and trouble shooting processes.  A good parser or validator should be able to read either file.<span id="more-126"></span></p>
<p><strong>Wrapped</strong></p>
<p>As I said wrapped EDI has nothing between the segment terminator and the next segment, in this format;</p>
<p style="text-align: center;">SEG|||~SEG||||||~</p>
<p>and so on.  Wrapped EDI looks like this:</p>
<p>ISA*00*          *00*          *01*9012345720000  *01*9088877320000  *090508*1459*U*00200*000000001*0*T*:~GS*PO*901234572000*908887732000*090508*1459*1*T*004010~ST*850*0001~BEG*01*BK*99AKDF9DAL393*39483920193843*20090508*AN* 3920943*AC*IBM*02*AE*02*BA~DTM*002*20090508*1615*CT*CM*DATE TIME PERIOD~N1*AC*ARTHUR JONES*1*9012345918341*11*SE~N2*MAGGIE MCGILLICUTTY*BEVERLY SIMPSON~N3*PO BOX 123*157 WEST 57TH STREET~N4*CINCINNATI*OH*43017*US*IP*02535~PER*AC*ARTHUR JONES*TE*(614)555-1212*TE*(614)555-1212*TE*(614)555-1212*ADDL CONTACT DESC~PO1*AAA849*100*DP*100.00*PD*AB*ASSEMBLY*BL*BRAND OR LABEL*ON*CUST12345*AB*ASSEMBLY*BL*BRAND OR LABEL*ON*CUST12345*AB*ASSEMBLY*BL*BRAND OR LABEL*ON*CUST12345*AB*ASSEMBLY~PID*F*BC*AX*UNSCENTED*GENERAL PURPOSE*BS*SUBQUALIFIER*N*ENG~CTT*10*855*12345678*HB*40*QD*GENERAL PURPOSE~SE*12*0001~GE*1*1~IEA*1*000000001~</p>
<p><strong>Unwrapped</strong></p>
<p>When we unwrap the EDI, we don&#8217;t just place any character between the segment terminator and the next segment, we place a carriage return and line feed.  This makes all of the segments appear to be justified like separate lines of a text file.  Thus the format is changed in this manner;</p>
<p style="text-align: center;">SEG|||~</p>
<p style="text-align: center;">SEG||||||~</p>
<p style="text-align: left;">and so on.  Unwrapped EDI looks like this:</p>
<p style="text-align: left;">ISA*00*          *00*          *01*9012345720000  *01*9088877320000  *090508*1459*U*00200*000000001*0*T*:~<br />
GS*PO*901234572000*908887732000*090508*1459*1*T*004010~<br />
ST*850*0001~<br />
BEG*01*BK*99AKDF9DAL393*39483920193843*20090508*AN3920943*AC*IBM*02*AE*02*BA~<br />
DTM*002*20090508*1615*CT*CM*DATE TIME PERIOD~<br />
N1*AC*ARTHUR JONES*1*9012345918341*11*SE~<br />
N2*MAGGIE MCGILLICUTTY*BEVERLY SIMPSON~<br />
N3*PO BOX 123*157 WEST 57TH STREET~<br />
N4*CINCINNATI*OH*43017*US*IP*02535~<br />
PER*AC*ARTHUR JONES*TE*(614)555-1212*TE*(614)555-1212*TE*(614)555-1212*ADDL CONTACT DESC~<br />
PO1*AAA849*100*DP*100.00*PD*AB*ASSEMBLY*BL*BRAND OR LABEL*ON*CUST12345*AB*ASSEMBLY*BL*BRAND OR LABEL*ON*CUST12345*AB*ASSEMBLY*BL*BRAND OR LABEL*ON*CUST12345*AB*ASSEMBLY~<br />
PID*F*BC*AX*UNSCENTED*GENERAL PURPOSE*BS*SUBQUALIFIER*N*ENG~<br />
CTT*10*855*12345678*HB*40*QD*GENERAL PURPOSE~<br />
SE*12*0001~<br />
GE*1*1~<br />
IEA*1*000000001~</p>
<p style="text-align: left;"><strong>Converting from Wrapped to Unwrapped and back</strong></p>
<p style="text-align: left;">When you need to do this, you need to do this fast, not manually.  Sure the manual way works with small files, but if you are trying to edit a big invoice or order, you will want to do something snappier than walking through the file segment at a time.  Here are two ways to do it with common tools.</p>
<p style="text-align: left;"><em><strong>VI</strong></em></p>
<p style="text-align: left;">To unwrap:</p>
<ol>
<li>open the file.  Type &#8220;vi [file name]&#8220;</li>
<li>Hit &#8220;:&#8221; to get the command prompt</li>
<li>Type &#8220;%&#8221; to do a every line replace. (may not be needed as this is wrapped, but it doesn&#8217;t hurt.)</li>
<li>Type &#8220;s&#8221; for a substitution.</li>
<li>Type &#8220;/&#8221; to begin the string to find.  (you may need to escape characters like ~ and | with a \.  I will show this in the example)</li>
<li>Type the delimiter to be replaced.</li>
<li>Type &#8220;/&#8221; to begin the replaced string (again with the possible need to escape characters.)</li>
<li>Type the delimiter again, as we don&#8217;t want to lose it, then follow it will a [crtl]+v and [crtl]+m</li>
<li>Type &#8220;/&#8221; to end the substitution</li>
<li>Type &#8220;g&#8221; to make it global or indicating all of the instances not just the first one.</li>
</ol>
<p style="text-align: left;">It looks like this:  &#8220;%s/[delimiter]/[delimiter]^M/g&#8221;</p>
<p style="text-align: left;">Put another way, here is what I typed for our example:  &#8220;%s/\~/\~^M/g&#8221;  (notice that I am escaping the ~ with a \)</p>
<p style="text-align: left;">To re-wrap:</p>
<ol>
<li>open the file.  Type &#8220;vi [file name]&#8220;</li>
<li>Hit &#8220;:&#8221; to get the command prompt</li>
<li>Type &#8220;%&#8221; to do a every line replace. (may not be needed as this is wrapped, but it doesn&#8217;t hurt.)</li>
<li>Type &#8220;s&#8221; for a substitution.</li>
<li>Type &#8220;/&#8221; to begin the string to find.  (you may need to escape characters like ~ and | with a \.  I will show this in the example)</li>
<li>Type a backslach (\) followed by &#8220;n&#8221; to designate the newlines.</li>
<li>Type &#8220;/&#8221; to begin the replaced string (again with the possible need to escape characters.)</li>
<li>Type &#8220;//&#8221; to begin and end the substitution.</li>
<li>Type &#8220;g&#8221; so that it will get any multiples of the newline.</li>
</ol>
<p style="text-align: left;">It looks like this: &#8220;%s/\n//g&#8221;</p>
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;"><em><strong>MS Word</strong></em></p>
<p style="text-align: left;">To Unwrap:</p>
<ol>
<li>Open file.</li>
<li>Select Edit&gt;Replace or press [ctrl]+h</li>
<li>In the &#8220;Find what&#8221; field insert the delimiter.</li>
<li>In the &#8220;Replace with&#8221; field insert the delimiter, and then click on the &#8220;More&#8221; button on the bottom of the control.</li>
<li>In more, there is another button called &#8220;Special&#8221;  Click on this button and select &#8220;Manual Line Break&#8221;</li>
<li>Click replace all and the EDI will unwrap.</li>
</ol>
<p>To re-wrap:</p>
<ol>
<li>Open file.</li>
<li>Select Edit&gt;Replace or press [ctrl]+h</li>
<li>In the &#8220;Find what&#8221; field click on the &#8220;More&#8221; button on the bottom of the control.</li>
<li>In more, there is another button called &#8220;Special&#8221;  Click on this button and select &#8220;Manual Line Break&#8221;</li>
<li>Don&#8217;t put anything in the  &#8220;Replace with&#8221; field.</li>
<li>Click replace all and the EDI will re-wrap.</li>
</ol>
<p><em><strong>Other Tools:</strong></em></p>
<p>There are lots of other tools that can do the search and replace with newlines, these are only two ways.  If you have one that you would like to share, please let me know.</p>
<p>&#8212;</p>
<p>Looking for something else relating to EDI?  Try <a href="ttp://www.theintegrationengineer.com/the-edi-primer/">here</a>.</p>
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;">
]]></content:encoded>
			<wfw:commentRss>http://www.theintegrationengineer.com/edi-wrapped-and-unwrapped/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>EDI Elements</title>
		<link>http://www.theintegrationengineer.com/edi-elements/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=edi-elements</link>
		<comments>http://www.theintegrationengineer.com/edi-elements/#comments</comments>
		<pubDate>Tue, 13 Jan 2009 16:44:18 +0000</pubDate>
		<dc:creator>Roy</dc:creator>
				<category><![CDATA[b2b]]></category>
		<category><![CDATA[EDI]]></category>
		<category><![CDATA[Elements]]></category>
		<category><![CDATA[Data]]></category>
		<category><![CDATA[data type]]></category>
		<category><![CDATA[Delimited]]></category>
		<category><![CDATA[element]]></category>
		<category><![CDATA[Element Notation]]></category>

		<guid isPermaLink="false">http://www.theintegrationengineer.com/?p=59</guid>
		<description><![CDATA[What is an Element? In the context of delimited data files, an element is the contents between two delimiters.  Like in a spreadsheet, the element is the contents of a cell.  In EDI, we have delimited segments, and just like a delimited file, the contents between the delimiters is the element. So in this segment [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-61" title="Element" src="http://www.theintegrationengineer.com/wp-content/uploads/2008/12/atomic_particle.png" alt="atomic particle EDI Elements" width="99" height="95" /><strong>What is an Element?</strong></p>
<p>In the context of delimited data files, an element is the contents between two delimiters.  Like in a spreadsheet, the element is the contents of a cell.  In EDI, we have delimited segments, and just like a delimited file, the contents between the delimiters is the element.</p>
<p>So in this segment &#8220;PO1*1*8*EA*10**SW*H11510.REF*CT*089480-00-B-0336~&#8221;, the 5th element or PO1_04 is &#8220;10&#8243;, while the 6th element or PO1_05 is empty.</p>
<p><em>Empty elements are <a href="http://www.theintegrationengineer.com/the-nature-of-null">not necessarily null</a>.  Calling something null when the data type is know like an empty element can cause some data theory debates.  I don&#8217;t want to start one here, but may write about that philosophical discussion at a later time.</em></p>
<p><span id="more-59"></span></p>
<p><strong>What types of elements are there?</strong></p>
<p><img class="alignright size-full wp-image-85" title="Type" src="http://www.theintegrationengineer.com/wp-content/uploads/2009/01/typeset.jpg" alt="typeset EDI Elements" width="114" height="85" />What we are really talking about is the data type.  Each element in an EDI file has a specific data type defined.  Part Numbers are Alpha-Numeric which means that they may contain letters in the alphabet, and number in any mixture.  Where a price is not just a number, but is a currency.  Letters are not acceptable in the price field, so one can&#8217;t populate it with &#8220;N/A&#8221; in any case.</p>
<p>I won&#8217;t describe all of the data types here.  That is a discussion for some other time.  Most of the time these are fairly easy to work with, especially when you have samples to work from.  But there is another type of element.  This is the encoded value element.  This element does still contain a value, but it is in a code.</p>
<p>UOM or Unit Of Measure is the easiest to relate to, as it deals with something physical.  In the PO1 segment above, we find the UOM in the PO1_03 element.  In this case it means &#8220;each&#8221;  and by putting &#8220;EA&#8221; in this position we don&#8217;t have to type out &#8220;each&#8221; every time we just us EA as the abbreviation for this.</p>
<p>Why do we do this?  Well as I said the UOM is the easiest encoded element.  Some of the other encoded elements that are available define larger concepts.  Also, by having an encoded element, the EDI standard constrains the data to a rational type of data.</p>
<p>For instance, if you have an order response, we don&#8217;t want to have to process a free form response, we want to know if the product is accepted, back ordered or canceled.  And I want to know this in the same way for everyone.</p>
<p><strong>What is Element Notation?</strong></p>
<p><img class="alignleft size-full wp-image-86" title="actuarial_notation" src="http://www.theintegrationengineer.com/wp-content/uploads/2009/01/actuarial_notation.jpg" alt="actuarial notation EDI Elements" width="72" height="53" />Elements are contained in segments.  The segment is referred to by the characters that preceded the first delimiter.  Each element in the segment has the name of the segment followed by its position in the segment.  Sometimes these are not separated, or they are separated by a space or underscore.  The position of the element is 0 based counting.  This means that the first position, the position preceding the first delimiter where the name of the segment is found, is position 0.</p>
<p>Thus in this segment, &#8220;N1^ST^Bill&#8217;s Grill^01^123456789~&#8221;, the N1 is N1_00.  I prefer the underscore to the space or no delimiter format for clarity.  But they are all used, so this would be the same as N101 and N1 01.  We use a two digit position designator even for positions less than 10 for clarity as well.  If there are any segments that develop more than 99 positions, there won&#8217;t be many.  And even fewer will ever be used.  And we don&#8217;t reduce it to just one digit, as N11 might actually exist, and that could cause confusion.</p>
<p>Now back to our example;  N1_01 is &#8220;ST&#8221;.  N1_02 is &#8220;Bill&#8217;s Grill&#8221; as so forth.</p>
<p>An example of how this is used is first found in our mapping rules that we need to write down.  And then in our notes and documentation.  If you wanted to say, &#8220;Whenever we have a ship to address for &#8216;Bill&#8217;s Grill&#8217; we need to used the Duns number of &#8217;123456789&#8242;.&#8221;  We could say , &#8220;When N1_01 = &#8216;ST&#8217; and N1_02 = &#8216;Bill&#8217;s Grill&#8217; then N1_03 = &#8217;01&#8242; and N1_04 = &#8217;123456789&#8242;.&#8221;  This way we are not leaving anything open to interpretation and clarity is our friend when writing rules for mapping and forming data.</p>
<p>You will see this used extensively in the mapping exercises here, and once you get the hang of using Element Notation, you will never write it any other way.</p>
<p>–</p>
<p>Looking for something else relating to EDI?  Check out the <a href="../the-edi-primer/">EDI Primer</a> post</p>
<p>–</p>
]]></content:encoded>
			<wfw:commentRss>http://www.theintegrationengineer.com/edi-elements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why are there more than one version of EDI?</title>
		<link>http://www.theintegrationengineer.com/why-are-there-more-than-one-version-of-edi/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=why-are-there-more-than-one-version-of-edi</link>
		<comments>http://www.theintegrationengineer.com/why-are-there-more-than-one-version-of-edi/#comments</comments>
		<pubDate>Mon, 17 Nov 2008 17:39:21 +0000</pubDate>
		<dc:creator>Roy</dc:creator>
				<category><![CDATA[b2b]]></category>
		<category><![CDATA[EDI]]></category>
		<category><![CDATA[Data Dictionary]]></category>
		<category><![CDATA[E-Commerce]]></category>
		<category><![CDATA[EDI Origin]]></category>
		<category><![CDATA[EDI Version]]></category>
		<category><![CDATA[Mutually Defined EDI]]></category>

		<guid isPermaLink="false">http://www.theintegrationengineer.com/?p=40</guid>
		<description><![CDATA[When EDI was born, (in the 1970s),  the committee did its best adopt a forward thinking plan and architecture.  But there was really no way for people living before the birth of e-mail to make place for what we use today to do business.  So the early versions of EDI had no place for e-mail [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-41" title="pair-chrome-dumbells" src="http://www.theintegrationengineer.com/wp-content/uploads/2008/10/pair-chrome-dumbells.jpg" alt="pair chrome dumbells Why are there more than one version of EDI?" width="117" height="117" />When EDI was born, (in the 1970s),  the committee did its best adopt a forward thinking plan and architecture.  But there was really no way for people living before the birth of e-mail to make place for what we use today to do business.  So the early versions of EDI had no place for e-mail addresses, and other things that we use in e-commerce today.</p>
<p>The goal of EDI was to provide a way to support communications between dissimilar computer systems.  EDI was intended as a light weight, reliable means to transmit data. <span id="more-40"></span> By today&#8217;s standards, EDI may not seem that easy, open and light weight.  But if you realize that at the time it was being developed some of the things we take for granted, like IP addresses, and Domain Name Systems were on the drawing board, or not really understood or used.</p>
<p><strong>Data Dictionary</strong></p>
<p>One of the ways that EDI saved space and enforced consistency was to use encoded values.  Using the UOM list is easy to understand.  And it really hasn&#8217;t changed that much.  But there were also encoded values for things like the type of address or the type of financial transaction.  Basically there are more variations of these today, than there were at the time of EDI&#8217;s birth.</p>
<p>Now this is not to say you can&#8217;t used something that the standard builders didn&#8217;t think of.  There is a common wild card value for almost all of the encoded value fields.  That is ZZ (note that if the length is 1 or 4 or any length, then it is the number of &#8216;Z&#8217; characters to fill the required space).  ZZ is a value for &#8216;Mutually Defined&#8217;.  Meaning, &#8220;the standard doesn&#8217;t have this, but I expect the receiver to understand what this is.&#8221;</p>
<p>But just using that all of the time would reduce the value of the standard.  So you may have used ZZ to list an address type that the 3030 standard doesn&#8217;t support, but the 4010 standard has it now, and we should used that when we build a 4010 document.  The creation of a Data Dictionary not only reduced the size of the EDI file, but also helped enforce the usage of common concepts.</p>
<p><strong>Syntax</strong></p>
<p>Both the size and order of the segments has changed from the earliest versions of EDI.  <a href="http://www.theintegrationengineer.com/edi-segments/">Segments </a>were only created as long as was thought needed to contain the pertinent data.  Segments that related to contact information defined in the era where you might have a fax number in addition to your office number, just doesn&#8217;t have the space for your cell phone.  And the line item definition may not have enough space now that you might want to include the UNSPC number that didn&#8217;t exist then.  So the segments have grown, and some orders have changed to allow for better representation of the data.</p>
<p><strong>Objects Being Represented.</strong></p>
<p>Back in the beginning, EDI was representing paper objects.  So when people mapped from EDI, or talked about EDI, their brains didn&#8217;t go far from the idea of what the paper order or invoice, or status would look like.  But very quickly, younger minds started to represent data as just data.  No longer tied to the paper order form, or other physical media, data began to take on characteristics of the real data, and real objects that the paper was describing.</p>
<p>EDI has been slow follow this completely.  Backward computability is a good excuse, but mostly it seems that the established syntax was flexible enough that new things can be represented.  This is a double edged discussion, and we will leave it with this.  As the nature of e-commerce evolved, EDI formats changed to follow the evolution.</p>
<p><strong>Summary</strong></p>
<p>EDI is a collection of standards and versions.  As time has moved forward, the nature of our e-commerce needs have changed.  EDI has changed too, but instead of letting working standards become obsolete, a new version of the standard is published.  These standards implemented incremental changes in the Data Dictionary, Syntax and Objective Representation of the E-Commerce transactions.</p>
<p>–</p>
<p>Looking for something else relating to EDI?  Check out the <a href="../the-edi-primer/">EDI Primer</a> post</p>
<p>–</p>
]]></content:encoded>
			<wfw:commentRss>http://www.theintegrationengineer.com/why-are-there-more-than-one-version-of-edi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EDI is a Standard</title>
		<link>http://www.theintegrationengineer.com/edi-is-a-standard/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=edi-is-a-standard</link>
		<comments>http://www.theintegrationengineer.com/edi-is-a-standard/#comments</comments>
		<pubDate>Mon, 10 Nov 2008 19:00:23 +0000</pubDate>
		<dc:creator>Roy</dc:creator>
				<category><![CDATA[b2b]]></category>
		<category><![CDATA[EDI]]></category>
		<category><![CDATA[Supply Chain]]></category>
		<category><![CDATA[Bill Gates]]></category>
		<category><![CDATA[ecommerce]]></category>
		<category><![CDATA[format]]></category>
		<category><![CDATA[Standard]]></category>

		<guid isPermaLink="false">http://www.theintegrationengineer.com/?p=51</guid>
		<description><![CDATA[EDI is a standard, and having standards in e-commerce or any type of integration, is important in achieving success in your integration efforts.  I found this old video of Bill Gates talking about this very topic, and I decided to share it here. Bill Gates is speaking in 1998, and mentions the need for standards [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-52" title="EDI Standard" src="http://www.theintegrationengineer.com/wp-content/uploads/2008/11/edi_standard.jpg" alt="edi standard EDI is a Standard" width="128" height="131" /></p>
<p>EDI is a standard, and having standards in e-commerce or any type of integration, is important in achieving success in your integration efforts.  I found this old video of Bill Gates talking about this very topic, and I decided to share it here.<span id="more-51"></span></p>
<p>Bill Gates is speaking in 1998, and mentions the need for standards like EDI in conduction e-commerce.  &#8220;Creating those standards&#8230;make information move easily&#8230;&#8221;  &#8220;So standards are becoming more important.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/F5XJf4yojEM&amp;hl=en&amp;fs=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/F5XJf4yojEM&amp;hl=en&amp;fs=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>Bill and I don&#8217;t pal around or anything, and I am not a big fan of Biz Talk, but what he says in this clip supports some of the things that I support here.  Standards make e-commerce communication better.  EDI is a foundation level standard that we should draw from, so understanding <a href="http://www.theintegrationengineer.com/what-is-edi/">what EDI is</a>, becomes important as well.</p>
<p>–</p>
<p>Looking for something else relating to EDI?  Check out the <a href="../the-edi-primer/">EDI Primer</a> post</p>
<p>–</p>
]]></content:encoded>
			<wfw:commentRss>http://www.theintegrationengineer.com/edi-is-a-standard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EDI Enveloping Part Three (The GS)</title>
		<link>http://www.theintegrationengineer.com/edi-enveloping-part-three-the-gs/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=edi-enveloping-part-three-the-gs</link>
		<comments>http://www.theintegrationengineer.com/edi-enveloping-part-three-the-gs/#comments</comments>
		<pubDate>Mon, 03 Nov 2008 17:04:07 +0000</pubDate>
		<dc:creator>Roy</dc:creator>
				<category><![CDATA[b2b]]></category>
		<category><![CDATA[EDI]]></category>
		<category><![CDATA[GS]]></category>
		<category><![CDATA[Envelope]]></category>
		<category><![CDATA[Enveloping]]></category>

		<guid isPermaLink="false">http://www.theintegrationengineer.com/?p=47</guid>
		<description><![CDATA[What is the GS segment? The GS segment is the second mandatory enveloping segment.  It shares some properties with the ISA segment.  There is a sender and receiver, version Identifier, time stamp and control number.  But one thing that the GS has that the ISA does not is a Functional Identifier. That&#8217;s right, Functional.  This [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-48" title="scratch-head" src="http://www.theintegrationengineer.com/wp-content/uploads/2008/10/scratch-head.jpg" alt="scratch head EDI Enveloping Part Three (The GS)" width="105" height="78" /><strong>What is the GS segment?</strong></p>
<p>The GS segment is the second mandatory enveloping segment.  It shares some properties with the <a href="http://www.theintegrationengineer.com/edi-enveloping-part-two-the-isa/">ISA segment</a>.  There is a sender and receiver, version Identifier, time stamp and control number.  But one thing that the GS has that the ISA does not is a Functional Identifier.</p>
<p>That&#8217;s right, Functional.  This means that within the GS envelope are only EDI messages or documents that have the same function.<span id="more-47"></span></p>
<p>Here is a GS segment:</p>
<p>GS*PO*901234572000*908887732000*081031*0835*1*T*004010!</p>
<p>Like all <a href="http://www.theintegrationengineer.com/edi-segments/">segments</a>, the first element is 0 and identifies the segment type.  This segment has a GS in this element, making it a GS segment.</p>
<p>Unlike the ISA segment, that does not change in any way from standard to standard, the GS may change a bit.</p>
<p>Here are the definitions of the GS segment for the 3020 X12 standard:</p>
<p><img class="aligncenter size-full wp-image-49" title="gs_elementdef_3020" src="http://www.theintegrationengineer.com/wp-content/uploads/2008/11/gs_elementdef_3020.jpg" alt="gs elementdef 3020 EDI Enveloping Part Three (The GS)" width="606" height="214" /></p>
<p>There are 8 elements.</p>
<p>And here is the definitions of the GS segment for the 4010 X12 standard:</p>
<p><img class="aligncenter size-full wp-image-50" title="gs_elementdef_4010" src="http://www.theintegrationengineer.com/wp-content/uploads/2008/11/gs_elementdef_4010.jpg" alt="gs elementdef 4010 EDI Enveloping Part Three (The GS)" width="615" height="219" /></p>
<p>Again there are 8 elements.</p>
<p>Now look at the size of the Date and Time elements in GS_04 and GS_05.  In the 3020 version, the Date is 6 char, and in 4010 it is 8 char.  The time also grows from a 6 to a possible 8 char size.</p>
<p>Version 4010 was considered the Y2K standard where the dates moved from a 6 char date, to and 8 char date to accommodate the century change.</p>
<p>Other than this change, the GS segments and usage are the same.</p>
<p><strong>Element by Element</strong></p>
<p><span style="color: #3366ff;">GS_01</span> is the Functional Identifier.  This designates the type of messages this envelope contains.  If it contains Purchase Orders, the GS_01 is &#8220;PO&#8221;  if it contains Invoices, it is &#8220;IN&#8221; as so forth.</p>
<p><span style="color: #3366ff;">GS_02</span> is the Sender Identifier.  This does not have to be the same as the <a href="http://www.theintegrationengineer.com/edi-enveloping-part-two-the-isa/">ISA</a> Sender, but it can be.  This element has the same restrictions on content, a 15 character alpha-numeric.  But unlike the ISA sender, this one is not fixed in size.  This means that the delimiters fit around the value without including any white space.  In many basic implementations, the value in the ISA sender, and the GS sender are the same value.</p>
<p><span style="color: #3366ff;">GS_03</span> is the Receiver Identifier.  This does not have to be the same as the <a href="http://www.theintegrationengineer.com/edi-enveloping-part-two-the-isa/">ISA</a> receiver, but it can be.  This element has the saem restrictions on content, a 15 character alpha-numeric.  But unlike the ISA sender, this one is not fixed in size.  This means that the delimiters fit around the values without including any white space.  In many basic implementations, the values in the ISA receiver and the GS receiver are the same value.</p>
<p><span style="color: #3366ff;">GS_04</span> is the Date.  It should be the date of the creation of the GS envelope.  Many times it is the same date as the ISA date.</p>
<p><span style="color: #3366ff;">GS_05</span> is the Time.  It should be the time of the creation of the GS envelope.  Many times it is the same as the ISA time.</p>
<p><span style="color: #3366ff;">GS_06</span> is the Control Number.  This is a 1 to 9 numeric value.  This is a number that needs to be unique inside the ISA envelope only.  Some implementations use an incrementing number that increments with the usage like the ISA control number.  Others just have a count of the number of GS envelopes inside an ISA.  Both are acceptable.  All that is required is that the GS control number be unique among other GS control numbers within the ISA envelope that it is contained in.</p>
<p><span style="color: #3366ff;">GS_07</span> is the Agency Code.  Basically for any X12 document that will be &#8220;T&#8221; or &#8220;X&#8221;.  I have only seen &#8220;X&#8221; indicating that it is really using X12.  Even when it is not.  Most of the time I ignore this value.</p>
<p><span style="color: #3366ff;">GS_08</span> is a Version identification value.  Just like the <a href="http://www.theintegrationengineer.com/edi-enveloping-part-two-the-isa/">ISA_12</a>, this identifies the standard, but identifies it to the next level.  Thus if you are 4010, this will be 004010 and so on.</p>
<p><strong>Too Much?</strong></p>
<p>No problem, there are really a few things to pay attention to as you begin to work with GS envelopes.  And if you are just needing to do a quick edit and resubmit you may not need to do much.</p>
<ul>
<li>Pay attention to the GS_02 and GS_03, these are the sender and receiver and need to be conrect to route documents and match with the profile for most systems.</li>
<li>Make sure the GS_01 is the type of document that you are really sending.  Some systems get cranky when they get an Invoice in a Purchase Order envelope.</li>
<li>And as always, make sure your GS and GE control numbers match and are unique inside the ISA-IEA envelope.</li>
</ul>
<p>–</p>
<p>For an overview of Enveloping go <a href="http://www.theintegrationengineer.com/edi-enveloping-part-one/">here</a>.</p>
<p>Looking for the <a href="http://www.theintegrationengineer.com/edi-enveloping-part-two-the-isa/">ISA enveloping page</a>?</p>
<p>Looking for the <a href="http://www.theintegrationengineer.com/edi-enveloping-part-four-the-st/">ST enveloping page</a>?</p>
<p>Looking for something else relating to EDI?  Check out the <a href="http://www.theintegrationengineer.com/the-edi-primer/">EDI Primer</a> post</p>
<p><OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab" id="Player_05c95da9-4dbe-4ee8-9e7f-c5da5f522b61"  WIDTH="400px" HEIGHT="150px"> <PARAM NAME="movie" VALUE="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&MarketPlace=US&ID=V20070822%2FUS%2Ftheinteengi-20%2F8010%2F05c95da9-4dbe-4ee8-9e7f-c5da5f522b61&Operation=GetDisplayTemplate"><PARAM NAME="quality" VALUE="high"><PARAM NAME="bgcolor" VALUE="#FFFFFF"><PARAM NAME="allowscriptaccess" VALUE="always"><embed src="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&MarketPlace=US&ID=V20070822%2FUS%2Ftheinteengi-20%2F8010%2F05c95da9-4dbe-4ee8-9e7f-c5da5f522b61&Operation=GetDisplayTemplate" id="Player_05c95da9-4dbe-4ee8-9e7f-c5da5f522b61" quality="high" bgcolor="#ffffff" name="Player_05c95da9-4dbe-4ee8-9e7f-c5da5f522b61" allowscriptaccess="always"  type="application/x-shockwave-flash" align="middle" height="150px" width="400px"></embed></OBJECT> <NOSCRIPT><A HREF="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&MarketPlace=US&ID=V20070822%2FUS%2Ftheinteengi-20%2F8010%2F05c95da9-4dbe-4ee8-9e7f-c5da5f522b61&Operation=NoScript">Amazon.com Widgets</A></NOSCRIPT></p>
]]></content:encoded>
			<wfw:commentRss>http://www.theintegrationengineer.com/edi-enveloping-part-three-the-gs/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Flat Files</title>
		<link>http://www.theintegrationengineer.com/flat-files/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=flat-files</link>
		<comments>http://www.theintegrationengineer.com/flat-files/#comments</comments>
		<pubDate>Mon, 05 Jan 2009 18:38:47 +0000</pubDate>
		<dc:creator>Roy</dc:creator>
				<category><![CDATA[b2b]]></category>
		<category><![CDATA[Data]]></category>
		<category><![CDATA[Delimiters]]></category>
		<category><![CDATA[File]]></category>
		<category><![CDATA[Mapping]]></category>
		<category><![CDATA[Character Delimited]]></category>
		<category><![CDATA[Comma Delimited]]></category>
		<category><![CDATA[csv]]></category>
		<category><![CDATA[Data Export]]></category>
		<category><![CDATA[Data Import]]></category>
		<category><![CDATA[delimiter]]></category>
		<category><![CDATA[EDI]]></category>
		<category><![CDATA[ETL]]></category>
		<category><![CDATA[Fixed Position]]></category>
		<category><![CDATA[Fixed Width Files]]></category>
		<category><![CDATA[Space]]></category>
		<category><![CDATA[spreadsheet]]></category>
		<category><![CDATA[White Space]]></category>

		<guid isPermaLink="false">http://www.theintegrationengineer.com/?p=5</guid>
		<description><![CDATA[What is a flat file? Files are called &#8220;Flat Files&#8221; when they contain a single data structure.  Generally this structure is the column and row structure like a spreadsheet or table, but a file in binary or encrypted with a single encryption key could also be called a flat file.  Files that are not flat; [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-75" title="Flat File" src="http://www.theintegrationengineer.com/wp-content/uploads/2009/01/flatfile.jpg" alt="flatfile Flat Files" width="160" height="120" /><strong>What is a flat file?</strong></p>
<p>Files are called &#8220;Flat Files&#8221; when they contain a single data structure.  Generally this structure is the column and row structure like a spreadsheet or table, but a file in binary or encrypted with a single encryption key could also be called a flat file.  Files that are not flat; marked up files like XML or HTML, <a href="http://www.theintegrationengineer.com/what-is-edi/">EDI </a>files, other formats like HL7 or SEF files and others.  Here I am going to briefly discuss two flat file types; Delimited Files, and Fixed Width Files.<span id="more-5"></span></p>
<p><strong>What is a Delimited File?</strong></p>
<p>Ok, to describe it briefly, a delimited file is a file where the data is organized in rows and columns.  Each row has a set of data, and each column has a type of data.  If it sounds like I am describing a spreadsheet, you are right on the money.  To make the column, each row has the columns separated with a character called a delimiter.  See the example below.</p>
<p><img class="aligncenter size-full wp-image-72" title="Illustration of Delimited Data" src="http://www.theintegrationengineer.com/wp-content/uploads/2009/01/delimitedillustration.jpg" alt="delimitedillustration Flat Files" width="554" height="128" /></p>
<p>Tables of data and spreadsheets are both similar to a delimited file in the way they organize data.  In the delimited file all of the empty space, or white space is removed.  What we see here is a classic example of exporting a spreadsheet table as a comma delimited file.  In theory, this data can be imported by any other application that can read a delimited file.</p>
<p><em>Believe it of not, a space is a character, and takes up space in a file.  Back in the day people went out of their way to save space so that files could be send over slow modem connections.</em></p>
<p><strong>What is a Fixed Width File?</strong></p>
<p>There is another type of file, is is called a Fixed Width or Fixed Position file.  It is different from a delimited file in that the data fields are defined by the character position.  See the example below.</p>
<p><img class="aligncenter size-full wp-image-73" title="Fixed Width File Illustration" src="http://www.theintegrationengineer.com/wp-content/uploads/2009/01/wffileillustration.jpg" alt="wffileillustration Flat Files" width="570" height="132" /></p>
<p>In a fixed width file, the delimiter characters are eliminated.  If the data is formulated such that the data fields are the same size, this format can be more compact than a delimited file. You can see here that we know the size of the Birthdate data, so we eliminate all the spaces between the Bdate and Department fields.  If all of the data was formatted for size like this, we could really make this file small, so that it only contains the data.</p>
<p>We also eliminate the pesky problem of delimiters found in data.  The issue of a comma delimited file containing a field that has a comma in the data.  How does the parser know that this comma is not really a delimiter, but is part of the data?  Anyway, that problem is eliminated in a fixed width file.</p>
<p><strong>Comparison</strong></p>
<p>This is not a contest of which format is superior.  Both file architectures are useful and both are used commonly enough that you need to be at ease working with both.  Delimited files are really easy to work with as long as your data is clean of the delimiter character.  Doing quick integration of data common in ETL tasks, delimited files are far more common that Fixed Width.  Continuous operations of data integration and importation many times find that Fixed Width or Position files are more reliable for the unattended operation, even ETL if it is unattended.</p>
<p>As with many things in integration work, we want to pick the best option.  Knowing and working with both fixed and delimited files will help you determine which is the right choice for the task you have before you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.theintegrationengineer.com/flat-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EDI Enveloping Part Two (The ISA)</title>
		<link>http://www.theintegrationengineer.com/edi-enveloping-part-two-the-isa/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=edi-enveloping-part-two-the-isa</link>
		<comments>http://www.theintegrationengineer.com/edi-enveloping-part-two-the-isa/#comments</comments>
		<pubDate>Wed, 24 Sep 2008 20:16:14 +0000</pubDate>
		<dc:creator>Roy</dc:creator>
				<category><![CDATA[b2b]]></category>
		<category><![CDATA[EDI]]></category>
		<category><![CDATA[Envelope]]></category>
		<category><![CDATA[ISA]]></category>

		<guid isPermaLink="false">http://www.theintegrationengineer.com/?p=29</guid>
		<description><![CDATA[What is in the ISA? The ISA Segment is the first segment in any EDI document.  Once you understand what it is saying, This long random seeming string will make sense, and be very helpful in helping you relate EDI documents to the real world task that you need to do. Here is an ISA [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-medium wp-image-33" title="question-key" src="http://www.theintegrationengineer.com/wp-content/uploads/2008/09/question-key.jpg" alt="question key EDI Enveloping Part Two (The ISA)" width="89" height="89" /><strong>What is in the ISA?</strong></p>
<p>The ISA Segment is the first segment in any EDI document.  Once you understand what it is saying, This long random seeming string will make sense, and be very helpful in helping you relate EDI documents to the real world task that you need to do.<span id="more-29"></span></p>
<p>Here is an ISA segment.</p>
<p>ISA^00^          ^00^          ^01^9012345720000  ^01^9088877320000  ^080902^1523^U^00401^000000001^0^T^|~</p>
<p>This is one long string, there is no linefeed or line break.</p>
<p>Like all <a href="http://www.theintegrationengineer.com/edi-segments/">segments</a>, the first element is 0 and identifies the segment type.  This is an ISA segment.</p>
<p>There are 16 ISA elements, here are the definition for the ISA</p>
<p><img class="aligncenter size-full wp-image-32" title="isa_elementdef1" src="http://www.theintegrationengineer.com/wp-content/uploads/2008/09/isa_elementdef1.jpg" alt="isa elementdef1 EDI Enveloping Part Two (The ISA)" width="500" height="360" /></p>
<p style="padding-left: 30px;"><strong>A note on Qualifiers</strong></p>
<p style="padding-left: 30px;">A qualifier is an element that precedes an element and defines the type of data will be found in the element that it precedes.  The Qualifier element is also an encoded element.  Encoded elements are elements that have a defined set of possible values.</p>
<p style="padding-left: 30px;">The Unit Of Measure is my favorite example of a qualifier.  The UOM precedes the quantity.  Thus when you have a quantity of 5, your will know that it is 5 boxes not five containers or eaches by knowing what the UOM qualifier is for that quantity.  For the Unit Of Measure, there is a specific set of them and what they mean.</p>
<p><strong>Element by Element</strong></p>
<p><span style="color: #3366ff;">ISA_01</span> is a qualifier.  The Authorization Information Qualifier can be one of 7 values from 00 to 06.  Most of the time it is 00 which means that ISA_02 will not contain meaningful data.  This field must be populated with one of these values.</p>
<p><span style="color: #3366ff;">ISA_02</span> is for Authorization Information.  If the ISA_01 is 00, this will normally be left blank.  If ISA_01 is one of the other 6 valid values, this field must be populated.  The value here will be used to determine the authorization of the document.  I have only seen this used with one trading partner.  You might not see this at all.</p>
<p><span style="color: #3366ff;">ISA_03</span> is also a Qualifier.  It is the Security Information Qualifier and can be one of two values, 00 or 01.  Most of the time it is 00 which means that ISA_04 contains no password.  This field must be populated with one of these values.</p>
<p><span style="color: #3366ff;">ISA_04</span> is for Security Information.  This is also called the password.  If the ISA_03 is 01, this must contain a value.  Most of the time this will be blank.</p>
<p><span style="color: #3366ff;">ISA_05</span> is an Interchange ID Qualifier.  There are two of these.  They qualify or define the Interchange ID field that they precede.  These are required to be present.  There are 41 valid options, and I won&#8217;t define them all here.  Some common usages are:</p>
<p style="padding-left: 150px;">01 = DUNS number</p>
<p style="padding-left: 150px;">12 = Phone number</p>
<p style="padding-left: 150px;">14 = Duns Number with Suffix</p>
<p style="padding-left: 150px;">16 = DUNS with 4 character suffix</p>
<p style="padding-left: 150px;">ZZ = mutually defined.</p>
<p><span style="color: #3366ff;">ISA_06</span> is the Sender&#8217;s Interchange Identifier.  This value will identify the sender to the receiver.  The receiver should have this as a unique value.  Thus some times it is necessary to have more than one option in case the value you have chosen is already in used by some other Trading Partner that the receiver exchanges documents with.</p>
<p><span style="color: #3366ff;">ISA_07</span> is an Interchange ID Qualifier.  It follows the same rule as ISA_05 but qualifies the receiver instead of the sender.</p>
<p><span style="color: #3366ff;">ISA_08</span> is the Receiver&#8217;s Interchange Identifier.  This values tells the sender&#8217;s system where the message is going, and tells the receiver&#8217;s system that this message is for them.  The sender will need to have a unique value for each trading partner.</p>
<p><span style="color: #3366ff;">ISA_09</span> is the Interchange date.  This is the date that the ISA envelope is created.  Sometimes this value is derived from the contents of the document, but ideally this should be the date of the interchange envelope.<br />
<img class="alignright size-medium wp-image-31" title="tick_tock" src="http://www.theintegrationengineer.com/wp-content/uploads/2008/09/tick_tock.jpg" alt="tick tock EDI Enveloping Part Two (The ISA)" width="95" height="72" /><br />
<span style="color: #3366ff;">ISA_10</span> is the interchange time.  This is the time that the ISA envelope is created. Sometimes this values is derived from the document, or is defaulted to midnight.  Ideally this should be the time of the interchange envelope.</p>
<p><span style="color: #3366ff;">ISA_11</span> is the Standard Identifier.  This will always be &#8216;U&#8217; identifying this as the US EDI standard.</p>
<p><span style="color: #3366ff;">ISA_12</span> is the Standard Version Number.  This relates to the major version of the EDI standard that is used.  This value needs to be accurate so that the receiver&#8217;s EDI system can expect the right size of fields in the GS segments.  This may not look like what it is, as you see this &#8217;00401&#8242; for a version of &#8217;4010&#8242;.  This only identifies the major version, not distinguishing between 4010, 4011 and 4012.</p>
<p><span style="color: #3366ff;">ISA_13</span> is the Interchange control number.  This is the way that an EDI system identifies the envelope.  This control number should not be random, but an incrementing number.  It is 9 digits padded with zeroes.  The combination of ISA Sender and Receiver Identifiers and the Control number should identify a distinct interchange transmission.  When 9 &#8217;9&#8242;s are reached, the control number should roll back to 1. Nine zeros should be avoided as some systems that may internally trim the zeros will them be presented with a null value.</p>
<p><span style="color: #3366ff;">ISA_14</span> is the Acknowledgment Request.  This lets the EDI file make a request for a functional acknowledgment or 997 to be transmitted. This is a binary option of 0 meaning &#8220;don&#8217;t send a 997.&#8221;  and 1 meaning &#8220;send a 997.&#8221;  In a perfect world any ISA with a 1 in this would get a 997 returned.  In the real world, most EDI systems require some setup to enable the 997, thus it is good to discuss this before sending the request.</p>
<p><span style="color: #3366ff;">ISA_15</span> is the usage indicator.  This can be one of three values.  P is for Production Data, T is for Test Data, and I is for Information Definition.  This is important as a EDI system should only process interchanges with the P as production data.</p>
<p><span style="color: #3366ff;">ISA_16</span> are the delimiters.  You may remember from the <a href="http://www.theintegrationengineer.com/edi-delimiters/">delimiter</a> discussion that these are in a fixed position.</p>
<p><strong>Too Much?</strong></p>
<p>Really there are only a few things that you need to worry about as you start working with EDI and the ISA.  If you are just needing to do a quick edit for a test or to resubmit a document, here is what is important.</p>
<ul>
<li>Pay attention to the ISA_05, 06, 07 and 08.  These are the sender and receiver fields.</li>
<li>Increment you control numbers to make sure that you EDI files don&#8217;t get booted as dupes.</li>
<li>Make sure the ISA and IEA have matching control numbers.</li>
</ul>
<p>&#8211;</p>
<p>There&#8217;s more!  Now we explain the <a href="http://www.theintegrationengineer.com/edi-enveloping-part-three-the-gs">GS envelope.</a></p>
<p>For an overview of Enveloping go <a href="http://www.theintegrationengineer.com/edi-enveloping-part-one/">here</a>.</p>
<p>Looking for the <a href="http://www.theintegrationengineer.com/edi-enveloping-part-four-the-st/">ST enveloping page</a>?</p>
<p>Looking for something else relating to EDI?  Check out the <a href="http://www.theintegrationengineer.com/the-edi-primer/">EDI Primer</a> post</p>
<p><OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab" id="Player_05c95da9-4dbe-4ee8-9e7f-c5da5f522b61"  WIDTH="400px" HEIGHT="150px"> <PARAM NAME="movie" VALUE="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&MarketPlace=US&ID=V20070822%2FUS%2Ftheinteengi-20%2F8010%2F05c95da9-4dbe-4ee8-9e7f-c5da5f522b61&Operation=GetDisplayTemplate"><PARAM NAME="quality" VALUE="high"><PARAM NAME="bgcolor" VALUE="#FFFFFF"><PARAM NAME="allowscriptaccess" VALUE="always"><embed src="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&MarketPlace=US&ID=V20070822%2FUS%2Ftheinteengi-20%2F8010%2F05c95da9-4dbe-4ee8-9e7f-c5da5f522b61&Operation=GetDisplayTemplate" id="Player_05c95da9-4dbe-4ee8-9e7f-c5da5f522b61" quality="high" bgcolor="#ffffff" name="Player_05c95da9-4dbe-4ee8-9e7f-c5da5f522b61" allowscriptaccess="always"  type="application/x-shockwave-flash" align="middle" height="150px" width="400px"></embed></OBJECT> <NOSCRIPT><A HREF="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&MarketPlace=US&ID=V20070822%2FUS%2Ftheinteengi-20%2F8010%2F05c95da9-4dbe-4ee8-9e7f-c5da5f522b61&Operation=NoScript">Amazon.com Widgets</A></NOSCRIPT></p>
]]></content:encoded>
			<wfw:commentRss>http://www.theintegrationengineer.com/edi-enveloping-part-two-the-isa/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>EDI Enveloping Part One</title>
		<link>http://www.theintegrationengineer.com/edi-enveloping-part-one/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=edi-enveloping-part-one</link>
		<comments>http://www.theintegrationengineer.com/edi-enveloping-part-one/#comments</comments>
		<pubDate>Wed, 03 Sep 2008 16:20:01 +0000</pubDate>
		<dc:creator>Roy</dc:creator>
				<category><![CDATA[b2b]]></category>
		<category><![CDATA[EDI]]></category>
		<category><![CDATA[Envelope]]></category>
		<category><![CDATA[EDI Document]]></category>
		<category><![CDATA[EDI File]]></category>
		<category><![CDATA[Enveloping]]></category>
		<category><![CDATA[format]]></category>
		<category><![CDATA[GS]]></category>
		<category><![CDATA[ISA]]></category>
		<category><![CDATA[ST]]></category>

		<guid isPermaLink="false">http://www.theintegrationengineer.com/?p=27</guid>
		<description><![CDATA[An EDI file contains a structure known as enveloping.  Everything that is necessary for the file transmission and parsing, is part of or inside of the envelope. The first segment in and EDI file is the ISA segment.  The very last segment in and EDI file is the IEA.  For those of you familiar with [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-medium wp-image-28" src="http://www.theintegrationengineer.com/wp-content/uploads/2008/09/envelope-300x87.jpg" alt="envelope 300x87 EDI Enveloping Part One" width="225" height="65" title="EDI Enveloping Part One" />An EDI file contains a structure known as enveloping.  Everything that is necessary for the file transmission and parsing, is part of or inside of the envelope.</p>
<p>The first segment in and EDI file is the ISA segment.  The very last segment in and EDI file is the IEA.  For those of you familiar with XML, you may be thinking of this as &lt;File&gt; and &lt;/File&gt;.</p>
<p>This approach may make EDI seem familiar, but XML was not around when EDI was being created.  It is more like a Beginning Of File (BOF) and End Of File (EOF) marker.  However, there is no reason in EDI not to place multiple EDI envelopes in the same file.<span id="more-27"></span></p>
<p><strong>Structure of Enveloping</strong></p>
<p>The first part of and EDI envelope is the ISA-IEA.  As explained above, the ISA is the first segment, and the IEA is the last.</p>
<p>Directly below the ISA-IEA is the GS-GE envelope.  The second segment is the GS segment, and the segment before last is the GE segment.</p>
<p>Inside the GS-GE is the ST-SE.  The third segment is always the ST, and the third from last is always the SE.</p>
<p>If we were to explode the envelope, it would look something like this:</p>
<p style="padding-left: 30px">ISA</p>
<p style="padding-left: 60px">GS</p>
<p style="padding-left: 90px">ST</p>
<p style="padding-left: 90px">(data contents here)</p>
<p style="padding-left: 90px">SE</p>
<p style="padding-left: 60px">GE</p>
<p style="padding-left: 30px">IEA</p>
<p>Three envelopes with three purposes.</p>
<p>If the illustration above were all there was to enveloping.  This would be over.  And it would also be pretty useless.</p>
<p>The ISA segment is the interchange envelope.  It contains information for the envelope and its contents.  The IEA completes the envelope, and contains a matching control number with the ISA and a counter indicating the number of GS-GE envelopes it contains.</p>
<p>The GE segment is the functional level.  It contains an encoded value indicating what the functional purpose is the contents of the GS envelope is.  It also has come functional delivery identifiers.  The GE, like the IEA, has a corresponding control number with the GS, and has a counter of the number of ST envelopes it contains.</p>
<p>The ST is the document level.  It does not contains any sender of receiver identifiers.  It does contains the document number that indicates the document type.  The SE like the IEA and the GE, contains a  corresponding control number with its partner the ST segment.  It also  contains a counter of the number of segments contained in the ST-SE document envelope.</p>
<p>These counter and control numbers serve important functions.  The indicate where the transitions are between logical sets of data, and they ensure that data is not lost in transmission or garbled with the end of one file being paired with the beginning of another.</p>
<p>Based on this, here are some other illustration of the EDI enveloping structures.</p>
<p><strong><em>Example 1:</em></strong></p>
<p style="padding-left: 30px">ISA</p>
<p style="padding-left: 60px">GS</p>
<p style="padding-left: 90px">ST</p>
<p style="padding-left: 90px">(data contents here)</p>
<p style="padding-left: 90px">SE</p>
<p style="padding-left: 90px">ST</p>
<p style="padding-left: 90px">(data contents here)</p>
<p style="padding-left: 90px">SE</p>
<p style="padding-left: 60px">GE</p>
<p style="padding-left: 30px">IEA</p>
<p><em><strong>Example 2:</strong></em></p>
<p style="padding-left: 30px">ISA</p>
<p style="padding-left: 60px">GS</p>
<p style="padding-left: 90px">ST</p>
<p style="padding-left: 90px">(data contents here)</p>
<p style="padding-left: 90px">SE</p>
<p style="padding-left: 60px">GE</p>
<p style="padding-left: 60px">GS</p>
<p style="padding-left: 90px">ST</p>
<p style="padding-left: 90px">(data contents here)</p>
<p style="padding-left: 90px">SE</p>
<p style="padding-left: 60px">GE</p>
<p style="padding-left: 30px">IEA</p>
<p><em><strong>Example 3:</strong></em></p>
<p style="padding-left: 30px">ISA</p>
<p style="padding-left: 60px">GS</p>
<p style="padding-left: 90px">ST</p>
<p style="padding-left: 90px">(data contents here)</p>
<p style="padding-left: 90px">SE</p>
<p style="padding-left: 60px">GE</p>
<p style="padding-left: 30px">IEA</p>
<p style="padding-left: 30px">ISA</p>
<p style="padding-left: 60px">GS</p>
<p style="padding-left: 90px">ST</p>
<p style="padding-left: 90px">(data contents here)</p>
<p style="padding-left: 90px">SE</p>
<p style="padding-left: 60px">GE</p>
<p style="padding-left: 30px">IEA</p>
<p>Each of these represents a valid way to send two EDI documents in the same physical file.</p>
<p>In Example 1, both documents are in the same ISA, therefore they are both going to the same interchagne receiver.  Both are also in the same GS, therefore they are of the same type and going to the same Functional receiver.</p>
<p>In Example 2, both documents are in the same ISA, therefore they are both going to the same interchange receiver.  They are not in the same GS, so they may be of different functional types and or destined for different functional receivers.  Say we receive an shipping notice and an invoice, we could get them together, and route the shipping notice at the GS or functional level to the receiving system.  And then route the invoice at the functional level to the accounting system.</p>
<p>In Example 3, both documents are in their own ISA envelope.  They may be destined for separate interchange entities or the same one.  They may be of different types or the same time.  They may be as different as any two files, but we are illustrating is that documents can be in the same file, and still be separate documents.</p>
<p><strong>Summary</strong></p>
<p>What is important to understand is what enveloping is.  Enveloping is the way EDI ensures file integrity and lets the message determine its destination and type. EDI enveloping segments are required, and follow a pattern that allows for a wide diversity in grouping of data for logical consumption.</p>
<p>Next we will dissect the elements of the enveloping segments, ISA-IEA, GS-GE, ST-SE.  And we will talk about the control numbers an how those relate to functional acknowledgements.</p>
<p>&#8211;</p>
<p>For more specifics on enveloping:</p>
<ul>
<li><a href="http://www.theintegrationengineer.com/edi-enveloping-part-two-the-isa/">Enveloping &#8211; ISA</a></li>
<li><a href="http://www.theintegrationengineer.com/category/edi/envelope-edi/gs-envelope-edi-edi/">Enveloping &#8211; GS</a></li>
<li><a href="http://www.theintegrationengineer.com/edi-enveloping-part-four-the-st/">Enveloping &#8211; ST</a></li>
</ul>
<p>Looking for something else relating to EDI?  Check out the <a href="http://www.theintegrationengineer.com/the-edi-primer/">EDI Primer</a> post</p>
<p><OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab" id="Player_05c95da9-4dbe-4ee8-9e7f-c5da5f522b61"  WIDTH="400px" HEIGHT="150px"> <PARAM NAME="movie" VALUE="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&MarketPlace=US&ID=V20070822%2FUS%2Ftheinteengi-20%2F8010%2F05c95da9-4dbe-4ee8-9e7f-c5da5f522b61&Operation=GetDisplayTemplate"><PARAM NAME="quality" VALUE="high"><PARAM NAME="bgcolor" VALUE="#FFFFFF"><PARAM NAME="allowscriptaccess" VALUE="always"><embed src="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&MarketPlace=US&ID=V20070822%2FUS%2Ftheinteengi-20%2F8010%2F05c95da9-4dbe-4ee8-9e7f-c5da5f522b61&Operation=GetDisplayTemplate" id="Player_05c95da9-4dbe-4ee8-9e7f-c5da5f522b61" quality="high" bgcolor="#ffffff" name="Player_05c95da9-4dbe-4ee8-9e7f-c5da5f522b61" allowscriptaccess="always"  type="application/x-shockwave-flash" align="middle" height="150px" width="400px"></embed></OBJECT> <NOSCRIPT><A HREF="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&MarketPlace=US&ID=V20070822%2FUS%2Ftheinteengi-20%2F8010%2F05c95da9-4dbe-4ee8-9e7f-c5da5f522b61&Operation=NoScript">Amazon.com Widgets</A></NOSCRIPT><br />
&#8211;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.theintegrationengineer.com/edi-enveloping-part-one/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced
Database Caching using disk: basic

Served from: www.theintegrationengineer.com @ 2012-02-05 10:33:39 -->
