Transformer
Source:
src/AWS/B2BI/Transformer.ts
An AWS B2B Data Interchange (B2BI) transformer. A transformer describes how to convert inbound EDI documents to a target format (or the reverse) using a mapping template. Transformers are credential-free and testable.
Activation is one-way: B2BI rejects every update to an active
transformer, including a status-only deactivation, so changing the
configuration, name, or status of an active transformer replaces it
(delete-first). Deletion works regardless of status.
Creating a Transformer
Section titled “Creating a Transformer”const transformer = yield* B2BI.Transformer("X12ToJson", { name: "x12-to-json", status: "active", inputConversion: { fromFormat: "X12", formatOptions: { x12: { transactionSet: "X12_850", version: "VERSION_4010" } }, }, mapping: { templateLanguage: "JSONATA", template: "{ \"orderId\": transactionSets[0].St.transactionSetControlNumber }", },});