Transforming and generating EDI - AWS B2B Data Interchange

Transforming and generating EDI

There are multiple ways to transform or generate X12 EDI in AWS B2B Data Interchange. This topic describes the various ways you can create and configure inbound and outbound transformations.

  • Inbound EDI: you receive an X12 EDI document from your trading partner. AWS B2B Data Interchange converts this X12 EDI document into a JSON or XML formatted data file with a service-defined structure. You can optionally apply a mapping—written in JSONata or XSLT—to produce a custom JSON or XML formatted data file.

  • Outbound EDI: you have a JSON or XML formatted data file containing information that you wish to incorporate into an X12 EDI document that will be sent to your trading partner. You can align your JSON or XML formatted data file to conform with the service-defined structure directly, or you can apply a mapping in JSONata or XSLT to convert your custom JSON or XML into the service-defined structure necessary to produce an outbound X12 EDI document.

As a prerequisite, you must set up bucket policies for the Amazon S3 buckets that you use with B2Bi, as described in Configure your Amazon S3 bucket policies.

Control numbers

This section describes how AWS B2B Data Interchange generates control numbers. A control number is an integer that is used to identify a specific interchange, functional group, or transaction within a functional group as it pertains to a specific trading partner. AWS B2B Data Interchange generates control numbers for each X12 envelope contained in a generated EDI acknowledgement or outbound EDI document. The control numbers created and maintained by B2B Data Interchange include the following:

  • Interchange Control Number: For the ISA (interchange) envelope, B2Bi generates an interchange control number that is unique to the sender ID and receiver ID pair. For example, the first acknowledgement or outbound EDI document sent from SEND01 to RECV01 receives an ICN of 001. The next interchange (whether an acknowledgement or outbound EDI document) sent from SEND01 to REVC01 receives an ICN of 002, and so on.

    Note

    Specifically, this number is unique for the ISA05 and ISA06 (sender) & ISA07 and ISA08 (receiver) combination.

  • Functional Group Control Number: For the GS (functional group) envelope, B2Bi generates a functional group control number that is unique to the sender ID, receiver ID, and functional identifier code combination. For example, the first functional group in an interchange sent from SEND01 to RECV01 with a functional identifier code of FA, would be assigned a functional group control number of 001. The next functional group (whether in the same interchange or a new interchange) with the same unique combination of sender ID, receiver ID, and functional identifier code is assigned a functional group control number of 002, and so on.

    In the case where there is a functional group with the same sender ID and receiver ID, but a different functional identifier code, the functional group control number would also be 0001, as this introduces a new, unique combination of sender ID, receiver ID, and functional identifier code.

    Note

    Specifically, the functional group control number is unique for the GS01 (functional identifier code) & GS02 (sender) & GS03 (receiver) combination.

  • Transaction Set Control Number: For ST (transactional level) envelope, B2Bi generates a unique transaction set control number for every transaction in a functional group. For example, if there are three transactions in a functional group, the transactions are assigned transaction set control numbers of 001, 002, and 003. In the case where there is another functional group in the same interchange with two transactions, the transactions in this functional group are assigned transaction set control numbers of 001 and 002.

The following sample EDI document shows the relationship of the three envelopes (indenting added for readability).

ISA*01*0000000000*01*0000000000*ZZ*ABCDEFGHIJKLMNO*ZZ*123456789012345*101127*1719*U*00400*000003438*0*P*> GS*FA*999999999*4405197800*20111206*1100*1*X*004010VICS ST*997*0001 AK1*PO*1421 AK9*A*1*1*1 SE*4*0001 GE*1*1 IEA*1*000000001

We generate control numbers for each of the X12 envelopes. All of these numbers are unique for the specific sender/receiver ID combination.

Note

The control numbers that we generate are also unique across AWS account and AWS Region.