EDI Integration with ERP: SPS Commerce, TrueCommerce, Cleo & OpenText
How do you integrate ERP with EDI translators like SPS Commerce or TrueCommerce?
TL;DR
Bottom line: Use a VAN-based EDI translator (SPS Commerce, TrueCommerce) for broad trading partner coverage with minimal IT overhead; use direct AS2 (Cleo, OpenText) for high-volume partnerships where per-transaction cost savings justify the setup investment.
Key limit: Trading partner maps are custom per partner and per document type — onboarding each new partner requires 2-6 weeks of testing and certification.
Watch out for: Web EDI portals do NOT integrate with ERP automatically — without middleware or embedded connectors, operators re-key data manually, defeating the purpose of EDI.
Best for: Automating the order-to-cash cycle (PO 850 > Ack 855 > ASN 856 > Invoice 810 > FA 997) between ERP and retail/wholesale trading partners.
Authentication: AS2 uses X.509 digital certificates for signing/encryption; VAN uses account credentials with network-level security; API uses OAuth 2.0 or API keys.
System Profile
This card covers the end-to-end integration between ERP systems and EDI translator/VAN platforms. It is an integration playbook covering four major platforms: SPS Commerce (managed VAN/embedded EDI), TrueCommerce (VAN/API hybrid), Cleo Integration Cloud (AS2/API/VAN), and OpenText Trading Grid (enterprise VAN/AS2/MFT). On the ERP side, the patterns apply to any major ERP since the EDI translation layer abstracts the ERP-specific format.
System
Role
API Surface
Direction
Any ERP (SAP, Oracle, NetSuite, D365, Epicor)
Business system of record
Native API / flat file / IDoc
Inbound + Outbound
SPS Commerce
Managed EDI VAN / embedded ERP connector
VAN + pre-built ERP maps
Orchestrator
TrueCommerce
EDI VAN / API / SFTP connector
VAN + SFTP + API
Orchestrator
Cleo Integration Cloud
EDI translator / AS2 gateway
AS2 + API + SFTP + VAN
Orchestrator
OpenText Trading Grid
Enterprise B2B integration / MFT
VAN + AS2 + MFT + API
Orchestrator
Trading Partners
External buyers/sellers
X12 / EDIFACT over VAN or AS2
Counterparty
API Surfaces & Capabilities
EDI integration has four distinct transport and integration surfaces. Each serves different partner volumes and technical maturity levels.
Integration Surface
Protocol
Best For
Setup Time
Per-Tx Cost
IT Overhead
Scalability
VAN (Value Added Network)
Proprietary mailbox
Broad partner networks (100+)
1-2 weeks
$0.05-$0.25/tx
Low
Excellent
AS2 (Direct)
HTTPS + S/MIME
High-volume bilateral (>10K tx/mo)
4-8 weeks/partner
Near-zero (fixed)
High
Good per partner
API (REST/Webhook)
HTTPS/JSON
Modern partners, real-time
2-4 weeks
Near-zero
Medium
Excellent
Web EDI Portal
HTTPS (browser)
Low-volume small suppliers
1-3 days
Included
None
Poor (manual)
Rate Limits & Quotas
EDI Document Processing Limits
Limit Type
SPS Commerce
TrueCommerce
Cleo CIC
OpenText TG
Documents/day
Unlimited (plan-based)
Unlimited (plan-based)
Unlimited (license)
Unlimited (contract)
Partner connections
Plan-dependent (25-unlimited)
Plan-dependent
License-dependent
Contract-dependent
Document size
10 MB per interchange
5 MB default (configurable)
50 MB per document
80 MB per file (MFT)
Acknowledgment SLA
997 within 24h
997 within 24h
Configurable
Configurable
Onboarding time
2-4 weeks/partner
2-6 weeks/partner
1-4 weeks/partner
2-8 weeks/partner
VAN Transaction Cost Structure
Volume Tier
VAN Cost
AS2 Equivalent
Breakeven
< 500 tx/month
$0.10-$0.25/tx ($50-$125/mo)
~$500/mo fixed infra
~5,000 tx/month
500-5,000 tx/month
$0.05-$0.15/tx ($25-$750/mo)
~$500/mo fixed infra
~5,000 tx/month
5,000-50,000 tx/month
$0.02-$0.08/tx ($100-$4K/mo)
~$500-$1,500/mo fixed
Already at breakeven
> 50,000 tx/month
$0.01-$0.05/tx ($500+/mo)
~$1,500/mo fixed
AS2 wins significantly
Authentication
Method
Used By
Mechanism
Certificate Required?
Notes
X.509 Digital Certificates
AS2 direct connections
Mutual TLS + S/MIME
Yes (both parties)
Certificates expire every 1-2 years
VAN Account Credentials
SPS, TrueCommerce, OpenText
Username/password or API key
No
VAN handles partner security
OAuth 2.0
Cleo CIC API, SPS API
Client credentials flow
No
ERP-to-translator API integration
SFTP Key-Based
TrueCommerce, Cleo
SSH key pair
SSH keys
File-based EDI exchange with ERP
Authentication Gotchas
AS2 certificate expiry is the #1 cause of unplanned EDI outages — set calendar reminders 60 days before expiry for every partner certificate. [src4]
VAN credentials are org-scoped, not user-scoped — a single compromised credential exposes all trading partner communications. [src1]
Some retailers require specific AS2 certificate types (e.g., SHA-256 minimum) — verify partner requirements before purchasing certificates. [src8]
Constraints
VAN pricing is typically per-KC or per-document — at high volumes (>50K tx/month), VAN costs can exceed AS2 infrastructure costs by 3-5x.
AS2 requires bilateral certificate exchange with EVERY direct partner — this does not scale beyond 20-50 partners without dedicated PKI management.
EDI 997 functional acknowledgments are mandatory for most retail partners — missing 997s trigger chargebacks and compliance scorecard demerits.
X12 and EDIFACT are NOT interchangeable — a partner requiring EDIFACT ORDERS cannot accept an X12 850 without a cross-standard translation step.
Web EDI portals have NO automation — they exist only for suppliers too small to justify EDI integration.
Trading partner certification is required for EVERY new partner AND every new document type — there is no "connect once, trade with everyone" shortcut.
ERP-side mapping depends on the ERP's native format: SAP uses IDocs, Oracle uses FBDI/XML, NetSuite uses CSV/SuiteTalk, Dynamics uses DMF.
Integration Pattern Decision Tree
START — User needs to integrate ERP with EDI trading partners
├── How many trading partners?
│ ├── 1-5 high-volume partners
│ │ ├── Budget for per-partner setup? → YES: Direct AS2 / NO: VAN
│ │ └── Partners require AS2? (Walmart, Amazon) → AS2 mandatory
│ ├── 5-50 partners
│ │ ├── Mixed protocols? → YES: Hybrid (Cleo/OpenText) / NO: VAN
│ │ └── Need AI mapping? → YES: SPS MAX or Cleo CIC / NO: TrueCommerce
│ └── 50+ partners → VAN is the only scalable option
├── Which ERP?
│ ├── SAP → IDoc-based (see sap-idoc-edi-integration)
│ ├── Oracle ERP Cloud → FBDI/XML or REST API
│ ├── NetSuite → CSV/SuiteTalk API
│ ├── Dynamics 365 → DMF or OData API
│ ├── Epicor/Sage/Acumatica → Platform-specific API or flat file
│ └── No ERP → Web EDI portal (manual)
├── What document types?
│ ├── Core order cycle (850/855/856/810/997) → All platforms
│ ├── Inventory (846) + Forecast (830) → Verify support
│ └── Cross-dock/drop-ship (940/945) → Verify 3PL integration
└── Error tolerance?
├── Zero-loss (retail compliance) → VAN + 997 tracking + DLQ
├── Audit trail required → VAN with 7-year retention
└── Best-effort → SFTP + scheduled reconciliation
Quick Reference
EDI Document Flow: Order-to-Cash Cycle
Step
EDI Document
X12 Code
EDIFACT
Direction
ERP Transaction
Trigger
1
Purchase Order
850
ORDERS
Buyer → Seller
Create Sales Order
Buyer procurement
2
PO Acknowledgment
855
ORDRSP
Seller → Buyer
SO confirmation
SO created in ERP
3
Advance Ship Notice
856
DESADV
Seller → Buyer
Shipment/delivery
Goods shipped
4
Invoice
810
INVOIC
Seller → Buyer
AR Invoice
Shipment confirmed
5
Functional Ack
997
CONTRL
Receiver → Sender
(system-level)
Any EDI received
6
Remittance Advice
820
REMADV
Buyer → Seller
AP payment
Payment processed
7
Inventory Advice
846
INVRPT
Seller → Buyer
Inventory snapshot
Scheduled
8
Forecast
830
DELFOR
Buyer → Seller
Demand planning
Forecast cycle
EDI Platform Comparison
Capability
SPS Commerce
TrueCommerce
Cleo CIC
OpenText TG
Primary Model
Managed VAN + embedded ERP
VAN + API + SFTP
AS2/API/SFTP + VAN
Enterprise VAN + AS2 + MFT
Pre-built ERP Maps
100+ ERPs
20+ ERPs
50+ ERPs
200+ connectors
Partner Network
115,000+
92,000+
Variable
1,000,000+
X12 / EDIFACT
Full / Full
Full / Full
Full / Full
Full / Full
AS2 Native
No (via VAN)
No (via VAN)
Yes (primary)
Yes
AI Features
MAX AI (2026)
Basic analytics
AI mapping (2025)
Analytics + MFT
Pricing
Per-connection + tx fees
Tiered subscription
License + per-connection
Enterprise contract
Best For
US retail mid-market
Multi-ERP, Sage/D365
Technical, AS2-heavy
Global enterprise
Annual Cost
$5K-$50K
$3K-$30K
$10K-$100K+
$50K-$500K+
Step-by-Step Integration Guide
1. Map Business Requirements to EDI Document Types
Identify which EDI transactions your trading partners require. Most retail partners mandate a minimum set. [src2]
Required by most retail partners:
850 (Purchase Order) — inbound to your ERP
855 (PO Acknowledgment) — outbound from your ERP
856 (Advance Ship Notice) — outbound from your ERP
810 (Invoice) — outbound from your ERP
997 (Functional Ack) — bidirectional (automatic)
Verify: Check each trading partner's EDI implementation guide for required document types, versions, and segment-level requirements.
2. Select Transport Method (VAN vs AS2 vs API)
Choose based on partner count, volume, and IT capacity. [src4, src8]
Decision matrix:
Partners < 10 AND volume > 10K tx/month → Direct AS2
Partners < 10 AND volume < 10K tx/month → VAN or API
Partners 10-50 → VAN (SPS or TrueCommerce)
Partners 50+ → VAN (mandatory at scale)
Mixed (some AS2-only like Walmart) → Hybrid (Cleo or OpenText)
3. Configure ERP-to-EDI Mapping
The EDI translator converts between your ERP's native format and X12/EDIFACT standards. [src3]
ERP-specific outbound mapping:
SAP S/4HANA: IDoc (ORDERS05, INVOIC02) → X12 (850, 810)
Oracle ERP: XML/FBDI → X12
NetSuite: CSV/JSON via SuiteTalk → X12
Dynamics 365: XML via DMF or OData JSON → X12
Epicor Kinetic: BAQ/REST API JSON → X12
Mapping approach:
1:1 Direct mapping → each partner gets custom map (simple, unscalable)
Canonical mapping → ERP → canonical format → X12/EDIFACT (recommended for 5+ partners)
Verify: Send test 850 inbound through full pipeline — confirm ERP creates correct Sales Order with all line items, prices, and shipping details.
6. Test End-to-End with Trading Partner Certification
Every trading partner requires a certification cycle before going live. [src1]
Certification steps:
1. Receive partner's EDI implementation guide
2. Configure maps per partner specification
3. Exchange test documents in sandbox
4. Partner validates segments, elements, totals
5. Fix discrepancies (usually 2-3 rounds)
6. Partner certifies → move to production
7. Monitor first 2 weeks closely
Timeline: 2-6 weeks per partner
Code Examples
Python: Parse X12 850 Purchase Order
# Input: Raw X12 850 EDI document string
# Output: Parsed purchase order dict ready for ERP API insertion
def parse_x12_850(edi_content: str) -> dict:
"""Parse X12 850 Purchase Order into structured dict."""
segments = edi_content.replace("\n", "").split("~")
order = {"line_items": [], "raw_segment_count": len(segments)}
for seg in segments:
elements = seg.strip().split("*")
seg_id = elements[0] if elements else ""
if seg_id == "BEG":
order["po_number"] = elements[3] if len(elements) > 3 else ""
order["po_date"] = elements[5] if len(elements) > 5 else ""
elif seg_id == "N1":
qualifier = elements[1] if len(elements) > 1 else ""
if qualifier == "ST":
order["ship_to_name"] = elements[2]
elif seg_id == "PO1":
item = {
"line_number": elements[1],
"quantity": int(elements[2]),
"unit_price": float(elements[4]),
"upc": elements[7] if len(elements) > 7 else "",
}
order["line_items"].append(item)
return order
JavaScript/Node.js: Build X12 856 ASN from ERP Shipment
// Input: Shipment data object from ERP
// Output: X12 856 ASN document string
function buildASN856(shipment) {
const date = new Date().toISOString().slice(0,10).replace(/-/g,'');
const ctrl = String(Date.now()).slice(-9).padStart(9, '0');
return [
`BSN*00*${shipment.shipmentId}*${date}`,
`HL*1**S`,
`TD1*CTN*${shipment.cartonCount}`,
`REF*BM*${shipment.bolNumber}`,
`N1*ST*${shipment.shipToName}`,
...shipment.items.map((item, i) =>
`HL*${i+2}*1*I~LIN**UP*${item.upc}~SN1**${item.quantity}*EA`
),
`CTT*${shipment.items.length}`,
].join('~') + '~';
}
cURL: Test VAN Connectivity
# Check pending EDI documents in SPS Commerce mailbox
curl -s "https://api.spscommerce.com/transactions/v2/pending" \
-H "Authorization: Bearer $SPS_TOKEN" | jq '.transactions | length'
# Submit outbound EDI document to VAN
curl -s -X POST "https://api.spscommerce.com/transactions/v2/outbound" \
-H "Authorization: Bearer $SPS_TOKEN" \
-H "Content-Type: application/edi-x12" \
-d @outbound_810_invoice.edi
Data Mapping
ERP-to-EDI Field Mapping: Sales Order to 850/855/856/810
ERP Field
X12 Segment*Element
EDIFACT
Transform
Gotcha
PO Number
BEG*03
BGM+220
Direct
Max 22 chars in X12
PO Date
BEG*05
DTM+137
YYYYMMDD
Strip time component
Ship-To Name
N1*ST*02
NAD+ST
Direct
Max 60 chars; truncate
Ship-To Address
N3*01
NAD+ST:street
Direct
Two N3 segments max
Ship-To City/State/Zip
N4*01/02/03
NAD+ST
Direct
International postal codes may exceed 15 chars
UPC
PO1*07 (UP)
LIN+UP
Direct
Must be 12-digit GTIN
Vendor SKU
PO1*09 (VP)
LIN+SA
Direct
Varies by partner
Quantity
PO1*02
QTY+21
Integer
Some partners reject decimals
Unit Price
PO1*04
PRI+AAA
Decimal (2-4 places)
No currency symbol
Carrier Code
TD5*03
TDT+20
SCAC lookup
Must use SCAC code
Data Type Gotchas
X12 dates are ALWAYS YYYYMMDD (8 digits, no separators) — strip hyphens from ISO 8601. [src2]
X12 numeric fields do NOT include commas or currency symbols — "$1,234.56" becomes "1234.56". [src3]
EDIFACT uses comma as decimal separator by default — verify UNA segment for North American integrations. [src3]
GS1/UPC must be exactly 12 digits in X12 — strip leading zero from 13-digit EAN for US partners. [src2]
Ship-to addresses have a 2-line limit (N3 segments) — combine address lines 3+ into line 2 or receive 997 rejection. [src2]
Error Handling & Failure Points
Common EDI Error Codes
Source
Code
Meaning
Cause
Resolution
997
AK304-1
Unrecognized segment ID
Segment not in partner spec
Review partner EDI guide; remove/rename segment
997
AK304-3
Mandatory segment missing
Required segment omitted
Add missing segment to mapping
997
AK403-1
Mandatory element missing
Required data blank in ERP
Fix ERP data quality; add pre-validation
997
AK403-4
Data element too long
Field exceeds max length
Truncate to spec length
997
AK403-7
Invalid code value
Code not in partner list
Map ERP code to partner code list
AS2
MDN-error
Decryption/signature fail
Certificate mismatch/expiry
Exchange updated certificates
VAN
ENVELOPE_ERROR
ISA/GS validation failed
Control numbers out of sequence
Reset control number sequence
ERP
IMPORT_FAIL
ERP rejected document
Missing customer/item in master data
Fix master data; add pre-validation
Failure Points in Production
Certificate expiry breaks AS2 silently: No documents flow, no alerts unless monitoring configured. Fix: Set expiry alerts 60 days in advance; maintain certificate renewal calendar. [src4]
Control number duplication causes 997 rejections: ISA/GS control numbers must be unique per interchange. Fix: Use database-backed control number sequences, not file-based counters. [src2]
ERP master data mismatch causes import failures: Valid EDI syntax but unknown customer/item ID fails on ERP import. Fix: Pre-validate customer and item master data in translator before ERP import. [src5]
Timezone differences cause date mismatches: 850 processed late PST creates wrong-date order in UTC ERP. Fix: Standardize dates to UTC in translator; apply timezone offset during ERP import. [src3]
New item UPC lookup failures: PO with UPC not in item master fails import. Fix: Create unknown-item queue; alert purchasing to add item; retry after master data update. [src1]
Partial shipment breaks 856 ASN: Translator generates 856 from PO quantities, not actual shipment. Fix: Map 856 to ERP shipment/delivery document, NOT the sales order. [src2]
Anti-Patterns
Wrong: Using Web EDI as Permanent Integration
Web EDI workflow (manual):
1. Log into retailer portal → view PO → re-key into ERP
2. Process order → manually create 856/810 in portal
Result: 15-30 min/order, 5-10% error rate, max ~20 orders/day
Correct: Automated EDI-to-ERP via VAN or AS2
Automated workflow:
1. 850 arrives via VAN → auto-maps to ERP → SO created (<5s)
2. Warehouse ships → 856 ASN auto-generated
3. AR invoice → 810 auto-generated
Result: <30s/order, <0.1% error rate, scales to thousands/day
Partner A (850 v4010) ──→ Canonical Format ──→ ERP native format
Partner B (850 v5010) ──→ (internal XML │ (IDoc/CSV/JSON)
Partner C (ORDERS) ──→ or JSON) │
Result: N partner maps + 1 canonical-to-ERP map
Wrong: Ignoring 997 Functional Acknowledgments
"We process 850s fine — 997s are just receipts."
Reality:
Walmart: missing 997 = compliance violation = chargeback
Target: 997 rejection rate > 5% = vendor scorecard demerit
Amazon Vendor Central: no 997 = PO treated as unacknowledged
Correct: Automated 997 with Monitoring
1. Auto-generate 997 for EVERY inbound document
2. Track SLA: must send within partner window (usually 24h)
3. Monitor inbound 997s for YOUR outbound documents
4. Alert on: rejection, timeout, error segments
5. Dashboard: 997 acceptance rate by partner (target: 99.5%+)
Common Pitfalls
Not testing with production-volume data: Test environments process 10-50 docs; production handles 10,000+/day. Fix: Run load tests with 2x expected peak before go-live. [src1]
Hardcoding partner logic in the ERP: Partner-specific EDI rules in ERP customizations become unmaintainable. Fix: Keep all partner-specific logic in EDI translator maps; ERP receives standardized format. [src3]
Ignoring ISA/GS envelope validation: Mismatched envelope data causes silent VAN routing failures. Fix: Validate ISA13 uniqueness and GS06 sequencing before transmission. [src2]
Not planning for partner map changes: Partners update EDI specs 1-2x/year. Fix: Subscribe to partner EDI update notifications; maintain version matrix; quarterly reviews. [src5]
Wrong VAN pricing model: Per-KC vs per-document vs flat-rate can differ 3-5x. Fix: Analyze 3 months of transaction data before selecting pricing tier; renegotiate annually. [src4]
Missing AS2 MDN mode mismatch: Sync vs async MDN mode must match partner config. Fix: Verify MDN mode with each AS2 partner during setup; test both send and receive flows. [src8]
Trading partners mandate EDI (retail, wholesale, automotive)
Partners offer modern API integration
REST API direct integration
Retailer scorecard compliance required
Only 1-2 partners, <10 tx/month
Email + manual processing
Processing >100 orders/day across multiple partners
Internal system-to-system only
iPaaS or native API
Automated order-to-cash cycle needed
Real-time sub-second integration
Direct API/webhook
Industry EDI compliance (HIPAA, AIAG)
Partner supports CSV/flat file only
SFTP file-based integration
Cross-System Comparison
Capability
SPS Commerce
TrueCommerce
Cleo CIC
OpenText TG
Setup Complexity
Low (managed)
Low-Medium
Medium-High
High (enterprise)
IT Staff Required
0.5 FTE
0.5-1 FTE
1-2 FTE
2+ FTE
Partner Onboarding
2-4 weeks
2-6 weeks
1-4 weeks
2-8 weeks
ERP Connectors
100+ pre-built
20+ pre-built
50+ pre-built
200+ pre-built
AS2 Native
No (via VAN)
No (via VAN)
Yes (primary)
Yes
API Integration
REST API
SFTP + API
REST + webhook
REST + MFT
AI/ML Features
MAX AI (2026)
Basic
AI mapping
Analytics
Global EDIFACT
Supported
Supported
Supported
Primary strength
Pricing Transparency
Published tiers
Quote-based
Quote-based
Enterprise contract
Best For
US retail mid-market
Multi-ERP, Sage/D365
Technical, AS2-heavy
Global enterprise
Annual Cost
$5K-$50K
$3K-$30K
$10K-$100K+
$50K-$500K+
Important Caveats
EDI translator pricing varies dramatically — SPS Commerce publishes tiers, but TrueCommerce, Cleo, and OpenText require custom quotes. Get quotes from 3+ providers.
"Full-service EDI" means different things — SPS includes map creation and onboarding; Cleo expects your team to build maps. Clarify scope before signing.
VAN transaction costs are declining as API alternatives grow, but VANs remain essential for partners that only support VAN-based EDI.
HIPAA-regulated EDI (healthcare 837/835) has additional compliance requirements not covered here.
For ERP-specific configuration (SAP IDoc, NetSuite SuiteCloud, D365 DMF), see the related system-specific cards.
AI-powered EDI mapping (SPS MAX, Cleo AI) is newly GA as of 2025-2026 — evaluate carefully as features are still maturing.