Blog Posts Process Management Service Oriented Architecture (SOA)

Hierarchical X12 EDI Data Mapping with DataWeave

Blog: BPM Blog Avio Consulting

Electronic Data Interchange (EDI) formats are commonly used in many industries. They have been in use for a long time and have well-defined data structures to transfer business-to-business (B2B) transaction data across systems. In earlier B2B posts, we discussed how using the Mulesoft Anypoint Partner Manager Can Accelerate Your Business.

In this blog, I will explore an approach for transforming an 856 Advanced Shipment notice document into a JSON format and vice-versa.

X12 and other EDI formats define document types such as 850 Purchase Order, 836 Procurement Notices, and many more. This list of predefined document types include industry-specific documents such as HIPAA documents for the healthcare industry. In our previous blog, How to Do B2B Integrations Using MuleSoft EDI X12 Module, we demonstrated how to transform X12 810 Invoice documents into JSON for processing within your APIs.

When working with X12 documents in MuleSoft, we leverage Mule’s X12 Connector that allows us to read and write documents in and out of X12 format. The connector consumes a standard X12 text-based document and converts it into a DataWeave-friendly data structure for transforming it into other API-friendly formats such as JSON or XML.

Some documents such as 850 Purchase Order are easy to map into an API-friendly format, but documents like 856 Advanced Shipment notices can be tricky due to the hierarchical data presented in a plain-text format. Although the X12 connector can convert it into DataWeave friendly structure, the challenge of transforming this hierarchical data into an API-friendly structure may require some advanced DataWeave usage.

Leave a Comment

Get the BPI Web Feed

Using the HTML code below, you can display this Business Process Incubator page content with the current filter and sorting inside your web site for FREE.

Copy/Paste this code in your website html code:

<iframe src="https://www.businessprocessincubator.com/content/hierarchical-x12-edi-data-mapping-with-dataweave/?feed=html" frameborder="0" scrolling="auto" width="100%" height="700">

Customizing your BPI Web Feed

You can click on the Get the BPI Web Feed link on any of our page to create the best possible feed for your site. Here are a few tips to customize your BPI Web Feed.

Customizing the Content Filter
On any page, you can add filter criteria using the MORE FILTERS interface:

Customizing the Content Filter

Customizing the Content Sorting
Clicking on the sorting options will also change the way your BPI Web Feed will be ordered on your site:

Get the BPI Web Feed

Some integration examples

BPMN.org

XPDL.org

×