B2B Integration: Trading Networks, AS2, and EDI Standards
Master Electronic Data Interchange (EDI), ANSI X12, UN/EDIFACT, AS2 communication with MDN receipts, and webMethods Trading Networks architecture.
Key Takeaways
- EDI standardizes business document interchange across global supply chains (ANSI X12 in North America, UN/EDIFACT internationally)
- AS2 (EDIINT) transmits EDI payloads securely over HTTP/S with S/MIME encryption, digital signatures, and MDN receipts
- Message Disposition Notification (MDN) provides cryptographically verifiable Non-Repudiation of Receipt (NRR)
- Trading Networks (TN) manages partner profiles, document attributes, and processing rules to automate B2B transaction execution
The Diagnostic Context
Global trade runs on Electronic Data Interchange (EDI). Over 85% of global commerce—from Walmart purchase orders to ocean shipping manifests—transacts through standardized EDI documents exchanged over secure AS2 tunnels.
The Core Technique
Core EDI Standards & Transaction Sets
| Standard | Geography / Domain | Common Transaction Sets | |---|---|---| | ANSI X12 | North America (Retail, Healthcare, Logistics) | 850 (Purchase Order), 855 (PO Ack), 856 (Advance Ship Notice / ASN), 810 (Invoice), 997 (Functional Ack) | | UN/EDIFACT | International / Global Europe & Asia | ORDERS (Purchase Order), DESADV (Dispatch Advice), INVOIC (Invoice), CONTRL (Syntax Ack) | | HIPAA EDI | US Healthcare Compliance | 837 (Healthcare Claims), 835 (Claim Payment/Remittance), 834 (Benefit Enrollment) |
The AS2 (Applicability Statement 2) Protocol
sequenceDiagram
autonumber
participant Buyer as Buyer Enterprise (Sender)
participant Supplier as Supplier Gateway (Receiver)
Note over Buyer: 1. Sign EDI payload with Buyer Private Key<br/>2. Encrypt payload with Supplier Public Cert (S/MIME)
Buyer->>Supplier: HTTP POST (AS2-To, AS2-From, Encrypted Payload)
Note over Supplier: 3. Decrypt payload with Supplier Private Key<br/>4. Verify signature with Buyer Public Cert<br/>5. Calculate SHA-256 MIC (Message Integrity Check)
Supplier-->>Buyer: Synchronous / Asynchronous Signed MDN Receipt<br/>(Contains MIC & Supplier Signature)
Note over Buyer: 6. Verify MDN: Non-Repudiation of Receipt (NRR) Confirmed
webMethods Trading Networks (TN) Architecture
- Partner Profiles: Stores corporate identifiers (DUNS, AS2 IDs), contact info, public X.509 certificates, and delivery methods (SFTP, AS2, HTTPS).
- Document Attributes: Extracts key fields (e.g., ,CODE / PROMPT
SenderID
,CODE / PROMPTReceiverID
,CODE / PROMPTPONumber
) from incoming payloads via XPath or WQL queries.CODE / PROMPTTotalAmount
- Processing Rules: Evaluates document attributes against rules to trigger business workflows (e.g., "If Document is X12 850 from Partner WalMart, execute ").CODE / PROMPT
wm.b2b.orders:processPurchaseOrder
- Trading Partner Agreements (TPA): Stores bilateral agreement configurations (e.g., custom delimiter overrides, split rules).
Try This Right Now
Inspect a raw ANSI X12 850 EDI snippet: Identify the ISA (Interchange Header), GS (Functional Group Header), ST (Transaction Set Header 850), and SE/GE/IEA trailing segments.
Tip: Knowledge only becomes capability once you run the prompt yourself.