Sales Outbound Delivery Sync from WMS to Kingdee: End-to-End Tutorial of One Strategy
What This Strategy Solves
In retail and distribution, e-commerce warehouses generate large volumes of sales outbound deliveries every day. These documents must flow back into the ERP's sales outbound module to drive invoicing, cost accounting, and accounts receivable. Without integration between the warehouse system and the ERP, finance teams rely on manual export, which inevitably leads to inconsistent interpretations, missing entries, and duplicates. This article focuses on a single strategy: pushing sales outbound deliveries from a WMS into Kingdee Cosmos. On-site, we use the Qeasy data integration platform as the middle layer to unify extraction, transformation, loading, and retry handling.
Data Flow and Field Mapping
The overall flow is WMS (source) → Qeasy middle layer → Kingdee Cosmos (target). The data is transmitted in a standard header-plus-lines structure.
Key field mapping (excerpt; real projects include more):
| Business Meaning | Source (WMS) | Target (Kingdee) | Handling Notes |
|---|---|---|---|
| Document Number | order_no | FBillNo | Deduplicate in middle layer when source has repeats |
| Outbound Time | consign_time | FDate | Normalize to UTC+8 before writing |
| Customer Code | shop_id | FCustomerID | Resolve via customer master mapping |
| Warehouse Code | warehouse_no | FStockID | Warehouse master must go live before this strategy |
| SKU Code | spec_no | FMaterialID | Material sync must complete first |
| Actual Quantity | actual_num | FRealQty | Keep 4 decimal places for qty and price |
| Total Amount (tax incl.) | total_amount | FAllAmount | Tax-included amount, write to amount field directly |
Note: This table shows core fields only. Production deployments include batch, inventory UoM, tax organization, etc. Always keep field mappings centralized in Qeasy's "Code Mapping" module instead of scattered across scripts.
How to Configure on Qeasy
In the Qeasy console, this strategy becomes a single "integration flow". We typically build it in four steps:
- Source Adapter: Use the WMS outbound delivery query interface. The incremental condition is
consign_time >= last_sync_time. Qeasy stores the access token in its key vault, so field consumers never see secrets. - Data Cleansing: Split the document into header and lines, each processed in its own branch. Headers go through customer/warehouse/date cleansing; lines go through SKU/quantity/price cleansing. We recommend Qeasy's "header-and-lines staged" mode — write the header first, then commit lines by row number in batches so failures can be traced to a specific line.
- Target Adapter: Use Kingdee Cosmos's sales outbound save interface. Default parameters like organization, currency, and price type are maintained centrally in Qeasy.
- Exception Handling: Enable "retry + alert + local log". Qeasy's failure queue supports manual compensation or automatic replay, which is critical at high volumes.
A common pattern we apply on-site is: centralized code mapping + staged header/lines + dual-track incremental and full sync. The first two save projects when issues arise; the third supports initial backfill and reconciliation.
Implementation Steps
We split the go-live into three phases, each with a different schedule:
- Phase 1: Incremental Start Point
Manually trigger a one-time full backfill by document number in Qeasy to establish a baseline; then switch to an incremental schedule of
*/10 * * * *(every 10 minutes) usingconsign_timeas the incremental key. This phase validates mapping correctness. - Phase 2: Full Sync Trigger Schedule a full reconciliation during low-traffic periods (typically early morning). Qeasy's dual-track mode automatically compares document numbers on both sides; differences are written to a diff table for finance and warehouse teams to handle the next day.
- Phase 3: Steady-State Schedule
Incremental
*/5 * * * *every 5 minutes; full sync once a day in the early morning. All schedules live in Qeasy's task plan, and failure alerts are pushed to the enterprise IM.
Lessons Learned
- Pitfall 1: Master data not live before this strategy. When FCustomerID/FStockID/FMaterialID cannot be resolved, the target rejects the document. The safe approach is to first run material, supplier, customer, and warehouse master syncs, then use a dependency mechanism so the sales outbound strategy starts only after masters are ready.
- Pitfall 2: Wrong incremental key. Initially we used
update_time, and cancelled documents (state changes) leaked in. Switching toconsign_timefiltered them out naturally. - Pitfall 3: Time zone and date boundary. Warehouse time is local; ERP expects a business date in
00:00:00form. Cross-midnight documents must land on the correct business date. This is the most common pitfall — normalize by business date in the middle layer. - Pitfall 4: Duplicate documents. When the source network jitters, Qeasy retries can trigger duplicate writes. Enable unique-document-number validation on Kingdee's save interface as the last line of defense.
- Pitfall 5: Failure queue buildup at high volume. During peak events, volume can be 8x normal; without throttling, the failure queue can overwhelm the target. Configure "max N docs per batch + batch interval" in Qeasy to smooth the traffic.
When to Use and When Not to Use
- Use when: E-commerce retail or distribution with warehouse-first, ERP-second architecture; daily volumes from thousands to tens of thousands; master data (materials, customers, warehouses) already in place.
- Do not use when: Strictly real-time (<1 minute) per-document ERP writes are required; master data has not been established; or manufacturing scenarios requiring complex batch/serial-level inventory reconciliation, which this strategy does not cover.