A step-by-step guide to understanding, diagnosing, and fixing EDI errors across any platform.
1. Introduction: Why EDI Errors Happen (And Why It’s Completely Normal)
Working with EDI means working with many moving parts:
multiple systems, multiple standards, multiple partners, and multiple rules.
Errors aren’t failures — they’re signals showing you where two systems don’t align yet.
This guide breaks down errors in a way that makes them simple to understand, even if you’re just starting out.
No jargon. No assumptions. Just clear explanations and a step-by-step approach that works everywhere.
2. The Three Layers Where EDI Errors Occur
Almost every issue lands in one of these three places:
Layer 1: Transport Layer
AS2, SFTP, VAN, API
→ Problems passing the file from one system to another.
Layer 2: Message Structure Layer
EDIFACT, X12, TRADACOMS
→ Problems with the layout, segments, loops, or element formats.
Layer 3: ERP/Application Layer
D365, SAP, Oracle, Sage, NetSuite
→ Problems matching the EDI data with internal business rules.
Once you understand these layers, troubleshooting becomes much more predictable.
3. Layer 1 – Transport Errors (Delivery Issues)
These errors happen before your integration platform even processes the file.
3.1 Connection Failures
Symptoms:
- “Connection timed out”
- “Host unreachable”
- “Failed to connect”
What it means:
Your system can’t reach the partner’s AS2/SFTP/VAN endpoint.
How to fix:
- Confirm the correct URL
- Check firewall settings
- Verify port configuration
- Ensure you’re using the correct Test/Prod setup
3.2 Certificate Issues
Symptoms:
- “Signature validation failed”
- “Certificate expired”
- “Decryption failed”
What it means:
The certificates used for signing or encryption don’t match.
How to fix:
- Import the partner’s latest certificate
- Make sure your private key matches your shared public key
- Rotate certificates before expiry
- Don’t mix Test and Production certificates
3.3 MDN Problems
Symptoms:
- No MDN returned
- “Unexpected MDN response”
- “Pending MDN”
What it means:
Your system sent the file but didn’t receive the delivery confirmation.
How to fix:
- Check MDN mode (synchronous vs asynchronous)
- Confirm partner’s AS2 endpoint is reachable
- Validate signature and encryption settings
- Ensure envelope rules match both sides
3.4 Encoding or Compression Mismatches
Symptoms:
- “Invalid content type”
- “Unsupported encoding”
How to fix:
- Align encoding settings (UTF-8 or ASCII)
- Ensure both sides use or disable compression consistently
4. Layer 2 – EDI Message Structure Errors (Format Issues)
The file reached your system, but the structure doesn’t match the expected EDI standard.
4.1 Missing or Unexpected Segments
Symptoms:
- “Segment UNH missing”
- “Unexpected NAD segment”
- “Invalid segment order”
Cause:
Partner changed the file layout or your map expects a specific structure.
How to fix:
- Compare message against the latest implementation guide
- Identify segment differences
- Update schema and mapping rules
4.2 Invalid Data Elements
Symptoms:
- “Invalid data type”
- “Element too long”
- “Wrong number format”
Examples:
- Partner sends date as
08-11-2025instead of20251108 - SKU contains special characters
- Quantity has decimals when not allowed
4.3 Loop and Repetition Errors
Symptoms:
- “Too many repetitions of segment LIN”
- “Unexpected group count”
Cause:
Partner sends more items or nested loops than your schema allows.
Fix:
- Review loop definitions
- Update map to handle variable line items
- Align the implementation guide with the actual file
5. Layer 3 – ERP/Application Errors (Business Rules)
The file is structurally valid but your ERP system rejects it due to business logic.
5.1 Item/SKU Not Found
Symptoms:
- “Item code does not exist”
- “Product not recognised”
Fix:
- Check item master data
- Confirm SKU mapping rules
- Add missing cross-references
5.2 Customer/Vendor Not Found
Symptoms:
- “Unknown customer number”
- “Invalid account code”
Fix:
- Align customer identifiers
- Update trading partner configuration
- Add partner mapping in ERP
5.3 UOM (Unit of Measure) Conflicts
Symptoms:
- “Invalid unit code”
- “UOM not supported”
Examples:
- Partner sends “EA”, ERP expects “Each”
- Partner sends “BX”, ERP only accepts “Box”
Fix:
- Normalise UOMs in integration
- Map external codes to internal ones
5.4 Pricing, VAT, or Currency Errors
Symptoms:
- “Invalid currency”
- “Unknown VAT code”
- “Invalid price format”
Fix:
- Verify tax rules
- Add currency mapping
- Align price formats (decimal places, separators)
5.5 Delivery or Scheduling Issues
Symptoms:
- “Invalid delivery date”
- “Past dates not allowed”
Fix:
- Adjust date formats (often DD/MM vs YYYY-MM-DD)
- Validate lead times and schedules
6. A Clear Step-by-Step Troubleshooting Flow
This is the sequence many professionals use when analysing EDI issues:
Step 1: Start with the transport layer
Did the file arrive?
- Check AS2 logs
- Check SFTP folder
- Check VAN mailbox
If not → stop here. It’s a connectivity or certificate problem.
Step 2: Validate EDI structure
Open the file and check:
- Are required segments present?
- Are loops in the right order?
- Are field formats consistent?
If structure fails → fix the schema or mapping.
Step 3: Review the mapping
Follow the field flow logically:
From the EDI segments → into your internal XML/JSON → into ERP payload.
Step 4: Confirm ERP validation
Check ERP logs for:
- Missing master data
- Incorrect codes
- Invalid dates
- Pricing issues
Step 5: Reprocess and retest
Once corrected, retry the file end-to-end.
7. Quick Error Categories You Can Use in Documentation
Transport Layer Errors
- Certificate mismatches
- AS2 MDN failures
- Missing files
- Connection timeouts
EDI Structure Errors
- Missing mandatory segments
- Wrong data formats
- Loop repetition errors
ERP/Application Errors
- Invalid customer or item codes
- Incorrect pricing
- Invalid UOM or dates

