What is EDI?
Electronic data interchange (EDI) is the concept of businesses electronically communicating information that was traditionally communicated on paper, such as purchase orders and invoices.
OR
Electronic Data Interchange (EDI) is the electronic interchange of business information using standardized format.
When an organization does Business to Business communication using EDI Standards (X12, EDIFACT, TRADACOMS etc) need to have some EDI System/Accelerator/Processor/Translator which does understand EDI standards and capable of receiving and sending the EDI messages.
There are many standards like X12, EDIFACT, TRADACOM, ODETTE, etc. based on regions, business domains, government laws and lot of research but the intention of all is to define structured way for the entities/organizations/business to create and send the documents.
There are a couple of Tools in Microsoft stack named BizTalk Server which is on-prem and cloud (IAAS) middleware platform and Logic App which cloud based PAAS integration platform.
In this blog, we will be using cloud-based Integration platform Logic App (it is part of Azure integration Services) to process X12 business document.
EDI X12 Standard
EDI X12 is governed by standards released by ASC X12 (The Accredited Standards Committee) mainly used in US. Each release contains set of message types like invoice, purchase order, Health insurance enrolment, healthcare claim, etc. Each message type has specific number assigned to it instead of name. e.g., purchase order is 850, enrolment detail is 834, healthcare claim is 837 etc.
EDI with Logic App
Earlier BizTalk from Microsoft which has all capabilities around Enterprise Application Integration (EAI) and Electronic Data Interchange (EDI) (which is server product) but with the cloud arrival where everything is available as service, Microsoft provided Logic Apps to cater the integration needs for cloud users.
In order to provide EDI support\capability in the logic apps Microsoft introduced Integration Account aka Enterprise Integration Pack, which adds B2B capabilities like AS2 and X12, EDI standards support, XML capabilities like XML Validation, XSLT\Liquid Transformation, Flat file to XML encode/decode etc. (Available as actions in Logic app e.g., AS2 Decode, Encode to X12 etc)
Use Case
Let’s say there is a company CompanyA and it wants to receive EDI X12 850 PO from its business partner and after getting it, it needs to convert it JSON Purchase Order format which is expected by its application for further processing. The application wants the file to be placed in an Azure Blob\File Share\Cosmos\SQL DB Container.
Now we have to build a solution which will accept EDI X12 850 message and convert it to JSON Purchase Order and forward it to Blob.
Create integration account
Provide basic details like Subscription, resource group, integration account name region.
Once the Integration Account is created, we need to add schema.
The Edi schemas can be downloaded from here
Now we need to add Partners and Agreements as mentioned below screenshots.
Follow the this link to create partners and agreements.
Create agreement.
Associate the Integration Account in Logic App workflow settings.
Create a Logic App
Received json response in blob.