Qeasy Cloud
Get Started

Sales Return Sync from WMS to Kingdee Cloud: A Single-Strategy Implementation Guide

· 高金凤· Integration Solutions· 13 views· 4 min read
WDTKingdee Cloud销售退货单同步轻易云供应链集成单一策略

What This Strategy Solves (Scenario & Value)

In a retailer's supply chain, the front-end commerce/store system handles order intake, fulfillment, and return registration, while the back-end finance/supply chain system owns formal documents, inventory, and accounting. Return documents must flow from front-end back to back-end before inventory can be adjusted and books can be closed.

In one real engagement, we used Qeasy (the data integration platform) to push return documents from the WMS return-management module into Kingdee Cloud as sales return orders. The value: each side focuses on its own job — business vs. accounting — while the platform owns transformation and retries, preventing the interface sprawl you get from point-to-point coupling.

Data Flow & Field Mapping (Source → Middle Layer → Target)

The flow is unidirectional: WMS (source) → Qeasy middle layer (cleaning, mapping, assembly) → Kingdee Cloud (target).

The middle layer does not persist business data; it only does structured transformation and code mapping. Header and line items are written in stages — a critical design we'll revisit.

Reference field mapping (based on common business conventions; actual fields are driven by the customer's master data):

Business MeaningWMS (Source)Qeasy Middle LayerKingdee Cloud (Target)
Document No.Return order no.Normalized to unified formatBill No.
Customer codeStore/member codeMapping tableCustomer code
Warehouse codeWarehouse IDWarehouse mappingReturn warehouse
Material codeSKU codeMaterial/SKU mappingMaterial code
Return qtyQuantityType & precision unifiedActual return qty
Price/amountRefund amountPrecision & currency unifiedUnit price/tax-included amount
Return reasonRemark/reasonEnumeration mappingReturn reason
Document dateBusiness dateTimezone unifiedBusiness date

Configuring It in Qeasy

In Qeasy, a single sync strategy is composed of three segments: source read, transform, and target write.

Source read: Use the WMS return-management return orders as the data source. Pull incrementally with "modified_time > last_sync_time" to avoid a full scan on every run.

Transform layer: Code mappings (material, customer, warehouse) are maintained centrally in Qeasy's mapping tables. This is one of the common patterns among Qeasy customers — maintain once, reference everywhere, so that when the coding rule changes you only update a single place. Header and line items are processed in stages: write the header first to obtain the Kingdee document inner ID, then use that ID to write line items, avoiding dangling foreign keys.

Target write: Call Kingdee Cloud's sales return order save interface (header) plus line-item write interface, composing a complete document. Failed requests go to a retry queue rather than blocking subsequent documents.

Implementation Steps

We break the rollout into three phases and proceed steadily:

Phase 1 — Calibrate the incremental starting point In Qeasy, manually specify a starting timestamp (e.g., "last 7 days" or a clear point in time) as the boundary for the first incremental pull. This becomes the baseline for subsequent reconciliation and must not be skipped.

Phase 2 — Trigger the full backfill (optional) If the customer already has a large volume of historical return documents, run a one-time full backfill to push them all into Kingdee; then switch to incremental for ongoing changes. A typical pattern here is "incremental + full on parallel tracks" — full runs as a one-shot task, while daily scheduling runs incrementally.

Phase 3 — Scheduling frequency Return documents don't need minute-level real-time like sales orders, but they aren't a T+1 job either. We recommend pulling every 10–15 minutes: timely enough for inventory adjustment on the Kingdee side, light enough not to pressure either system. Configure this via crontab in Qeasy; failed tasks enter a compensation queue.

Pitfalls & Lessons Learned

Pitfall 1: Copying the WMS "refund amount" directly into Kingdee as "return amount". The source "refund amount" is the actual paid amount including shipping; the target expects the line-level return amount. The middle layer must recompute at the line level — do not shortcut by moving the whole document.

Pitfall 2: Customer/material code mappings scattered across strategies. We've seen customers maintain a separate mapping table per strategy, so changing one code requires touching N strategies. The robust approach is centralized mapping management in Qeasy — all strategies sharing the same coding source.

Pitfall 3: Writing header and line items in one call. Kingdee sales return orders need the inner document ID before line items can be attached. If you combine the calls, line foreign keys are empty or must be patched afterwards — both painful to debug. Writing in stages is the safer path.

Pitfall 4: Incremental starting-point drift. If the source system's time or timezone is not unified, the incremental condition will skip or duplicate records. Define an explicit unified timezone (UTC or CST) in Qeasy and validate against source records.

Pitfall 5: Failed tasks silently piling up. If document write failures don't enter a clearly visible queue, you may not notice until days later — by which point it's already a mess. Configure alert thresholds on Qeasy's compensation queue rather than relying only on totals.

When This Applies — And When It Doesn't

Applies: When return documents are initiated by a front-end business system and need to be formally booked and inventory-adjusted by a back-end finance/supply chain system, and the two sides don't share fully consistent code systems, requiring centralized mapping.

Does not apply: Bi-directional sync scenarios (where returns need to flow from source to target AND target-side edits flow back) should be split into two separate strategies. Also, scenarios requiring minute-level real-time inventory adjustment may need more frequent scheduling than the 10–15 minute interval used here.

Original content. Please credit the source when reposting: https://www.qeasy.cloud/insights/solutions/strat-wdt-kingdee-cloud-3207-ok-6eae1f51

Comments