Automate EDI Integrations with the Stedi Connector

EDI
Partnership
Integrations
Tray + Stedi Blog
Stedi - David Kanter

David Kanter

Customer Operations @ Stedi

Use Stedi with the Tray Platform to make automating B2B workflows faster and easier.

The Tray Platform lets you quickly build and automate integrations between internal business applications. But business-to-business (B2B) integrations present an entirely new set of challenges. 

B2B integrations typically involve electronic data interchange (EDI), the standard that almost every major industry uses to format commercial transactions. EDI is prevalent in retail, logistics, healthcare, financial services, and more. It’s the backbone of the B2B economy.

EDI is also notoriously hard to work with. Different trading partners often have slightly different requirements for the same transaction type, and they typically format requirements as PDFs or CSV files that are difficult to interpret. Onboarding a single new partner can take months with a lot of frustrating back-and-forth debugging. 

Tray.io recently partnered with Stedi to help change that. Stedi’s developer products drastically reduce the time, effort, and maintenance required to build EDI integrations. Now, you can use the Stedi Connector in your Tray workflow to quickly validate and translate incoming and outgoing EDI.

A typical EDI workflow

Most EDI workflows are conceptually similar. On one side of the integration is your trading partner. On the other side is your internal system, which is typically an ERP system, SaaS solution, or custom-built API. The goals of an EDI integration are to 1) transmit data from your system to your partner’s system and 2) accept and process the data your partner sends to you. 

EDI is beneficial because you don’t need to worry about what business system your partner is using. You both agree to exchange data based on an intermediary format, in addition to an agreed-upon mechanism for file exchange, such as secure FTP or AS2. The EDI integration works consistently as long as the sender generates a valid file in the pre-defined EDI format, and the receiver can parse, transform, and process that data.

Building an EDI Integration with Stedi

With the Stedi Connector, you can use Tray to create EDI workflows that generate and send consistent and accurate EDI files to partners. You can also parse, transform, and ingest inbound files into your business system(s).

Define Requirements

To set up a successful EDI integration, you and your trading partner must first agree on the following requirements: 

  • The file format

  • The schema of the file

  • The protocol to send and receive files

  • The business logic that determines what should be sent and when

For example, your trading partner might dictate that you send X12 EDI files (file format), based on a predefined EDI specification (schema), over SFTP (protocol). They may also specify that you receive 850 Purchase Orders and respond with 855 Purchase Order Acknowledgements (business logic).

Once you and your partner agree, it’s time to build an EDI integration. The first step is to locate the EDI specifications your partner sends you and define them as a Stedi guide.

Create a Stedi guide

Stedi guides are Stedi’s user-friendly, machine-readable format for EDI specifications, or “schemas”.  These specifications set the rules of what segments, elements, and data in the EDI file are required, optional, or conditional.

You can create your guide based on the specification you receive from your partner or based on your own EDI requirements. Stedi’s EDI Guide Catalog already contains pre-built guides for many trading partners including Walmart, Trader Joe’s, and Wayfair.

Once your guide is complete, you can use Stedi’s EDI Translate API to parse EDI into JSON and generate EDI from JSON. 

Inbound: parsing X12 EDI

When you receive an X12 EDI file that conforms to your guide, you can translate it to JSON using the EDI Translate /to-json API

You will do a POST to https://edi-translate.us.stedi.com/2022-01-01/x12/to-json with your `input`, which is your EDI payload as a string, and your `guideId`.

{

 "guideId": "01GJ5TB35MK1DFT8Z61J6BS67D",

 "input": "..."

}

When you make a successful request, you will receive a parsed JSON payload that conforms to the JSON schema of your guide.

Outbound: generating X12 EDI

To generate X12 EDI, you must first generate JSON that conforms to the JSON Schema of your guide. Then, you can generate X12 EDI by using the EDI Translate /from-json API. You will do a POST to https://edi-translate.us.stedi.com/2022-01-01/x12/from-json with your `input`, `guideId`, and `envelope`.

{

 "guideId": "01GJ5TB35MK1DFT8Z61J6BS67D",

 "envelope": "..."

 "input": "..."

}

When you make a successful request, you will receive an X12 EDI file that conforms to your guide.

Combine EDI with modern low-code orchestration

Using Tray.io with Stedi makes automating B2B processes much easier and more practical, saving time and reducing costs. After you configure Stedi to parse and generate EDI files, you can build a fully automated B2B process using Tray’s drag-and-drop, low-code workflow. 

Suppose you are a retailer, manufacturer, or e-commerce company, and you have a highly manual order acknowledgment, shipping, and invoicing flow. Your business is scaling rapidly, and humans can no longer manage this process. With Tray and the Stedi Connector, you don’t need to hire expensive consultants or outsource EDI and B2B integration development to a third-party managed service provider. Building complex B2B integrations is now a drag-and-drop activity. 

Since the Tray Platform natively integrates with mainstream ERP systems like NetSuite, Microsoft Dynamics, Sage, SAP, and more, you can also directly integrate your EDI process with your ERP.

tray stedi blog image 1

Transforming JSON into X12 EDI in the Tray Platform

For example, with Tray and Stedi you can fully automate order creation inside your ERP by ingesting EDI purchase orders from retailers and automatically responding with Ship Notices and Invoices. This automation frees up your team from a lot of manual effort.

If you have processes that currently use traditional EDI platforms, you can move more of your business-to-business integrations to low-code. This approach offers several benefits:

  • Decrease the time to develop automated processes 

  • Rely less on consultants to build the automation

  • Ease change management

  • Reduces overall maintenance

  • Continually improve processes faster

Tray’s visual, low-code platform lets you customize your B2B integration business logic using things like conditional logic, loops, data transformations, lookups, and triggers. With Stedi, you can convert between X12 EDI and JSON at any point in the workflow. 

This means that more of your business logic can operate on JSON, which is considerably easier to understand and decipher than formats like X12. Then, you simply convert back to X12 when you need to. 

Finally, any event can automatically trigger these workflows. For example, your workflow could monitor an FTP/SFTP site and begin when a customer or supplier adds a new EDI file.  Stedi can handle SFTP provisioning, too.

Tray.io’s partnership with Stedi modernizes and simplifies B2B integrations and workflows. Check out the documentation to get started.

Subscribe to our blog

Privacy Policy