October 15, 2020

How to Integrate Amazon Vendor Central Direct Fulfillment With SAP in Less Than a Day

by Devang Malvania in API Management , B2B/EDI , Camel , DataSonnet , Digital Transformation , ESB 0 comments

Onboarding a new trading partner is often a time consuming and arduous task. This is especially true with legacy technology like Electronic Data Interchange (EDI) and even more so when using Value Added Network (VAN) to connect with your trading partner. These are older, complex frameworks that are often fraught with challenges that include:

  • Integrating a partner’s messaging protocol with your APIs
  • Transforming your EDI message to more widely acceptable and understandable formats such as JSON or XML
  • Connecting to your trading partner or VAN (exposing endpoints)
  • Creating custom applications to automate various partner integration processes
  • Hiring hard-to-find, expensive developers to do the integration work

We will elaborate on each of these pain points throughout the blog.

Unfortunately, the B2B world still runs on EDI messaging formats, an antiquated technology for transferring business documents that has been around since the 1970s. As a result, onboarding trading partners can take months of development work and custom configurations even after all of the specifications have been agreed upon and are ready to implement. This is no different when it comes to integrating with Amazon – the world’s largest e-commerce platform and arguably one of the most technologically advanced companies.

The good news is that it doesn’t have to be this way. ModusBox’s PortX Partner Manager is a drop-in solution for integrating quickly and easily with new trading partners. Below, we’ll demonstrate how you can integrate Amazon Direct Fulfillment with your SAP ERP system via drag-and-drop functionality and a couple of hours worth of time from an EDI analyst.

Amazon EDI standards and protocols

Simply put, Amazon Direct Fulfillment (AKA Amazon Dropship) is the process where Amazon sells a product to the customer and transfers the order information to a vendor or manufacturer for fulfillment. Thousands of vendors have taken advantage of this program, so we thought it would make a great example. Below, is the detailed purchase flow with the corresponding EDI codes.

First, to set up the proper configurations, a vendor must visit their Amazon Vendor Central page and configure the identifiers to be used in the EDI transaction. These include the ISA (Interchange) and GS (Group) identifiers. 

  1. The vendor sends Inventory Availability Advice (846) to communicate inventory availability to Amazon
  2. Amazon returns a Purchase Order (850) to the vendor
  3. The vendor validates and acknowledges the successful receipt of the message via Functional Acknowledge (997)
  4. Once the Purchase Order is entered in the vendor’s system, they acknowledge the purchase order with Purchase Order Acknowledgement (855) 
  5. Once the order is ready to be shipped, Advanced Ship Notice (ASN) is sent to Amazon
  6. Along with the Shipment ID, an invoice is generated and sent to Amazon (810)

As you can see, these communications are completed via an EDI feed that allows for the two companies to exchange real-time inventory numbers and other updates vital to maintaining accurate information regarding the order. Depending on the region, there are various standards within EDI. For example, in North America, companies widely use the X12 standard for transactions, whereas EDIFACT is uniformly accepted in European and Asian countries.

Additionally, once a document has been prepared to comply with X12 standards, its contents are often transferred using a common protocol between the two companies. Walmart requires its vendors to use the Applicability Statement 2 (AS2) protocol, and due to its size and influence in the industry, AS2 has become the de facto protocol for retailers. Amazon is no exception, also preferring the AS2 protocol. AS2 provides several benefits, including encryption, non-repudiation of origin, and delivery confirmation.

SFTP Amazon, the Amazon-hosted Secure File Transfer Protocol (SFTP), allows for accounts to securely upload and download EDI transmissions.

Exposing SAP to other systems

To integrate Amazon to your SAP ERP, you must first expose the SAP functionality to the application. There are multiple methods for doing this. However, following the best practices of API-led connectivity, the correct way is to expose system APIs with IDOC in XML format. Depending upon the ESB engine you use, different components are included or available to complete this task. For example, with Apache Camel, you can use the SAP Java Connector (Jco). Similarly, MuleSoft offers the SAP connector for its Mule ESB. Regardless of the platform in use, the pattern of exposing the system APIs remains the same. 

To receive purchase orders, you can either expose standard SAP objects like ORDERS05 or custom Z Objects such as ZORDERS. These system APIs become reusable windows for integrating with other applications as well as business partners like Amazon.

Once the configuration on Amazon Vendor Direct fulfillment is completed and the system APIs are exposing SAP, you are now ready to Integrate the Amazon Vendor Fulfillment system with the SAP system APIs.

Between a rock and a hard place

At this point, however, a lot of companies run into one of two issues or both. Because EDI has a flat-file format, products that have been developed for EDI Analysts are not natively designed to integrate using modern digital transformation practices such as API-led architecture. Additionally, systems like IBM’s Sterling B2B Integrator are expensive to license and implement – placing it outside of the realm of what’s possible for small to medium-sized businesses. On the other hand, the platforms that provide excellent API support do not offer a modern trading partner management experience for EDI Analysts. This conflict often leads to manual configuration, testing, and fixing errors every time an organization onboards a new trading partner. This wastes the valuable and expensive time of both the EDI analysts and API developers.

Solution: PortX Partner Manager

ModusBox’s PortX suite of products is the coding-optional integration platform built with everyone in mind. PortX Partner Manager was developed to bridge the gap between EDI Analysts and API Integrators. Partner Manager is the first cloud-native trading partner management tool that allows you to automate, track, and manage your B2B partner connections. The platform’s coding-optional nature grants EDI Analysts the power to complete complex integration patterns while providing the same ease of use through drag-and-drop functionality that they need. This frees up API developers to work on more complex business initiatives, accelerating the organization forward.

Configuring the Partner and Partnership

Let’s get back to our example. To complete our integration between Amazon and SAP in Partner Manager, we’ll follow these simple steps in an easy-to-use interface:

  • Add a new partner – Amazon
  • Add the following EDI identifiers
    • ISA
    • GS 
    • AS2
  • Upload the AS2 certificates
  • Configure the X12 write options (see the screenshot)
Configuring transactions with drag-and-drop functionality

Partner Manager represents the true integration solution between a business partner and your internal system APIs and serves as the end-to-end journey for your messages. Normally, EDI integrations are more complicated than just parsing an EDI message and calling APIs. More complex patterns are involved, such as debatching messages based on the individual Group Segments (GS) and EDI transaction records (ST). Partner Manager handles these complexities with simple configurations.

Once a message is split into individual transactions, they can be translated into your organization’s XML IDOC format and routed to your system APIs. The screenshot below illustrates the user interface in Partner Manager that accomplishes this through simple configurations.

Transforming formats with DataSonnet 

One of the biggest challenges to processing B2B transactions is an efficient means to transform incoming EDI messages into more workable formats such as JSON. PortX solves this by supporting a modern open source data transformation tool and language called DataSonnet. It was built to be portable and works with ESBs, Java-based platforms, and as a standalone executable or microservice.

Exposing endpoints

Exposing new endpoints has never been as easy as it is with PortX! The platform supports a variety of endpoints to receive messages from listeners that include HTTP(s) and AS2 and polling protocols such as SFTP, FTP, FTPS, and JMS. 

Because Amazon’s preferred mode of communication is AS2, we will continue to configure our integration using this protocol. It should be no surprise by now that this step is completed in only a few clicks and configurations.

EDI tracking and replay 

An important feature in any B2B management solution is the capability of an organization’s operations team to track processed messages. A message should be persisted for reliability purposes and must be able to reprocess on demand. Partner Manager has out-of-the-box functionality allowing you to persist the message with your own Amazon S3 bucket. PortX also works with custom persistent and retrieval APIs that you provide. 

We have found that Murphy’s law – anything that can go wrong will go wrong – is especially true in B2B operations. Along with a robust and reliable processing engine, a business must be able to replay and reprocess messages on demand in the event that system APIs or other applications are down. With PortX you can easily identify and reprocess the selected message by simply clicking the ‘Replay’ button.

Do more with PortX

Becoming a direct vendor with Amazon fulfillment can be a fruitful endeavor with all of Amazon’s accessibility benefits. It also poses challenges with integration. PortX provides the power of Enterprise Integration Patterns without the code complexity. As a result, onboarding new partners and transactions becomes extremely easy due to this design’s reusability. Adding the first transaction can take between 1-5 days worth of effort depending on the transaction type. Most of this time is used to apply a transformation. However, once the first mapping instance is ready, reuse allows you to configure a new partner in less than a day.

If you would like to learn more about the PortX integration platform, check out the product overview on our site. From there, you can read more about modern integration architecture, or as we like to call it, “micro-ESB” architecture. If your organization has already committed to an ESB, that’s ok too. We built PortX to play nicely with other solutions.


Leave a comment