Develop end to end B2B / EDI supply chain solution with Azure Logic Apps – Part 1
Introduction
EDI (Electronic Data Interchange) is a series of messaging standards(X12/EDIFACT) that allow B2B communication between businesses. It was designed to replace paper communication of documents like purchase orders, invoices, advance ship notices, etc., and has been adopted by numerous industries including retail, banking, manufacturing, transportation logistics, and health care. In this series of posts, we’ll be covering a Logic Apps in Azure example.
EDI Standards:
X12
• Most commonly used in North America.
• Transactions identified by numbers: 850 – Purchase Order, 810 – Invoice
EDIFACT
• Prevalent in Europe and Asia
• Transactions identified by messages – ORDER, INVOIC
AS2
• Protocol to transport EDI data securely and reliable over internet
A typical supply chain order processing scenario consisting of various messaging transactions would look like as shown below.
Implementing such integration platforms takes very high initial investment and involves large ongoing support cost. Below are few challenges in traditional B2B implementation
• Total cost of ownership (TCO) for setting up a B2B solution, especially for the small and medium business (SMB) shops
• High maintenance cost for the B2B solutions including onboarding partners, managing agreements, etc.
• Managing server farms, environments, resilience, disaster recovery, performance, scalability
B2B /EDI solution with Azure Logic Apps
These days, businesses are looking for more ways to reduce infrastructure costs without compromising service availability. Serverless integration, which is basically an event triggered integration solution can be the gamechanger in today’s business environment.
You can use Azure Logic Apps to build cloud integration solution to automate workflows and integrate systems, thereby accelerating application delivery and reducing costs. This 3 part guide will help you build a fully end to end, B2B app and provide a Logic Apps in Azure example. Few key benefits are:
· Lower TCO with the “pay-as-you-use” model
· Easily manage and onboard trading partners using the Azure Portal
· With the Azure Portal, customers will be able to cut down the on-boarding time from weeks to days
· Tracking portal integration with OMS (Operations Management Suite)
Business Scenario
Let’s take a look at fictitious Signature Mobile Accessories company. They have business only in their local area and suburbs. They recently signed a large deal with a big online store for Mobiles. In doing so now they would receive the EDI document (850) for purchase orders and they also need send EDI invoices (810) to the online store in order to get paid for their deliveries.
So, let’s take a look at some different options that will meet their technology goals.
· They could write custom C# code to build an EDI interface.
· They could also outsource the solution in which a third-party company would build the solution.
· And last, they could use a cloud-based solution with Microsoft Azure.
A cloud-based solution would provide maximum flexibility and allow them to add additional features as they needed to expand their IT department. A cloud-based solution would also be low cost because you do not have to provision any servers, and ramp up time for resources is generally low as compared to building out solutions and custom code.
How to get started with B2B/EDI solution?
For business-to-business (B2B) workflows and seamless communication with Azure Logic Apps, you would require using Enterprise Integration Pack (EIP). You can build and manage B2B apps with the Enterprise Integration Pack through the Logic App Designer in the Azure portal.
The pack uses industry standard protocols, including X12, EDIFACT and AS2 to exchange messages between business partners. Messages can be optionally secured using both encryption and digital signatures.
Enterprise Integration Pack is based on integration accounts, which is a secure and scalable container that stores the various artifacts required for business process workflow such as, schemas for XML validation, maps for transformation, and trading partner agreements.
Integration account can hold the following integration artifacts used for B2B /EDI scenarios:
XML schemas: XML schema is used to define the message / document format that you expect to receive and send from source and destination systems respectively.
XSLT-based maps: This can be used to transform XML data from one format to another format.
Trading partners: This is a representation of a group within organization or partner you do business with. These are the entities that participate in Business-To-Business (B2B) messaging and transactions.
Trading partner agreements: When two partners establish a relationship, this is referred to as an agreement (https://msdn.microsoft.com/en-us/library/ee920494.aspx ). Trading partner agreements is an understanding between two business partners to use a specific message encoding protocol or a specific transport protocol while exchanging EDI messages with each other. Enterprise Integration supports three protocol/transport standards:
· X12
· EDIFACT
· AS2
Certificates: Enterprise Integration uses certificates for secure messaging of EDI data, which is achieved using public and private keys.
Organization (Trading Partner) generates keys, distributes the public, and keeps the private secret. Data encrypted by the public key can only be decrypted by the private key.
Certificates are just electronic documents that contains a public key. These certificates are digitally signed by a trusted certificate authority (https://msdn.microsoft.com/en-us/library/ee920494.aspx ) and the signature binds owner’s identity to the public key.
Here is the sequence of steps you need to take to develop the B2B /EDI solution as described in Azure documentation:
Basically, you do the following tasks to build your B2B workflow in Logic Apps
- Create an Integration Account in the Azure portal
- Create schema and maps using Enterprise Integration Tools in Visual Studio
2015 and upload them to integration account you created in first step
- Add partner, agreement, and certificates to the integration account for B2B
scenarios
- Create a logic app and link the logic app to the integration account
- Now build the B2B workflow in Logic App using the artifacts stored in the integration account
Create an Integration Account in the Azure portal
To create an integration account, log in to Azure portal and go to Create a resource Enterprise Integration, as shown below. Select Integration Account here.
Enter the Name for the integration account and select the Subscription, Resource group, and Location, as shown below. Click on the Create button.
This is how the integration account container B2BIntegrationAccount look like. Recently 2 new components – Assemblies and Batch configurations have been added to integration account.
Now we need to use the Enterprise Integration Tool is an extension for Visual Studio 2015/2017, to create Schema and Maps.
In next post, I will cover how to create
- Schemas – to receive purchase order (EDI 850)
- Maps- to transform the order details to internal system format.
- Partners – entities that participate in business-to-business (B2B) transactions and exchange messages between each other.
- Host partner – Signature Mobile Accessories
- Guest partner – Mobile Online store
- Agreement – to define details about the messages exchanged between partners