generateMapping

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.

Before you can use the AI-assisted feature for Amazon Web Services B2B Data Interchange you must enable models in Amazon Bedrock. For details, see AI-assisted template mapping prerequisites in the Amazon Web Services B2B Data Interchange User guide.

To generate a mapping, perform the following steps:

  • Start with an X12 EDI document to use as the input.

  • Call TestMapping using your EDI document.

  • Use the output from the TestMapping operation as either input or output for your GenerateMapping call, along with your sample file.

Samples

import aws.sdk.kotlin.services.b2bi.model.MappingType

fun main() { 
   //sampleStart 
   // Sample GenerateMapping call
val resp = b2BiClient.generateMapping {
    inputFileContent = "Sample input file content"
    outputFileContent = "Sample output file content"
    mappingType = MappingType.fromValue("JSONATA")
} 
   //sampleEnd
}