EDI Integration with ERP: SPS Commerce, TrueCommerce, Cleo & OpenText

Type: ERP Integration System: SPS Commerce, TrueCommerce, Cleo CIC, OpenText Trading Grid Confidence: 0.86 Sources: 8 Verified: 2026-03-03 Freshness: 2026-03-03

TL;DR

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.

SystemRoleAPI SurfaceDirection
Any ERP (SAP, Oracle, NetSuite, D365, Epicor)Business system of recordNative API / flat file / IDocInbound + Outbound
SPS CommerceManaged EDI VAN / embedded ERP connectorVAN + pre-built ERP mapsOrchestrator
TrueCommerceEDI VAN / API / SFTP connectorVAN + SFTP + APIOrchestrator
Cleo Integration CloudEDI translator / AS2 gatewayAS2 + API + SFTP + VANOrchestrator
OpenText Trading GridEnterprise B2B integration / MFTVAN + AS2 + MFT + APIOrchestrator
Trading PartnersExternal buyers/sellersX12 / EDIFACT over VAN or AS2Counterparty

API Surfaces & Capabilities

EDI integration has four distinct transport and integration surfaces. Each serves different partner volumes and technical maturity levels.

Integration SurfaceProtocolBest ForSetup TimePer-Tx CostIT OverheadScalability
VAN (Value Added Network)Proprietary mailboxBroad partner networks (100+)1-2 weeks$0.05-$0.25/txLowExcellent
AS2 (Direct)HTTPS + S/MIMEHigh-volume bilateral (>10K tx/mo)4-8 weeks/partnerNear-zero (fixed)HighGood per partner
API (REST/Webhook)HTTPS/JSONModern partners, real-time2-4 weeksNear-zeroMediumExcellent
Web EDI PortalHTTPS (browser)Low-volume small suppliers1-3 daysIncludedNonePoor (manual)

Rate Limits & Quotas

EDI Document Processing Limits

Limit TypeSPS CommerceTrueCommerceCleo CICOpenText TG
Documents/dayUnlimited (plan-based)Unlimited (plan-based)Unlimited (license)Unlimited (contract)
Partner connectionsPlan-dependent (25-unlimited)Plan-dependentLicense-dependentContract-dependent
Document size10 MB per interchange5 MB default (configurable)50 MB per document80 MB per file (MFT)
Acknowledgment SLA997 within 24h997 within 24hConfigurableConfigurable
Onboarding time2-4 weeks/partner2-6 weeks/partner1-4 weeks/partner2-8 weeks/partner

VAN Transaction Cost Structure

Volume TierVAN CostAS2 EquivalentBreakeven
< 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 fixedAlready at breakeven
> 50,000 tx/month$0.01-$0.05/tx ($500+/mo)~$1,500/mo fixedAS2 wins significantly

Authentication

MethodUsed ByMechanismCertificate Required?Notes
X.509 Digital CertificatesAS2 direct connectionsMutual TLS + S/MIMEYes (both parties)Certificates expire every 1-2 years
VAN Account CredentialsSPS, TrueCommerce, OpenTextUsername/password or API keyNoVAN handles partner security
OAuth 2.0Cleo CIC API, SPS APIClient credentials flowNoERP-to-translator API integration
SFTP Key-BasedTrueCommerce, CleoSSH key pairSSH keysFile-based EDI exchange with ERP

Authentication Gotchas

Constraints

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

StepEDI DocumentX12 CodeEDIFACTDirectionERP TransactionTrigger
1Purchase Order850ORDERSBuyer → SellerCreate Sales OrderBuyer procurement
2PO Acknowledgment855ORDRSPSeller → BuyerSO confirmationSO created in ERP
3Advance Ship Notice856DESADVSeller → BuyerShipment/deliveryGoods shipped
4Invoice810INVOICSeller → BuyerAR InvoiceShipment confirmed
5Functional Ack997CONTRLReceiver → Sender(system-level)Any EDI received
6Remittance Advice820REMADVBuyer → SellerAP paymentPayment processed
7Inventory Advice846INVRPTSeller → BuyerInventory snapshotScheduled
8Forecast830DELFORBuyer → SellerDemand planningForecast cycle

EDI Platform Comparison

CapabilitySPS CommerceTrueCommerceCleo CICOpenText TG
Primary ModelManaged VAN + embedded ERPVAN + API + SFTPAS2/API/SFTP + VANEnterprise VAN + AS2 + MFT
Pre-built ERP Maps100+ ERPs20+ ERPs50+ ERPs200+ connectors
Partner Network115,000+92,000+Variable1,000,000+
X12 / EDIFACTFull / FullFull / FullFull / FullFull / Full
AS2 NativeNo (via VAN)No (via VAN)Yes (primary)Yes
AI FeaturesMAX AI (2026)Basic analyticsAI mapping (2025)Analytics + MFT
PricingPer-connection + tx feesTiered subscriptionLicense + per-connectionEnterprise contract
Best ForUS retail mid-marketMulti-ERP, Sage/D365Technical, AS2-heavyGlobal 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.

4. Implement 997 Functional Acknowledgment Processing

997s confirm receipt and syntactic validity of EDI documents. They do NOT confirm business acceptance. [src2]

997 processing flow:
  1. Receive EDI document (e.g., 850)
  2. EDI translator validates syntax
  3. If valid → 997 with AK9 "A" (Accepted)
  4. If errors → 997 with AK9 "R" (Rejected) + error codes
  5. Return 997 within SLA (typically 24h)

5. Set Up Error Monitoring and Alerting

EDI failures are silent by default — without monitoring, failed transactions go unnoticed until a compliance violation is issued. [src1, src5]

Monitoring checklist:
  [ ] 997 rejection alerts
  [ ] Missing 997 alerts (no ack within SLA)
  [ ] Document stuck in queue (> 4 hours)
  [ ] Partner connectivity down
  [ ] ERP import failures
  [ ] Compliance scorecard (weekly ASN/invoice on-time rates)

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 FieldX12 Segment*ElementEDIFACTTransformGotcha
PO NumberBEG*03BGM+220DirectMax 22 chars in X12
PO DateBEG*05DTM+137YYYYMMDDStrip time component
Ship-To NameN1*ST*02NAD+STDirectMax 60 chars; truncate
Ship-To AddressN3*01NAD+ST:streetDirectTwo N3 segments max
Ship-To City/State/ZipN4*01/02/03NAD+STDirectInternational postal codes may exceed 15 chars
UPCPO1*07 (UP)LIN+UPDirectMust be 12-digit GTIN
Vendor SKUPO1*09 (VP)LIN+SADirectVaries by partner
QuantityPO1*02QTY+21IntegerSome partners reject decimals
Unit PricePO1*04PRI+AAADecimal (2-4 places)No currency symbol
Carrier CodeTD5*03TDT+20SCAC lookupMust use SCAC code

Data Type Gotchas

Error Handling & Failure Points

Common EDI Error Codes

SourceCodeMeaningCauseResolution
997AK304-1Unrecognized segment IDSegment not in partner specReview partner EDI guide; remove/rename segment
997AK304-3Mandatory segment missingRequired segment omittedAdd missing segment to mapping
997AK403-1Mandatory element missingRequired data blank in ERPFix ERP data quality; add pre-validation
997AK403-4Data element too longField exceeds max lengthTruncate to spec length
997AK403-7Invalid code valueCode not in partner listMap ERP code to partner code list
AS2MDN-errorDecryption/signature failCertificate mismatch/expiryExchange updated certificates
VANENVELOPE_ERRORISA/GS validation failedControl numbers out of sequenceReset control number sequence
ERPIMPORT_FAILERP rejected documentMissing customer/item in master dataFix master data; add pre-validation

Failure Points in Production

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

Wrong: Building Custom Point-to-Point EDI Parsers

parse_walmart_850()   # 500 lines
parse_target_850()    # 400 lines
parse_costco_850()    # 350 lines
# N partners = N parsers = N^2 maintenance burden

Correct: Canonical Mapping Through EDI Translator

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

Diagnostic Commands

# Check VAN mailbox for pending documents (SPS Commerce API)
curl -s "https://api.spscommerce.com/transactions/v2/pending" \
  -H "Authorization: Bearer $SPS_TOKEN" | jq '.transactions | length'

# Test AS2 partner certificate validity
openssl s_client -connect partner.example.com:443 \
  -servername partner.example.com < /dev/null 2>/dev/null \
  | openssl x509 -noout -dates

# Validate X12 document segment count
grep -c "~" outbound_document.edi

# Check ISA control number uniqueness
grep "^ISA" transmission_log.txt | awk -F'*' '{print $14}' | sort | uniq -d

# Check 997 rejection status
curl -s "https://api.spscommerce.com/transactions/v2/acks?status=rejected" \
  -H "Authorization: Bearer $SPS_TOKEN" | jq '.acks[]'

Version History & Compatibility

Standard/PlatformVersionStatusKey ChangesNotes
ANSI X124010Widely supported--Most common in US retail
ANSI X125010Current standardHIPAA alignmentRequired for healthcare
ANSI X128030EmergingJSON/XML hybridLimited adoption
UN/EDIFACTD.96A-D.22ACurrentAnnual releasesEuropean/global standard
SPS Commerce2026CurrentMAX AI featuresLargest US retail network
TrueCommerce2026CurrentEnhanced APIMulti-ERP cloud
Cleo CIC2026CurrentAI mapping GAHybrid AS2/API/VAN
OpenText TG2025Current200+ connectors1M+ partners globally

When to Use / When Not to Use

Use WhenDon't Use WhenUse Instead
Trading partners mandate EDI (retail, wholesale, automotive)Partners offer modern API integrationREST API direct integration
Retailer scorecard compliance requiredOnly 1-2 partners, <10 tx/monthEmail + manual processing
Processing >100 orders/day across multiple partnersInternal system-to-system onlyiPaaS or native API
Automated order-to-cash cycle neededReal-time sub-second integrationDirect API/webhook
Industry EDI compliance (HIPAA, AIAG)Partner supports CSV/flat file onlySFTP file-based integration

Cross-System Comparison

CapabilitySPS CommerceTrueCommerceCleo CICOpenText TG
Setup ComplexityLow (managed)Low-MediumMedium-HighHigh (enterprise)
IT Staff Required0.5 FTE0.5-1 FTE1-2 FTE2+ FTE
Partner Onboarding2-4 weeks2-6 weeks1-4 weeks2-8 weeks
ERP Connectors100+ pre-built20+ pre-built50+ pre-built200+ pre-built
AS2 NativeNo (via VAN)No (via VAN)Yes (primary)Yes
API IntegrationREST APISFTP + APIREST + webhookREST + MFT
AI/ML FeaturesMAX AI (2026)BasicAI mappingAnalytics
Global EDIFACTSupportedSupportedSupportedPrimary strength
Pricing TransparencyPublished tiersQuote-basedQuote-basedEnterprise contract
Best ForUS retail mid-marketMulti-ERP, Sage/D365Technical, AS2-heavyGlobal enterprise
Annual Cost$5K-$50K$3K-$30K$10K-$100K+$50K-$500K+

Important Caveats

Related Units