Codepackr / edi / EDI Message Gateway & Analyzer

EDI Message Gateway & Analyzer

Receive, analyze, decode, validate, transform, and generate EDI messages across inbound and outbound pipelines with user-provided schemas and canonical models.

Client-Side Execution & Privacy Guarantee

This utility executes 100% locally in your web browser. Your inputs, tokens, queries, and data payloads are never transmitted to any external server or backend.

The EDI Message Gateway provides a browser-based workspace for inspecting, validating, and transforming ANSI X12 and EDIFACT messages without installing a full integration platform. Users supply their own schemas or implementation-guide excerpts; the gateway applies them to decode segments, enforce cardinality, and map elements into a canonical model.

Both inbound analysis (decode and validate a received file) and outbound generation (build a compliant message from a canonical payload) are supported. All processing remains local.

Schema-Driven Decoding

A schema describes the expected segments, loops, element types, and code lists for a given transaction set and version. When a message is loaded, the gateway matches each segment against the schema, reports unknown segments, and flags elements that violate length, type, or code-list constraints.

Users can paste a simplified schema in a compact JSON or YAML form, or load one previously saved. The same schema drives both validation and the generation of human-readable element labels.

Canonical Model Mapping

After structural validation, selected elements are projected into a flat or lightly nested canonical model (for example a purchase-order object with a header and an array of lines). The mapping rules are declared alongside the schema so that the same definition serves analysis and later generation.

The canonical form can be exported as JSON for consumption by other tools or scripts, or it can be edited and fed back into the generator to produce a new EDI document.

Inbound and Outbound Pipelines

An inbound pipeline runs decode, schema validation, and canonical mapping in sequence and surfaces a consolidated error list. An outbound pipeline accepts a canonical payload, applies the reverse mapping, inserts required envelopes, and emits a syntactically complete interchange.

Intermediate results (raw segment tree, validation report, canonical JSON) are visible at each stage, allowing a developer to isolate whether a problem originates in the partner’s file, the schema, or the mapping.

When to use this tool

  • Validate an inbound 850 against a trading-partner implementation guide before it reaches the ERP.
  • Transform a validated claim into a canonical JSON structure for a downstream microservice.
  • Generate a test 810 invoice from a hand-crafted canonical payload.
  • Compare the effect of two different schema versions on the same message.
  • Prototype a mapping without standing up a full EDI translator.

How to use the EDI Message Gateway & Analyzer

  1. Load or paste an EDI message.
  2. Supply or select a schema that describes the expected transaction set.
  3. Run the inbound pipeline to obtain the validation report and canonical model.
  4. Optionally edit the canonical JSON.
  5. Switch to the outbound pipeline and generate a new EDI document from the canonical form.
  6. Download the validation report, the canonical JSON, or the generated EDI.

Worked examples

Schema validation of a short 850

Input
ST*850*0001~
BEG*00*SA*PO999**20240301~
PO1*1*5*EA*10.00**VP*ITEM1~
SE*4*0001~
Output
Validation: OK
Canonical:
{
  "poNumber": "PO999",
  "poDate": "20240301",
  "lines": [
    { "line": "1", "qty": 5, "uom": "EA", "price": 10.00, "part": "ITEM1" }
  ]
}

Schema supplied by the user defines the BEG and PO1 mappings.

Generation from canonical

Input
{ "poNumber": "PO1000", "lines": [{ "qty": 2, "part": "ABC" }] }
Output
ISA*00*          *00*          *ZZ*SENDER*ZZ*RECEIVER*240301*0000*U*00401*1*0*P*>~
GS*PO*SENDER*RECEIVER*20240301*0000*1*X*004010~
ST*850*0001~
BEG*00*SA*PO1000**20240301~
PO1*1*2*EA***VP*ABC~
SE*4*0001~
GE*1*1~
IEA*1*1~

Missing optional elements are omitted; envelopes are completed automatically.

Common mistakes and tips

  • Keep schemas small and focused on the segments you actually exchange; unused optional loops can be omitted.
  • Use the validation report’s element path to locate the exact position of a code-list violation.
  • Canonical models are not a substitute for a full canonical data model in an integration platform; they are a convenient intermediate for inspection and light transformation.
  • When generating, supply partner IDs and a control-number seed so the envelopes match the expected profile.
  • Save frequently used schemas locally; they never leave the browser unless you explicitly export them.

Frequently asked questions

Do I need a full X12 or EDIFACT schema?

No. A partial schema that covers the segments and elements you care about is sufficient for both validation and canonical mapping.

Can the gateway enforce trading-partner-specific code lists?

Yes. Include the allowed codes in the schema; any other value is reported as a validation error.

Is the canonical model standardized?

It is defined by the mapping rules you supply. Different schemas can project the same EDI into different canonical shapes.

Does generation produce a 997 or CONTRL?

The gateway can generate any transaction set for which you provide a schema and mapping, including functional acknowledgments.

Are messages transmitted anywhere?

No. The gateway only analyzes and generates files locally; it does not open network connections.