AWS B2B Data Interchange

2024/11/13 - AWS B2B Data Interchange - 1 new api methods

Changes  This release adds a GenerateMapping API to allow generation of JSONata or XSLT transformer code based on input and output samples.

GenerateMapping (new) Link ΒΆ

Takes sample input and output documents and uses Amazon Bedrock to generate a mapping automatically. Depending on the accuracy and other factors, you can then edit the mapping for your needs.

See also: AWS API Documentation

Request Syntax

client.generate_mapping(
    inputFileContent='string',
    outputFileContent='string',
    mappingType='JSONATA'|'XSLT'
)
type inputFileContent:

string

param inputFileContent:

[REQUIRED]

Provide the contents of a sample X12 EDI file (for inbound EDI) or JSON/XML file (for outbound EDI) to use as a starting point for the mapping.

type outputFileContent:

string

param outputFileContent:

[REQUIRED]

Provide the contents of a sample X12 EDI file (for outbound EDI) or JSON/XML file (for inbound EDI) to use as a target for the mapping.

type mappingType:

string

param mappingType:

[REQUIRED]

Specify the mapping type: either JSONATA or XSLT.

rtype:

dict

returns:

Response Syntax

{
    'mappingTemplate': 'string',
    'mappingAccuracy': ...
}

Response Structure

  • (dict) --

    • mappingTemplate (string) --

      Returns a mapping template based on your inputs.

    • mappingAccuracy (float) --

      Returns a percentage that estimates the accuracy of the generated mapping.