ediverse Explore the platform

Spotlight PEPPOL BIS Billing 3.0 The EU e-invoicing mandate is here — France Sept 2026, Belgium Jan 2026, Germany 2025.

Mapping

The artifact that materialises the 'BTNR of 850 X12 corresponds to BGM01 of ORDERS EDIFACT' — without it, no partner integration.

Problem

The same business concept (PO number, GLN, currency) carries different names and positions per the partner standard. How to materialise these correspondences in an auditable and reusable way?

Forces

  • Mappings must live as code (versioned, tested, deployed).
  • A single source field may feed several target fields (split / fan-out).
  • Defaults, transforms (uppercase, padding, lookup) must be explicit.
  • A mapping must be testable via bilateral fixtures.

Solution

Define the mapping in a structured format: (1) XSLT for XML→XML, (2) DataWeave (MuleSoft) or JSLT/jq (JSON→JSON), (3) Smooks / FreeMarker for EDIFACT/X12. Each rule has a source, a target, an optional transform, and a fallback. The mapping is versioned in Git, tested via fixtures (input.x12 + expected.json), and deployed as an artifact distinct from app code. The Canonical Model pattern strongly depends on it: N mappings to canonical instead of N×N between formats.

EDI implementation

In EDI, a typical mapping links an ORDERS EDIFACT D.96A to a canonical `Order` JSON: `BGM[1010] → order.number`; `NAD+BY[3035=BY]/3039 → order.buyer.gln`; `DTM+137 → order.documentDate (yyyymmdd → ISO 8601)`. Common tools: IBM DataPower XI52, Software AG webMethods Mapper, Apache Camel marshal/unmarshal with data formats, or custom Smooks libs. Each mapping must have Walmart-realistic and Stellantis-realistic fixtures at minimum.

Anti-patterns

  • Mapping in plain Java/Python code — not independently testable, change requires redeploy.
  • Mapping without fixtures — every evolution silently breaks prod.
  • Mapping that assumes implicit parser defaults — parser refactor breaks prod.
  • N×N mappings instead of a canonical model — combinatorial explosion.

Sources