Outbound EDI - AWS B2B Data Interchange

Outbound EDI

In addition to transforming X12 EDI documents received from your trading partners, you may also need to generate X12 EDI documents for purposes of sending transactional data to your partners. AWS B2B Data Interchange already generates X12 functional acknowledgements (including TA1s, 997s, and 999s) in response to inbound EDI. However, you may have a need to send other forms of X12 EDI to conduct business with your partners.

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 B2Bi 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. B2Bi 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 only one way to transform JSON- or XML-formatted data into EDI. You must have configured a trading capability and a partnership. In each of these cases, you must create and use a Transformer.

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:

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

  • Output directory is 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 becomes s3://EDI-bucket/input-JSON/<capability-id>/<partnership-id>

  • Output directory 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.

Generate EDI documents: overview

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. Configure a trading capability that uses your Profile and Transformer.

    You configure a trading capability for outbound processing as described in Create a trading capability. Make sure to select Outbound for the EDI direction.

  5. Create a partnership for outbound EDI

  6. Test your outbound transformation workflow.

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.

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 pan populated.

    The Mapping configuration pane, with the representation of the sample file populated.

    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 section.

    The AWS B2B Data Interchange console Transformers wizard 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.

Configure your Amazon S3 bucket

Your bucket must have Amazon EventBridge enabled.

  1. Navigate to the bucket in the S3 console, and choose Properties.

  2. Scroll down to the Amazon EventBridge section. . If

    • If Send notifications to Amazon EventBridge for all events in this bucket is Off, choose Edit.

    • If Send notifications to Amazon EventBridge for all events in this bucket is On, you can skip the remainder of this procedure.

  3. Select On and then choose Save changes.

Next, you need to update the bucket policy to have the proper permissions. Copy the following code and paste it into your bucket policy (Permissions > Bucket policy > Edit). Replace BUCKET_NAME with the name of your bucket and AWS account ID with your account ID.

{ "Version": "2012-10-17", "Id": "B2BIEdiCapabilityInputPolicy", "Statement": [ { "Effect": "Allow", "Principal": { "Service": [ "us-east-1.gamma.transformer-service.visby.aws.internal", "us-east-1.gamma.edi-capability.visby.aws.internal" ] }, "Action": [ "s3:GetObject", "s3:GetObjectAttributes" ], "Resource": "arn:aws:s3:::BUCKET_NAME/*", "Condition": { "StringEquals": { "aws:SourceAccount": "AWS account ID" } } }, { "Effect": "Allow", "Principal": { "Service": "us-east-1.gamma.transformer-service.visby.aws.internal" }, "Action": [ "s3:GetObject", "s3:PutObject", "s3:DeleteObject", "s3:AbortMultipartUpload" ], "Resource": "arn:aws:s3:::BUCKET_NAME/output/*", "Condition": { "StringEquals": { "aws:SourceAccount": "AWS account ID" } } } ] }

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 know as the ISA segment

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

    • Optionally, specify Delimiters

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

  4. Optionally, add tags as needed.

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

After you create a partnership, B2Bi 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 B2Bi for status updates on transformation jobs. For more information, see Inbound transformations or Outbound transformations.