---
# === IDENTITY ===
id: business/erp-integration/warehouse-management-integration/2026
canonical_question: "How do you integrate ERP with WMS (Manhattan, Blue Yonder) and 3PL APIs?"
aliases:
  - "ERP to WMS integration patterns for warehouse fulfillment"
  - "How to connect SAP or Oracle ERP with Manhattan Active WM or Blue Yonder WMS"
  - "EDI 940 945 856 warehouse management integration with ERP"
  - "3PL API integration with ERP for order fulfillment"
entity_type: erp_integration
domain: business > erp-integration > warehouse management integration
region: global
jurisdiction: global
temporal_scope: 2024-2026

# === SYSTEM PROFILE ===
systems:
  - name: "Manhattan Active WM"
    vendor: "Manhattan Associates"
    version: "2025.x (cloud-native, versionless)"
    edition: "Enterprise"
    deployment: cloud
    api_surface: "REST"
  - name: "Blue Yonder WMS"
    vendor: "Blue Yonder (formerly JDA)"
    version: "2024.x"
    edition: "Enterprise"
    deployment: "cloud | on-premise"
    api_surface: "REST, EDI, MOCA"
  - name: "Oracle WMS Cloud"
    vendor: "Oracle"
    version: "24B"
    edition: "Cloud"
    deployment: cloud
    api_surface: "REST, XML"
  - name: "SAP EWM"
    vendor: "SAP"
    version: "S/4HANA 2023+"
    edition: "Embedded / Decentralized"
    deployment: "cloud | on-premise | hybrid"
    api_surface: "OData, IDoc, RFC/BAPI"
  - name: "ShipBob"
    vendor: "ShipBob"
    version: "API v1.0"
    edition: "All"
    deployment: cloud
    api_surface: "REST"
  - name: "ShipStation"
    vendor: "Auctane"
    version: "API v3"
    edition: "All"
    deployment: cloud
    api_surface: "REST"
  - name: "Flexport"
    vendor: "Flexport"
    version: "API 2025-03"
    edition: "All"
    deployment: cloud
    api_surface: "REST"

# === VERIFICATION ===
last_verified: 2026-03-03
confidence: 0.85
version: 1.0
first_published: 2026-03-03

# === TEMPORAL VALIDITY ===
temporal_validity:
  status: volatile
  last_breaking_change: "Manhattan Active WM moved to cloud-native versionless model (2023); Blue Yonder Luminate platform migration ongoing"
  next_review: 2026-08-30
  change_sensitivity: high

# === CONSTRAINTS ===
constraints:
  - "EDI 940/945 requires certified EDI translator (SPS Commerce, TrueCommerce) — cannot send raw EDI over HTTP"
  - "Manhattan Active WM REST APIs require OAuth 2.0 client credentials — API keys not supported"
  - "Oracle WMS Cloud REST API version must be specified in URI (v9+) — unversioned calls rejected"
  - "SAP EWM embedded edition shares S/4HANA database — no separate inventory sync needed, but decentralized EWM requires IDoc/RFC interface"
  - "3PL APIs (ShipBob, ShipStation) are tenant-scoped — one API key per merchant account, no cross-tenant queries"
  - "Inventory sync frequency must match ERP cycle count cadence — real-time WMS updates with daily ERP reconciliation causes phantom variances"
  - "Blue Yonder MOCA commands are not REST — require proprietary client or middleware translation layer"

# === SKIP CONDITIONS ===
skip_this_unit_if:
  - condition: "User needs only ERP-to-ERP inventory transfer (no external WMS)"
    use_instead: "business/erp-integration/inventory-management-integration/2026"
  - condition: "User needs transportation management (TMS) integration, not warehouse"
    use_instead: "business/erp-integration/transportation-management-integration/2026"
  - condition: "User needs e-commerce platform to 3PL integration without ERP"
    use_instead: "business/erp-integration/ecommerce-fulfillment-integration/2026"

# === AGENT HINTS ===
inputs_needed:
  - key: wms_system
    question: "Which WMS system are you integrating with?"
    type: choice
    options:
      - "Manhattan Active WM"
      - "Blue Yonder (JDA) WMS"
      - "Oracle WMS Cloud"
      - "SAP EWM (embedded or decentralized)"
      - "3PL API (ShipBob, ShipStation, Flexport)"
      - "Other / custom WMS"
  - key: integration_pattern
    question: "What integration pattern do you need?"
    type: choice
    options:
      - "real-time sync (individual records, <1s latency)"
      - "batch/bulk (scheduled, high volume)"
      - "event-driven (webhook, CDC, platform events)"
      - "file-based (EDI 940/945/856, CSV, XML)"
  - key: data_volume
    question: "What's your daily order volume?"
    type: choice
    options:
      - "< 500 orders/day"
      - "500-5,000 orders/day"
      - "5,000-50,000 orders/day"
      - "> 50,000 orders/day"
  - key: direction
    question: "What's the primary data flow?"
    type: choice
    options:
      - "ERP to WMS (order release, master data)"
      - "WMS to ERP (shipping confirmation, inventory updates)"
      - "bidirectional (full lifecycle)"

# === DISTRIBUTION ===
canonical_source: "https://knowledgelib.io/business/erp-integration/warehouse-management-integration/2026"
suggested_citation: "Source: knowledgelib.io — AI Knowledge Library (verified 2026-03-03)"

# === RELATED UNITS ===
related_kos:
  depends_on: []
  related_to:
    - id: "business/erp-integration/edi-integration-patterns/2026"
      label: "EDI Integration Patterns (940/945/856/810)"
    - id: "business/erp-integration/inventory-management-integration/2026"
      label: "ERP Inventory Management Integration"
  solves:
    - id: "business/erp-integration/order-to-cash-integration/2026"
      label: "Order-to-Cash Integration Playbook"
    - id: "business/erp-integration/supply-chain-visibility-integration/2026"
      label: "Supply Chain Visibility Integration"
  alternative_to:
    - id: "business/erp-integration/dropship-integration/2026"
      label: "Dropship Integration (vendor-direct, no warehouse)"
  often_confused_with:
    - id: "business/erp-integration/transportation-management-integration/2026"
      label: "TMS Integration (shipping vs warehousing)"

# === SOURCES ===
sources:
  - id: src1
    title: "Manhattan Active Warehouse Management — Solutions Overview"
    author: Manhattan Associates
    url: https://www.manh.com/solutions/supply-chain-management-software/warehouse-management
    type: official_docs
    published: 2025-06-01
    reliability: authoritative
  - id: src2
    title: "Blue Yonder WMS Implementation and Integration Services"
    author: Blue Yonder
    url: https://www.explorewms.com/jda-wms-software-profile.html
    type: technical_blog
    published: 2025-03-15
    reliability: high
  - id: src3
    title: "Oracle WMS Cloud Integration API Guide"
    author: Oracle
    url: https://docs.oracle.com/en/cloud/saas/warehouse-management/20d/owmap/wms-web-service-apis.html
    type: official_docs
    published: 2025-01-01
    reliability: authoritative
  - id: src4
    title: "EDI WMS Integration Explained: From Basic Setup to Advanced Operations"
    author: Commport Communications
    url: https://www.commport.com/edi-wms-integration/
    type: technical_blog
    published: 2025-04-10
    reliability: high
  - id: src5
    title: "Top Warehouse EDI Transactions and Best Practices"
    author: Logimax WMS
    url: https://www.logimaxwms.com/blog/warehouse-edi/
    type: technical_blog
    published: 2025-02-20
    reliability: moderate_high
  - id: src6
    title: "ShipBob Developer API Documentation"
    author: ShipBob
    url: https://developer.shipbob.com/
    type: official_docs
    published: 2025-06-01
    reliability: authoritative
  - id: src7
    title: "Best Practices for ERP and WMS Integration"
    author: TechTarget
    url: https://www.techtarget.com/searcherp/tip/Best-practices-for-ERP-and-WMS-integration
    type: industry_report
    published: 2025-05-01
    reliability: high
  - id: src8
    title: "Flexport Developer Portal — Supply Chain and Logistics APIs"
    author: Flexport
    url: https://developers.flexport.com/
    type: official_docs
    published: 2025-09-01
    reliability: authoritative
---

# ERP-to-WMS & 3PL Integration Playbook

## TL;DR

- **Bottom line**: ERP-to-WMS integration follows a standard lifecycle: order release (ERP->WMS) -> allocation -> pick/pack/ship -> shipping confirmation (WMS->ERP) -> inventory reconciliation. Use EDI 940/945 for traditional WMS, REST APIs for cloud-native WMS and 3PLs.
- **Key limit**: Inventory sync timing is the #1 failure point — real-time WMS updates with batch ERP reconciliation creates phantom variances that cascade into fulfillment errors.
- **Watch out for**: EDI 940 requires exact item master alignment between ERP and WMS — mismatched SKU mappings silently drop order lines.
- **Best for**: Organizations running dedicated WMS (Manhattan, Blue Yonder, Oracle WMS Cloud, SAP EWM) or outsourcing fulfillment to 3PLs (ShipBob, ShipStation, Flexport).
- **Authentication**: Manhattan/Oracle use OAuth 2.0; Blue Yonder uses MOCA sessions + API gateway tokens; 3PLs use API keys over HTTPS.

## System Profile

This integration playbook covers the end-to-end data flow between ERP systems and warehouse management systems (WMS) or third-party logistics (3PL) providers. It addresses both enterprise WMS platforms (Manhattan Active WM, Blue Yonder, Oracle WMS Cloud, SAP EWM) and cloud-based 3PL APIs (ShipBob, ShipStation, Flexport). The playbook applies regardless of which ERP system is the source — SAP S/4HANA, Oracle ERP Cloud, NetSuite, Microsoft Dynamics 365, or others.

Not covered: ERP-native warehouse modules (e.g., SAP WM legacy, Oracle Inventory Management) where no external system integration is needed. Also not covered: transportation management (TMS) integration, which handles carrier selection and freight rating after the WMS hands off the shipment. [src1, src7]

| System | Role | API Surface | Direction |
|---|---|---|---|
| ERP (SAP, Oracle, NetSuite, D365) | Order master, inventory financial ledger, item master | Varies by ERP | Outbound (orders) / Inbound (confirmations) |
| Manhattan Active WM | Cloud-native WMS — allocation, pick/pack/ship | REST API (OAuth 2.0) | Inbound (orders) / Outbound (shipments) |
| Blue Yonder WMS | Enterprise WMS — wave planning, labor mgmt | MOCA, REST, EDI | Inbound (orders) / Outbound (shipments) |
| Oracle WMS Cloud | Cloud WMS — receiving, putaway, fulfillment | REST API (XML/JSON) | Inbound (orders) / Outbound (shipments) |
| SAP EWM | SAP-native WMS — embedded or decentralized | OData, IDoc, RFC/BAPI | Bidirectional with S/4HANA |
| ShipBob / ShipStation / Flexport | 3PL fulfillment APIs | REST API (API key) | Inbound (orders) / Outbound (tracking) |
| Middleware (MuleSoft, Boomi, Celigo) | Integration orchestrator | N/A | Orchestrator |

## API Surfaces & Capabilities

| API Surface | Protocol | Best For | Auth Method | Real-time? | Bulk? | EDI Support |
|---|---|---|---|---|---|---|
| Manhattan Active WM REST | HTTPS/JSON | Order release, inventory queries, shipment confirmation | OAuth 2.0 client credentials | Yes | Limited (pagination) | No (separate EDI gateway) |
| Blue Yonder MOCA | Proprietary TCP | Direct WMS operations, wave management | Session-based | Yes | Yes | N/A |
| Blue Yonder Integration API | HTTPS/JSON | Modern integrations, event-driven | API gateway token | Yes | Yes | Via SPS Commerce |
| Oracle WMS Cloud REST | HTTPS/XML+JSON | Inbound/outbound shipments, inventory | OAuth 2.0 | Yes | Via file import | Via Oracle Integration Cloud |
| SAP EWM IDoc | RFC/ALE | High-volume batch order/confirmation exchange | SAP system auth | Near-real-time | Yes | Via SAP PI/PO |
| SAP EWM OData | HTTPS/JSON | Modern real-time queries, mobile apps | OAuth 2.0 / SAML | Yes | Limited | No |
| ShipBob REST API | HTTPS/JSON | Order creation, tracking, inventory levels | API key | Yes | Pagination (250/page) | No |
| ShipStation REST API | HTTPS/JSON | Order import, label generation, shipment tracking | API key (Basic auth) | Yes | Pagination (500/page) | No |
| Flexport REST API | HTTPS/JSON | Freight shipments, tracking milestones, documents | API key (Bearer) | Yes | Pagination | No |
| EDI 940/945/856 | AS2, SFTP, VAN | Traditional WMS without API, large retailers | VAN certificate | No (batch) | Yes | Native |

[src1, src2, src3, src6, src8]

## Rate Limits & Quotas

### Per-Request Limits

| Limit Type | Value | Applies To | Notes |
|---|---|---|---|
| Max records per page | 250 | ShipBob API | Use cursor-based pagination for full result sets |
| Max records per page | 500 | ShipStation API | Offset/limit pagination |
| Max request body size | 50 MB | Oracle WMS Cloud REST | Split larger XML payloads |
| Max IDoc batch size | 10,000 IDocs | SAP EWM (via PI/PO) | Larger batches cause qRFC queue congestion |
| Max concurrent REST calls | 5 per client | Manhattan Active WM | Queued beyond limit; 429 after 30s queue timeout |

[src3, src6]

### Rolling / Daily Limits

| Limit Type | Value | Window | System |
|---|---|---|---|
| API calls | 40 requests/second | Per second | ShipStation (sustained) |
| API calls | Fair use / throttled | Rolling | Manhattan Active WM (no published hard cap — enforced per tenant) |
| Bulk file imports | 5 concurrent jobs | Per tenant | Oracle WMS Cloud |
| IDoc throughput | ~50,000/hour | Sustained | SAP EWM (depends on app server sizing) |
| Webhook deliveries | 1,000/minute | Per merchant | ShipBob |

[src3, src6, src8]

## Authentication

| System | Flow | Token Lifetime | Refresh? | Notes |
|---|---|---|---|---|
| Manhattan Active WM | OAuth 2.0 client credentials | 1 hour | Yes (new token request) | Requires pre-registered client app in Manhattan admin |
| Blue Yonder WMS | MOCA session + API gateway token | Session-based (30 min idle timeout) | Re-authenticate | MOCA sessions are stateful — cannot load-balance across gateways |
| Oracle WMS Cloud | OAuth 2.0 | 1 hour | Yes | Uses Oracle Identity Cloud Service (IDCS) |
| SAP EWM | SAP system user + RFC trust | Persistent (session-based) | N/A | For OData: OAuth 2.0 via SAP BTP or on-prem gateway |
| ShipBob | API key (Bearer token) | Does not expire | N/A | One key per merchant channel; revoke/regenerate in dashboard |
| ShipStation | API key + secret (Basic auth) | Does not expire | N/A | Base64-encode key:secret as Authorization header |
| Flexport | API key (Bearer token) | Does not expire | N/A | Scoped per integration |

[src1, src3, src6, src8]

### Authentication Gotchas

- Manhattan Active WM OAuth tokens are tenant-scoped — if you have multiple warehouses on different tenants, you need separate credentials per tenant. [src1]
- Blue Yonder MOCA sessions are stateful and server-affinity is required — placing a load balancer in front of MOCA endpoints without sticky sessions causes silent data corruption. [src2]
- ShipBob API keys are channel-scoped — a single merchant with multiple sales channels (DTC, wholesale) needs separate keys and separate order routing logic. [src6]

## Constraints
<!-- Agents: read this section before recommending any integration approach from this unit.
     These are hard constraints that must not be violated. -->

- EDI 940/945 cannot be sent directly via HTTP POST — requires a certified EDI translator (SPS Commerce, TrueCommerce, Cleo) or VAN (value-added network) to handle envelope, segment, and element formatting. [src4]
- Manhattan Active WM does not support EDI natively — EDI must be translated to REST API calls via middleware or integration platform. [src1]
- SAP EWM embedded edition (within S/4HANA) does not require separate integration — it shares the same database. Only decentralized EWM (separate system) requires IDoc/RFC interfaces. [src3]
- Oracle WMS Cloud REST API requires version prefix in every URI (e.g., /wms/api/v9/...) — omitting the version returns 404, not a default version. [src3]
- 3PL APIs do not support partial shipments natively in most cases — split shipments require creating multiple fulfillment orders at the API level with line-item allocation logic in middleware. [src6]
- Inventory quantity types differ across systems: WMS tracks on-hand, allocated, picked, damaged, quarantined; ERP typically only consumes available and on-hand. Field mapping must explicitly handle these quantity types or variance investigations become impossible. [src7]
- Blue Yonder MOCA is not HTTP-compatible — you cannot call MOCA commands from standard REST clients. Requires MOCA Java client, Blue Yonder Integration Server, or a middleware translation layer. [src2]

## Integration Pattern Decision Tree

```
START — ERP-to-WMS/3PL Integration
├── What WMS/3PL system?
│   ├── Manhattan Active WM → REST API (OAuth 2.0)
│   ├── Blue Yonder WMS → MOCA (legacy) or Integration API (modern)
│   ├── Oracle WMS Cloud → REST API (XML/JSON)
│   ├── SAP EWM Embedded → No external integration needed (shared DB)
│   ├── SAP EWM Decentralized → IDoc (batch) or OData (real-time)
│   ├── 3PL (ShipBob/ShipStation/Flexport) → REST API
│   └── Legacy/custom WMS → EDI 940/945 via VAN
├── What's the integration pattern?
│   ├── Real-time order release (<1 min latency)
│   │   ├── < 500 orders/day → Direct REST API calls, synchronous
│   │   ├── 500-5,000 orders/day → Event-driven (ERP publishes, middleware routes to WMS)
│   │   └── > 5,000 orders/day → Message queue (Kafka, RabbitMQ) + async workers
│   ├── Batch order release (scheduled waves)
│   │   ├── EDI 940 via VAN → Hourly/daily batch files
│   │   ├── File-based (CSV/XML) → SFTP drop folder with WMS file watcher
│   │   └── IDoc batch (SAP EWM) → Scheduled ALE distribution
│   └── Hybrid (real-time order + batch inventory)
│       └── Most common pattern → Real-time order release + nightly inventory reconciliation
├── Which data flows?
│   ├── ERP → WMS: Sales order release, purchase order receipt, transfer orders, item master
│   ├── WMS → ERP: Ship confirm, ASN (856), inventory adjustments, receipt confirmation
│   └── Bidirectional: Inventory levels (real-time WMS, periodic ERP reconciliation)
└── Error tolerance?
    ├── Zero-loss (financial/regulatory) → Idempotent APIs + dead letter queue + reconciliation job
    └── Best-effort (non-critical updates) → Retry with exponential backoff, alert on 3+ failures
```

## Quick Reference

### Integration Lifecycle — Order-to-Ship Process Flow

| Step | Source | Action | Target | Data Objects | EDI Equivalent | Failure Handling |
|---|---|---|---|---|---|---|
| 1 | ERP | Release sales order to WMS | WMS | Order header, lines, ship-to address, priority | EDI 940 (Warehouse Shipping Order) | Retry 3x, then DLQ + alert |
| 2 | WMS | Receive order, validate inventory | WMS (internal) | Allocation records | N/A | Reject back to ERP with reason code |
| 3 | WMS | Wave planning + task assignment | WMS (internal) | Wave ID, pick tasks, labor assignments | N/A | Re-wave on failure |
| 4 | WMS | Pick, pack, generate shipping label | WMS + carrier | Carton contents, tracking number, weight | N/A | Manual intervention queue |
| 5 | WMS | Ship confirmation to ERP | ERP | Shipment ID, tracking #, shipped qty, carrier, ship date | EDI 945 (Warehouse Shipping Advice) | Retry 3x, then manual reconciliation |
| 6 | WMS/Carrier | ASN to customer/retailer | Customer/Retailer | Carton details, PO ref, SSCC-18, ship date, carrier | EDI 856 (Advance Ship Notice) | Resend; retailer chargebacks if late |
| 7 | ERP | Post goods issue, update inventory, create invoice | ERP (internal) | Inventory movement, billing document | EDI 810 (Invoice) | Reprocess from ship confirm |
| 8 | Both | Nightly inventory reconciliation | ERP + WMS | On-hand quantities by location, lot, serial | EDI 846 (Inventory Inquiry/Advice) | Variance report + cycle count trigger |

[src4, src5, src7]

## Step-by-Step Integration Guide

### 1. Establish connectivity and authenticate

Set up authenticated connections to both ERP and WMS systems. For middleware-based integrations (recommended for production), configure connection profiles in your iPaaS. [src1, src3]

```bash
# Manhattan Active WM — OAuth 2.0 token request
curl -X POST https://{tenant}.manh.com/oauth/token \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "grant_type=client_credentials&client_id={CLIENT_ID}&client_secret={CLIENT_SECRET}&scope=wm-api"

# Oracle WMS Cloud — OAuth 2.0 token request
curl -X POST https://idcs-{tenant}.identity.oraclecloud.com/oauth2/v1/token \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -u "{CLIENT_ID}:{CLIENT_SECRET}" \
  -d "grant_type=client_credentials&scope=urn:opc:wms:api"

# ShipBob — API key authentication (no token exchange needed)
curl -X GET https://api.shipbob.com/1.0/order \
  -H "Authorization: Bearer {SHIPBOB_API_KEY}" \
  -H "shipbob_channel_id: {CHANNEL_ID}"
```

**Verify**: Successful token/response with HTTP 200 and valid JSON body.

### 2. Sync item master data (prerequisite)

Before any order flow, ensure item master (SKU) data is synchronized between ERP and WMS. This is the most common root cause of integration failures. [src7]

```json
// Item master sync payload — ERP to WMS
{
  "sku": "WIDGET-001",
  "description": "Blue Widget 10-pack",
  "upc": "012345678901",
  "weight": 2.5,
  "weight_uom": "LB",
  "dimensions": { "length": 12, "width": 8, "height": 6, "uom": "IN" },
  "lot_tracked": true,
  "serial_tracked": false,
  "hazmat": false,
  "storage_class": "AMBIENT",
  "erp_item_id": "MAT-100042"
}
```

**Verify**: Query WMS for the item by SKU — confirm all fields match ERP source.

### 3. Release orders from ERP to WMS

Push sales orders (or transfer orders) from ERP to WMS for fulfillment. This is the core outbound flow. [src1, src4]

```json
// Order release payload — ERP to Manhattan Active WM (REST)
{
  "orderNumber": "SO-2026-00142",
  "orderType": "SALES",
  "priority": 2,
  "requestedShipDate": "2026-03-05",
  "shipTo": {
    "name": "Jane Smith",
    "address1": "123 Main St",
    "city": "Austin",
    "state": "TX",
    "postalCode": "78701",
    "country": "US"
  },
  "carrier": "FEDEX",
  "serviceLevel": "GROUND",
  "lines": [
    {
      "lineNumber": 1,
      "sku": "WIDGET-001",
      "quantity": 10,
      "uom": "EA",
      "lotNumber": null
    }
  ]
}
```

```
; EDI 940 equivalent (simplified segment view)
ST*940*0001~
W05*N*SO-2026-00142**SALES~
N1*ST*Jane Smith~
N3*123 Main St~
N4*Austin*TX*78701*US~
W66*CC*FEDX*FG~
LX*1~
W01*10*EA*VN*WIDGET-001~
SE*9*0001~
```

**Verify**: WMS returns HTTP 201 (REST) or functional acknowledgment 997 (EDI). Order appears in WMS work queue.

### 4. Receive shipping confirmation from WMS

After pick/pack/ship, WMS sends shipment details back to ERP. This triggers goods issue posting and invoice creation. [src4, src5]

```json
// Ship confirmation — WMS to ERP (webhook or poll)
{
  "orderNumber": "SO-2026-00142",
  "shipmentId": "SHP-88901",
  "shippedDate": "2026-03-04T14:30:00Z",
  "carrier": "FedEx",
  "trackingNumber": "794644790132",
  "weight": 25.5,
  "weightUom": "LB",
  "lines": [
    {
      "lineNumber": 1,
      "sku": "WIDGET-001",
      "shippedQuantity": 10,
      "lotNumber": "LOT-2026-A1",
      "serialNumbers": []
    }
  ],
  "packages": [
    {
      "packageId": "PKG-001",
      "sscc18": "00100123456789012345",
      "trackingNumber": "794644790132",
      "weight": 25.5,
      "dimensions": { "length": 14, "width": 10, "height": 8 }
    }
  ]
}
```

**Verify**: ERP shows shipment posted, inventory decremented, and tracking number stored on sales order.

### 5. Implement inventory reconciliation

Run nightly or periodic inventory reconciliation between WMS and ERP to catch drift. This is the safety net — real-time sync handles 99% of updates, reconciliation catches the rest. [src7]

```sql
-- Reconciliation query: find variances between WMS and ERP
SELECT
  w.sku,
  w.location_id,
  w.on_hand_qty AS wms_qty,
  e.on_hand_qty AS erp_qty,
  (w.on_hand_qty - e.on_hand_qty) AS variance,
  CASE
    WHEN ABS(w.on_hand_qty - e.on_hand_qty) > 0 THEN 'INVESTIGATE'
    ELSE 'OK'
  END AS status
FROM wms_inventory w
LEFT JOIN erp_inventory e ON w.sku = e.sku AND w.warehouse_id = e.warehouse_id
WHERE ABS(w.on_hand_qty - e.on_hand_qty) > 0
ORDER BY ABS(variance) DESC;
```

**Verify**: Variance report shows zero or known-exception rows only. Any unexplained variance triggers a cycle count.

### 6. Configure ASN (EDI 856) for retail fulfillment

If shipping to retailers (Walmart, Amazon, Target), generate ASN with SSCC-18 barcodes. Late or missing ASNs trigger chargebacks ($50-$500 per occurrence). [src4, src5]

```
; EDI 856 — Advance Ship Notice (simplified)
ST*856*0001~
BSN*00*SHP-88901*20260304*1430*0001~
HL*1**S~
TD1*CTN*1****G*25.5*LB~
TD5**2*FEDX*FG~
REF*CN*794644790132~
DTM*011*20260304~
N1*ST*Jane Smith~
N3*123 Main St~
N4*Austin*TX*78701*US~
HL*2*1*O~
PRF*PO-2026-00142~
HL*3*2*P~
MAN*GM*00100123456789012345~
HL*4*3*I~
LIN*1*VN*WIDGET-001*UP*012345678901~
SN1*1*10*EA~
SE*17*0001~
```

**Verify**: Retailer EDI system returns 997 functional acknowledgment within SLA (typically 4 hours).

## Code Examples

### Python: Order release to ShipBob 3PL

```python
# Input:  Sales order from ERP (order_number, items, ship_to)
# Output: ShipBob order ID and estimated fulfillment date

import requests  # requests==2.31.0

SHIPBOB_API_KEY = "your_api_key"
CHANNEL_ID = "your_channel_id"
BASE_URL = "https://api.shipbob.com/1.0"

headers = {
    "Authorization": f"Bearer {SHIPBOB_API_KEY}",
    "Content-Type": "application/json",
    "shipbob_channel_id": CHANNEL_ID
}

order_payload = {
    "reference_id": "SO-2026-00142",  # ERP order number
    "order_number": "SO-2026-00142",
    "type": "DTC",
    "shipping_method": "Standard",
    "recipient": {
        "name": "Jane Smith",
        "address": {
            "address1": "123 Main St",
            "city": "Austin",
            "state": "TX",
            "zip_code": "78701",
            "country": "US"
        }
    },
    "products": [
        {
            "reference_id": "WIDGET-001",
            "quantity": 10
        }
    ]
}

resp = requests.post(f"{BASE_URL}/order", json=order_payload, headers=headers)
resp.raise_for_status()
result = resp.json()
print(f"ShipBob Order ID: {result['id']}, Status: {result['status']}")
```

### JavaScript/Node.js: Poll ShipStation for shipment updates

```javascript
// Input:  Date range for shipped orders
// Output: Array of shipment objects with tracking numbers

const axios = require('axios'); // axios@1.7.0

const SHIPSTATION_KEY = 'your_api_key';
const SHIPSTATION_SECRET = 'your_api_secret';
const BASE_URL = 'https://ssapi.shipstation.com';

const auth = Buffer.from(`${SHIPSTATION_KEY}:${SHIPSTATION_SECRET}`).toString('base64');

async function getShipments(shipDateStart, shipDateEnd) {
  const params = new URLSearchParams({
    shipDateStart,
    shipDateEnd,
    pageSize: 500,
    page: 1
  });

  const shipments = [];
  let hasMore = true;

  while (hasMore) {
    const resp = await axios.get(`${BASE_URL}/shipments?${params}`, {
      headers: { Authorization: `Basic ${auth}` }
    });
    shipments.push(...resp.data.shipments);
    hasMore = resp.data.pages > parseInt(params.get('page'));
    params.set('page', parseInt(params.get('page')) + 1);
  }

  return shipments.map(s => ({
    orderNumber: s.orderNumber,
    trackingNumber: s.trackingNumber,
    carrier: s.carrierCode,
    shippedDate: s.shipDate,
    items: s.shipmentItems
  }));
}

// Usage: sync shipped orders back to ERP
getShipments('2026-03-01', '2026-03-03').then(shipments => {
  console.log(`Found ${shipments.length} shipments to sync back to ERP`);
});
```

### cURL: Query Manhattan Active WM inventory

```bash
# Input:  OAuth token, warehouse ID, SKU
# Output: Inventory levels by location

# Step 1: Get access token
TOKEN=$(curl -s -X POST https://{tenant}.manh.com/oauth/token \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "grant_type=client_credentials&client_id={ID}&client_secret={SECRET}&scope=wm-api" \
  | jq -r '.access_token')

# Step 2: Query inventory for specific SKU
curl -s -X GET "https://{tenant}.manh.com/api/wm/inventory?sku=WIDGET-001&warehouseId=DC01" \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Accept: application/json" | jq '.inventory[] | {sku, location, onHand, allocated, available}'

# Expected response shape:
# { "sku": "WIDGET-001", "location": "A-01-01", "onHand": 500, "allocated": 42, "available": 458 }
```

## Data Mapping

### Field Mapping Reference — ERP to WMS Order Release

| ERP Field | WMS Field (Manhattan) | WMS Field (Blue Yonder) | 3PL Field (ShipBob) | Type | Gotcha |
|---|---|---|---|---|---|
| Sales Order Number | orderNumber | ordnum | reference_id | String | ShipBob requires unique per channel; Manhattan allows duplicates across order types |
| Ship-to Address Line 1 | shipTo.address1 | adrln1 | recipient.address.address1 | String | Blue Yonder has 40-char limit on address lines; truncation causes delivery failures |
| Requested Ship Date | requestedShipDate | expdte | N/A (auto-calculated) | Date | Format differs: Manhattan uses ISO 8601, Blue Yonder uses YYYYMMDD, ShipBob infers from shipping method |
| Item SKU | lines[].sku | ordlin.prtnum | products[].reference_id | String | Must match exactly — no fuzzy matching. Mismatched SKUs silently drop the order line |
| Ordered Quantity | lines[].quantity | ordlin.ordqty | products[].quantity | Integer | Blue Yonder stores in base UOM only — conversion happens at receipt |
| Lot Number | lines[].lotNumber | ordlin.lotnum | N/A | String | ShipBob does not support lot-level order allocation — FIFO only |
| Carrier Code | carrier | carcod | shipping_method | String | Carrier codes are not standardized across systems — maintain a mapping table |
| Priority | priority (1-5) | pckpri (01-99) | N/A | Integer | Scale differs dramatically: Manhattan 1=highest, Blue Yonder 01=highest but 99 values |
| Weight | N/A (calculated by WMS) | N/A (calculated by WMS) | N/A | Decimal | WMS calculates from item master; ERP weight is informational only |
| Unit of Measure | lines[].uom | ordlin.uom | N/A (always EA) | String | ShipBob API only accepts each (EA); case/pallet must be converted before API call |

[src1, src2, src6]

### Data Type Gotchas

- Date format inconsistency is universal: ERP may send ISO 8601 (2026-03-04T14:30:00Z), WMS may expect YYYYMMDD (20260304), and EDI uses CCYYMMDD without separators. Always normalize in middleware. [src4]
- Quantity decimals: WMS systems typically use integer quantities for piece-level operations but ERP may send decimal for weight-based items. Truncation vs. rounding must be explicitly configured. [src7]
- Address encoding: International addresses in ERP may use UTF-8 (accented characters, CJK), but EDI 940 is limited to ASCII. Middleware must transliterate or the VAN will reject the transmission. [src4]
- Currency codes: If ERP sends order value for customs declarations, WMS and 3PL APIs expect ISO 4217 codes (USD, EUR) but some EDI implementations use numeric codes (840, 978). [src5]
- SSCC-18 barcodes: The check digit algorithm (Mod 10) must be calculated by the WMS or middleware — ERPs typically do not generate SSCC-18. Sending an invalid check digit causes retailer ASN rejection. [src5]

## Error Handling & Failure Points

### Common Error Codes

| Code | System | Meaning | Cause | Resolution |
|---|---|---|---|---|
| 429 | Manhattan / ShipBob | Rate limit exceeded | Too many API calls in window | Exponential backoff: wait 2^n seconds, max 5 retries |
| 404 | Oracle WMS Cloud | Endpoint not found | Missing API version prefix in URI (e.g., /v9/) | Prepend version to all API paths |
| 400 / INVALID_SKU | WMS (any) | Item not found in WMS | SKU not synced to WMS item master | Sync item master before releasing orders |
| 422 | ShipBob | Unprocessable entity | Invalid address, missing required field | Validate address and required fields pre-submission |
| IDOC_ERROR | SAP EWM | IDoc processing failure | Data mapping error, missing partner profile | Check IDoc status in WE02/WE05; fix mapping in WE20 |
| 997-R | EDI (any) | Functional acknowledgment rejected | Invalid segment structure, missing required elements | Review 997 AK5 segment for specific error codes |
| 500 | Any REST | Internal server error | System-side failure | Retry with backoff; escalate after 3 failures |

[src3, src4, src6]

### Failure Points in Production

- **Item master drift**: WMS and ERP item masters diverge over time — new items added to ERP but not synced to WMS. Orders with unknown SKUs sit in exception queues for hours. Fix: `Automated item master sync job that runs before every order release wave, with alerts on sync failures`. [src7]
- **Partial shipment mismatch**: WMS ships 8 of 10 units but ERP expects all-or-nothing fulfillment. Ship confirmation creates orphaned open quantities. Fix: `Configure ERP to accept partial shipments; implement backorder line creation from WMS short-ship notifications`. [src1]
- **EDI 856 timing**: ASN must be transmitted within retailer SLA (typically 30 min to 4 hours after ship). Late ASN triggers chargeback ($50-$500). Fix: `Trigger 856 generation immediately on carrier manifest close, not on batch schedule`. [src4, src5]
- **Inventory snapshot timing**: WMS sends inventory at 11:59 PM but ERP processes at 12:01 AM next day. Orders placed between snapshot and processing see stale inventory. Fix: `Use event-driven inventory updates for available-to-promise; reserve batch reconciliation for audit only`. [src7]
- **Carrier code mapping failure**: ERP sends "FEDEX_GROUND" but WMS expects "FG" or "FEDX". Order sits in mapping exception queue. Fix: `Maintain a carrier code crosswalk table in middleware; alert on unmapped codes`. [src1]
- **Webhook delivery failures (3PL)**: ShipBob/ShipStation webhook endpoints go down; shipment notifications lost. Fix: `Implement polling as fallback — poll every 15 min for shipments updated in last 30 min; deduplicate by shipment ID`. [src6]

## Anti-Patterns

### Wrong: Polling WMS for order status every minute

```python
# BAD — polling creates unnecessary load and still has up to 60s latency
while True:
    orders = wms_api.get_orders(status="shipped")
    for order in orders:
        erp.update_shipment(order)
    time.sleep(60)
```

### Correct: Use webhooks or event-driven notifications

```python
# GOOD — WMS pushes ship confirmations as they happen; zero latency
@app.route('/webhook/wms/shipment', methods=['POST'])
def handle_shipment_webhook():
    payload = request.json
    # Idempotency check — prevent duplicate processing
    if db.shipment_processed(payload['shipmentId']):
        return jsonify({"status": "duplicate"}), 200
    erp.post_goods_issue(payload)
    db.mark_shipment_processed(payload['shipmentId'])
    return jsonify({"status": "ok"}), 200
```

### Wrong: Sending orders to WMS without validating item master

```javascript
// BAD — orders with unknown SKUs silently fail or sit in exception queues
async function releaseOrder(order) {
  await wmsApi.post('/orders', order);  // Hope for the best
}
```

### Correct: Pre-validate all SKUs against WMS item master before release

```javascript
// GOOD — catch missing items before they cause fulfillment delays
async function releaseOrder(order) {
  const wmsCatalog = await wmsApi.get('/items?skus=' + order.lines.map(l => l.sku).join(','));
  const wmsSkus = new Set(wmsCatalog.data.map(i => i.sku));
  const missing = order.lines.filter(l => !wmsSkus.has(l.sku));
  if (missing.length > 0) {
    await alertOps(`Missing SKUs in WMS: ${missing.map(l => l.sku).join(', ')}`);
    await syncItemMaster(missing.map(l => l.sku));  // Auto-sync missing items
  }
  await wmsApi.post('/orders', order);
}
```

### Wrong: Using real-time inventory sync as single source of truth

```python
# BAD — real-time sync has eventual consistency gaps; inventory drifts silently
def get_available_inventory(sku):
    return wms_api.get_inventory(sku)['available']  # Trust WMS blindly
```

### Correct: Real-time for operations, nightly reconciliation for accuracy

```python
# GOOD — use WMS for real-time ATP, but reconcile nightly to catch drift
def get_available_inventory(sku):
    wms_qty = wms_api.get_inventory(sku)['available']
    return wms_qty  # Use for real-time operations

# Nightly reconciliation job
def reconcile_inventory():
    wms_snapshot = wms_api.get_full_inventory_snapshot()
    erp_snapshot = erp_api.get_inventory_by_warehouse()
    variances = find_variances(wms_snapshot, erp_snapshot)
    if variances:
        create_cycle_count_request(variances)  # Trigger physical count
        alert_inventory_team(variances)
```

## Common Pitfalls

- **Master data sync order matters**: Loading orders before items causes mass failures. Always sync in this order: (1) warehouses/locations, (2) items/SKUs, (3) customers/ship-to addresses, (4) orders. Fix: `Build dependency-ordered sync pipeline with pre-flight validation`. [src7]
- **UOM conversion failures**: ERP sends cases (CS), WMS operates in eaches (EA). If case-to-each conversion factor is wrong or missing, WMS picks wrong quantity. Fix: `Maintain UOM conversion table in middleware with mandatory validation on every order line`. [src1]
- **Timezone mismatches in SLA calculation**: ERP uses UTC, WMS uses warehouse local time, retailer expects EST. Ship-by-date calculations can be off by up to a day. Fix: `Normalize all dates to UTC in transit; convert to local only at display layer`. [src7]
- **Over-relying on EDI batch schedules**: Running EDI 940 transmission on hourly batch means orders can wait up to 59 minutes before WMS sees them. For same-day shipping, this kills cutoff times. Fix: `Trigger EDI transmission on order creation event (micro-batch) or switch to real-time API for time-sensitive orders`. [src4]
- **Ignoring WMS capacity constraints**: Releasing 10,000 orders at once overwhelms WMS wave planning. Pick productivity drops 40% due to congestion. Fix: `Implement throttled order release — feed orders to WMS at a rate the warehouse can process (e.g., 500/hour based on pick rate)`. [src1]
- **Not testing with realistic volumes**: Integration works with 10 orders in QA but collapses at 5,000 orders in production. Fix: `Load-test with 2x expected peak volume before go-live. Test failure paths, not just happy paths`. [src7]

## Diagnostic Commands

```bash
# Check ShipBob API connectivity and rate limit status
curl -s -o /dev/null -w "%{http_code}" \
  -H "Authorization: Bearer {API_KEY}" \
  -H "shipbob_channel_id: {CHANNEL_ID}" \
  https://api.shipbob.com/1.0/product?limit=1

# Check ShipStation API connectivity
curl -s -o /dev/null -w "%{http_code}" \
  -H "Authorization: Basic {BASE64_KEY_SECRET}" \
  https://ssapi.shipstation.com/orders?pageSize=1

# Test Manhattan Active WM OAuth token
curl -s -X POST https://{tenant}.manh.com/oauth/token \
  -d "grant_type=client_credentials&client_id={ID}&client_secret={SECRET}" \
  | jq '{access_token: .access_token[:20], expires_in: .expires_in}'

# Check Oracle WMS Cloud API version
curl -s https://{instance}.wms.ocs.oraclecloud.com/wms/api/v9/health \
  -H "Authorization: Bearer {TOKEN}" | jq '.version'

# SAP EWM — check IDoc status (via SAP GUI or RFC)
# Transaction WE02: filter by message type WMMBXY, date range, partner
# Transaction SM58: check tRFC/qRFC queue for stuck IDocs

# Verify EDI 940 transmission via SPS Commerce
# Log into SPS Commerce Fulfillment portal → Transactions → filter by Document Type 940
# Check for 997 acknowledgment status: Accepted (A) vs Rejected (R)

# Inventory variance check — compare WMS and ERP counts
# Run reconciliation query from Step 5 above
# Any variance > 0 needs investigation before next order wave
```

## Version History & Compatibility

| System | Current Version | Previous Major | Breaking Changes | Notes |
|---|---|---|---|---|
| Manhattan Active WM | Cloud-native (versionless) | Pre-2023 (on-prem) | REST API replaced legacy SOAP; MOCA commands still available | On-prem to cloud migration requires full API rewrite |
| Blue Yonder WMS | 2024.x | 2022.x (JDA) | Integration API replaces some MOCA interfaces | MOCA still required for advanced operations |
| Oracle WMS Cloud | 24B (REST v9+) | 21C (v9 initial) | XML payloads now optional; JSON supported | Version prefix required in all URIs |
| SAP EWM | S/4HANA 2023+ | ECC 6.0 EWM | Embedded EWM removes need for RFC integration | Decentralized EWM still uses IDoc/RFC |
| ShipBob API | v1.0 | N/A (first version) | Webhook engine added 2025; returns API updated | No breaking changes to date |
| ShipStation API | v3 | v2 | Pagination changed; rate limits tightened | v2 deprecated, sunset date TBD |
| Flexport API | 2025-03 | 2023-10 | Products and Parcels API additions | Version specified in URL path |
| EDI 940/945/856 | X12 008010 | X12 005010 | Minimal — backward compatible | Most trading partners still on 005010 |

[src1, src2, src3, src6, src8]

### Deprecation Policy

Manhattan Active WM is versionless cloud-native — no deprecation; APIs evolve with backward compatibility commitments. Blue Yonder provides 18-month migration windows for major interface changes. Oracle follows quarterly release cycles (A/B/C/D per year) with minimum 12-month backward compatibility. SAP EWM IDocs have long-term stability but new S/4HANA versions may change segment structures. 3PL APIs (ShipBob, ShipStation, Flexport) version via URL paths with 12-month minimum deprecation notice. [src1, src3, src6, src8]

## When to Use / When Not to Use

| Use When | Don't Use When | Use Instead |
|---|---|---|
| You have a dedicated WMS (Manhattan, Blue Yonder, Oracle WMS Cloud, SAP EWM) separate from your ERP | ERP has built-in warehouse module that meets your needs | ERP-native warehouse configuration (no integration needed) |
| You outsource fulfillment to a 3PL (ShipBob, ShipStation, Flexport) | You operate your own warehouse with ERP-native WMS | ERP-native warehouse module setup |
| You ship to retailers requiring EDI 856 ASN compliance | You only sell direct-to-consumer with no retailer requirements | Simple shipping label integration |
| Daily order volume exceeds 500 orders or you have complex warehouse operations (multi-zone, wave picking, cross-docking) | Fewer than 100 orders/day with simple pick-pack-ship | Manual fulfillment or ERP-native shipping |
| You need real-time inventory visibility across multiple warehouses or 3PL locations | Single warehouse, single system | ERP inventory management |
| You need lot tracking, serial number management, or hazmat compliance in fulfillment | Simple consumer goods with no tracking requirements | Basic 3PL integration without lot/serial |

## Cross-System Comparison

| Capability | Manhattan Active WM | Blue Yonder WMS | Oracle WMS Cloud | SAP EWM | ShipBob (3PL) | ShipStation (3PL) |
|---|---|---|---|---|---|---|
| API Style | REST (JSON) | MOCA + REST | REST (XML/JSON) | OData + IDoc + RFC | REST (JSON) | REST (JSON) |
| Auth Model | OAuth 2.0 | MOCA session + gateway token | OAuth 2.0 (IDCS) | SAP system + OAuth 2.0 | API key (Bearer) | API key (Basic) |
| Real-time Order Release | Yes (REST) | Yes (MOCA/Integration API) | Yes (REST) | Yes (OData/qRFC) | Yes (REST) | Yes (REST) |
| Batch Order Release | Via middleware | Yes (file import, EDI) | Yes (file import) | Yes (IDoc batch) | No (real-time only) | Yes (CSV import) |
| EDI 940/945 Native | No (middleware required) | Yes (via SPS Commerce) | Yes (via Oracle IC) | Yes (via SAP PI/PO) | No | No |
| Webhook Support | Yes (configurable events) | Limited | Limited | No (use polling or IDoc) | Yes (built-in dashboard) | Yes (configurable) |
| Inventory Query API | Yes | Yes (MOCA) | Yes | Yes (OData) | Yes (per SKU) | No (order-level only) |
| Lot/Serial Tracking | Full | Full | Full | Full | No | No |
| Multi-warehouse | Yes (built-in) | Yes | Yes | Yes | Yes (network routing) | No (single account) |
| Deployment Complexity | Low (cloud-native) | High (on-prem or hybrid) | Medium (cloud) | High (S/4HANA dependency) | Low (SaaS) | Low (SaaS) |

[src1, src2, src3, src6]

## Important Caveats

- WMS API capabilities and rate limits vary by edition and licensing tier — the values in this card represent enterprise/standard editions. Confirm limits with your specific vendor contract.
- EDI 940/945/856 transaction set implementations vary by trading partner — each retailer (Walmart, Amazon, Target) has their own implementation guide with specific segment requirements beyond the X12 standard.
- 3PL API capabilities are evolving rapidly — ShipBob and ShipStation release updates frequently. Always check the developer portal for the latest endpoints and breaking changes.
- SAP EWM embedded vs. decentralized architecture fundamentally changes the integration pattern. Embedded EWM shares the S/4HANA database (no integration needed for core data); decentralized EWM is a separate system requiring full IDoc/RFC integration.
- Carrier code mappings, service level mappings, and UOM conversion tables are organization-specific — no universal standard exists. Budget 20-30% of integration effort for mapping table creation and maintenance.
- This card covers the technical integration patterns. Warehouse operational design (slotting, wave planning, labor management) is outside scope and handled by WMS implementation consultants.

## Related Units

- [EDI Integration Patterns (940/945/856/810)](/business/erp-integration/edi-integration-patterns/2026)
- [ERP Inventory Management Integration](/business/erp-integration/inventory-management-integration/2026)
- [Order-to-Cash Integration Playbook](/business/erp-integration/order-to-cash-integration/2026)
- [Supply Chain Visibility Integration](/business/erp-integration/supply-chain-visibility-integration/2026)
- [TMS Integration (often confused — shipping vs warehousing)](/business/erp-integration/transportation-management-integration/2026)
