Outbound EDI - AWS B2B Data Interchange

Outbound EDI

You can use AWS B2B Data Interchange to generate X12 EDI documents for purposes of sending transactional data to your partners. AWS B2B Data Interchange also automatically generates X12 functional acknowledgements (including TA1s, 997s, and 999s) in response to inbound EDI.

For example, you may need to send an 810 Invoice after receiving an 850 Purchase Order from a manufacturing customer. Similarly, you may need to send an 835 Claim Payment after receiving an 837 Claim from a healthcare provider. Whether responding to or initiating a transaction, there are numerous scenarios where you may need to generate and send X12 EDI outbound to your trading partners. To generate outbound X12 EDI, it is common to use JSON or XML formatted data for your input. This data is typically exported from a downstream application, such as an Enterprise Resource Planning (ERP) solution or Claims Management Software (CMS) system. Now, however, you can use B2B Data Interchange to generate the X12 EDI documents.

You start with an XML or JSON formatted file as input, and use the service to generate the X12 EDI document. B2B Data Interchange then saves it to an Amazon S3 bucket that has been configured to store your output X12 EDI documents. From Amazon S3, you can automatically send it to your trading partner using AWS Transfer Family or any other data connectivity solution.

Currently, there is one way to transform JSON- or XML-formatted data into EDI: by dropping your JSON or XML files into Amazon S3 locations that you have specified for monitoring. With this approach, you configure an outbound transformer that is configured to transform JSON or XML data into an X12 EDI document. You then drop JSON or XML documents into the input directory specified in the attached trading capability and B2B Data Interchange listens for Amazon S3 events to automatically transform the documents and write the generated X12 into the output directory. The input and output directory used are those specified in your trading capability with partnership ID added to the prefixes. As part of the partnership configuration, you specify one or more trading capabilities to use.

The process is similar to the corresponding inbound process. The difference is that prefixes using the trading capability ID and partnership ID are added to the directories that you specify in the trading capability.

For example, assume that you specify the following directories in your trading capability:

  • Capability input directory: s3://EDI-bucket/input-JSON/

  • Capability output directory: s3://EDI-bucket/output-EDI/

When you associate your trading capability with your partnership, the service adds prefixes to both the input and output directory, changing them to the following:

  • Input directory to drop JSON or XML files becomes s3://EDI-bucket/input-JSON/<capability-id>/<partnership-id>

  • Output directory containing the generated X12 documents becomes s3://EDI-bucket/output-EDI/<capability-id>/<partnership-id>

You then drop JSON or XML files into the partnership-ID prefix in the input directory to generate EDI. The generated EDI is then written to the partnership-ID prefix in the output directory.

Similar to the inbound process, this allows you to associate one trading capability with multiple partnerships, and have partnerships that are associated with multiple trading capabilities. Using the trading capability and partnership IDs as prefixes gives you clear delineation as to where the EDI documents for a specific partner should be stored.

Generating outbound EDI documents

Typically, you perform the following steps to generate X12 EDI documents as output.

  1. Create a profile

  2. Create an outbound transformer

  3. Write or import mapping code that the system uses to generate a valid X12 EDI document.

    You can start with an EDI document, and then run the CreateStarterMappingTemplate operation to create your mapping template.

  4. Create a trading capability for outbound EDI. Make sure to select Outbound for the EDI direction.

  5. Create a partnership for outbound EDI

  6. Test your transformation workflow. For details, see the Testing end-to-end topic from our EDI document exchange with AWS B2B Data Interchange workshop.

    Note

    These testing instructions are written for testing inbound EDI, so you need to adapt them for testing outbound EDI.

Create a profile

You can use profiles to store contact information and details about your own business and specify a unique name to easily identify this profile A profile contains the following types of information.

  • Profile details: This section contains the profile name, the name of the business, a contact email address, and a phone number.

    Note

    These details are all your characteristics, not those describing your trading partner. The latter are described as part of the partnership resource.

  • Logging: This section describes the logging configuration. You can also opt out of logging (not recommended).

  • Tagging: Tag your profiles to easily organize, search, and filter your profiles globally.

To create a profile
  1. Open the AWS B2B Data Interchange console at https://console.aws.amazon.com/b2bi/ and select Profiles from the navigation pane, then choose Create profile.

  2. Enter the profile details, the name of the profile, the name of the business represented, and the contact information (email and phone number).

  3. Logging is selected by default. Clear the box to turn off logging (not recommended). The log group is based on the profile ID, for example, /aws/vendedlogs/b2bi/p-ABCDE111122223333.

  4. Optionally, add tags as needed.

    The AWS B2B Data Interchange console Profiles page, showing an example profile.

Create an outbound transformer

An outbound transformer takes in a sample template and produces an EDI, X12-formatted document that you can send to your trading partners.

To create an outbound transformer
  1. Open the AWS B2B Data Interchange console at https://console.aws.amazon.com/b2bi/ and select Transformers from the navigation pane, then choose Create transformer.

  2. On the Transformer configuration page, enter the following information.

    1. Enter a name (no spaces).

    2. In Transfer settings, choose Outbound EDI, and select an EDI document number and X12 version from the dropdown menus.

    3. For the Input format, select JSON or XML, depending upon the format for the documents to be converted by this transformer.

    4. In the Sample documents pane, select a sample input document, and optionally a sample output document from your available Amazon S3 buckets.

      Provide the bucket and prefix in Amazon S3 for a sample document. This is useful for making sure the transformer functions correctly.

      The Choose an archive in S3 page, listing available buckets and documents.
  3. Choose Next to proceed to the next stage of transformer creation.

    The AWS B2B Data Interchange console Transformers wizard Select input page, showing the source document options.
  4. The Mapping configuration screen appears, with the Mapping editor panel populated. You can use generative AI-assisted EDI mapping to expedite the mapping configuration. For details, see Generative AI-assisted EDI mapping.

    The items in your mapping editor are the only items that are extracted from the input EDI document, and that are then saved to your output file, located in your Amazon S3 output location.

    You use the Mapping template editor to only include certain pieces of your EDI documents.

    If you chose not to customize the output format using the Mapping template editor,AWS B2B Data Interchange transforms EDI document inputs using the default, service-defined format shown on the left side of your screen.

    The pieces you select are previewed in the mapping preview pane.

  5. When you are happy with your mappings, choose Next, which takes you to the review page. Note that newly created transformers are inactive.

    Note

    A status of Inactive indicates that the transformer is not used in any trading capabilities: it is essentially in edit mode. When you are finished editing and updating the transformer, you change the status to Active. Then, you can associate the transformer with a trading capability. At this point, the transformer is essentially locked, and in production mode.

    The AWS B2B Data Interchange console Transformers wizard review page.
  6. After your review is complete, choose Save to create the transformer.

Create a trading capability for outbound EDI

Trading capabilities contain the information required to build your event-driven EDI workflows. To create a trading capability, specify the EDI direction, add details about the EDI document number and version, choose the transformer to use to transform or generate your EDI, and specify the input and output directories used to source and store documents. Based on the EDI direction selected and the transformer attached to the trading capability, you can use the capability to automatically:

  • Transform incoming EDI documents into JSON or XML outputs.

  • Transform XML or JSON data stored in Amazon S3 into EDI documents.

To create a trading capability
  1. Open the AWS B2B Data Interchange console at https://console.aws.amazon.com/b2bi/ and select Trading capabilities from the navigation pane, then choose Create trading capability.

  2. In the Trading capability settings section, enter the following information.

    • Enter a descriptive, unique name for the trading capability.

    • Select an EDI direction, either Inbound or Outbound.

    • Choose an X12 version and X12 transaction set from the corresponding dropdown menus.

    • In the Apply transformer field, choose a transformer to apply to this trading capability.

  3. In the Configure directories section, you configure both the input and output directories that are used to source and store documents.

    • In the Input directory area, enter an Amazon S3 bucket.

    • Choose Browse S3 to navigate to your available Amazon S3 buckets, where you can select a bucket (and optionally a prefix) to specify your input directory.

      Note

      B2B Data Interchange will create and monitor prefixes in your input directory for input X12 documents (for inbound X12) or for input JSON/XML documents (for generating X12).

    • Choose Copy policy to copy a policy that you can then paste into your input directory's bucket policy.

    • Configure your output directory in the Output directory area, similarly to how you configured the input directory.

      Note

      B2B Data Interchange will create prefixes in the specified output directory to store the transformed X12 documents (in the case of inbound X12) or storing the generated X12 documents (in the case of outbound X12).

  4. Optionally, add tags as needed.

  5. After you have configured all of the settings, choose Create capability.

An example capability, showing the settings, the associate partnership, input and output directories, attached reference documents, and an example tag.
Note

Create a partnership for outbound EDI

A partnership represents the connection between you and your trading partner. It incorporates a profile and one or more trading capabilities. It is also where you define the interchange control header and functional group header information necessary to generate outbound EDI documents.

If you intend to perform outbound EDI transformations with this partner, fill in details in the Outbound EDI configuration section.

To create a partnership
  1. Open the AWS B2B Data Interchange console at https://console.aws.amazon.com/b2bi/ and select Partnerships from the navigation pane, then choose Create partnership.

  2. In the Partnership details section, provide the following information.

    1. Enter a descriptive name for the partnership.

    2. Enter an email address to associate with the partnership. Provide the trading partner's email address.

    3. Choose a profile from the dropdown menu.

    4. Select one or more trading capabilities from the Trading capabilities list.

  3. Enter header details in the Outbound EDI configuration. The system uses the outbound EDI header information to format the outbound EDI document according to the needs of the partner to whom you are sending these documents.

    • Provide Interchange control header information: also known as the ISA segment

    • Provide Functional group header information: also known as the GS segment

    • Optionally, specify Delimiters

    • Optionally, for EDI validation, select Enable outbound EDI (selected by default)

      Note

      When creating or updating a Partnership, you must specify all delimiters or leave them all blank. Defining certain delimiters, but not others, is not a valid configuration.

  4. Optionally, add tags as needed.

  5. After you have configured all of the settings, choose Create partnership.

After you create a partnership, B2B Data Interchange monitors the prefixes containing the trading partner ID using Amazon S3 events.

When EDI documents are written to the partnership ID prefix, they are automatically transformed into JSON/XML files and written to the partnership ID prefix that is nested within the output directory. When JSON or XML data files are written to the partnership ID prefix they are automatically transformed into X12 EDI documents and written to the partnership ID prefix that is nested within the output directory and trading capability ID prefix.

Finally, we highly recommend that you subscribe to events emitted by B2B Data Interchange for status updates on transformation jobs. For more information, see Inbound transformations or Outbound transformations.