WMS Transfer-Out → Kingdee Cloud Direct Transfer Order: A Single-Strategy Sync Walkthrough
What This Strategy Solves
In retail chains or distribution networks, the warehouse execution system (WMS) handles outbound operations, while finance/ERP handles inter-org transfer accounting and book inventory. If both sides enter documents independently, the books will diverge within three months: wrong transfer direction, wrong org type, or duplicate receipts. We use the Qeasy Data Integration Platform to run a single strategy: WMS transfer-out → Kingdee direct transfer order, polled every 5 minutes, so the two sides converge.
Data Flow and Field Mapping
The pipeline is one-way: WMS (source) → Qeasy middle layer → Kingdee Cloud (target). The source pulls transfer-out orders via wdt.stockout.order.query (order_type=2, status 110 completed); the target writes via batchSave. Key fields:
| Meaning | Source (WMS) | Middle Layer | Target (Kingdee) |
|---|---|---|---|
| Bill No. | order_no | passthrough | FBillNo |
| Bill Type | — | constant | FBillTypeID = ZJDB01_SYS |
| Biz Type | — | constant | FBizType = NORMAL |
| Transfer Direction | — | constant | FTransferDirect = GENERAL |
| Transfer Biz Type | warehouse_no | branched expression | FTransferBizType |
| Lines | goods detail | header/lines split | FEntity detail rows |
FTransferBizType is the most error-prone. Different warehouses mean different transfer semantics (intra-org vs cross-org); one wrong row and the entire bill will be rejected.
Configuring in Qeasy
Step 1: Create two platform connectors in Qeasy for WMS and Kingdee. Credentials stay in Qeasy's connection manager, never hard-coded in scripts.
Step 2: Register both APIs: source wdt.stockout.order.query (QUERY/POST, order_no as number and id, idCheck on), target batchSave (EXECUTE/POST).
Step 3: Build field mappings. Constants (FBillTypeID, FBizType, FTransferDirect) are direct values. For warehouse-to-biz-type, use a Qeasy expression that branches on warehouse_no and returns InnerOrgTransfer or OverOrgTransfer. This is the "centralized encoding mapping" pattern Qeasy customers adopt — adding a warehouse means editing one place.
Step 4: Turn on Qeasy's "header-then-lines" staged write: write the header first, validate FBillNo uniqueness, then push FEntity rows. A failure leaves no half-bill behind.
Implementation Steps
- Incremental anchor: use
{{LAST_SYNC_TIME|datetime}}as start and{{CURRENT_TIME|datetime}}as end. On first launch, rewind the start by 7 days for a historical backfill. - Full trigger: kick off a manual full backfill in Qeasy with throttling (50/page, 200 ms gap) to avoid overloading the target.
- Schedule: source
*/5 7-22 * * *(every 5 minutes, business hours); target*/10 7-22 * * *(the target must never run denser than the source). - Resume: Qeasy records
LAST_SYNC_TIMEautomatically; restarts pick up from the last checkpoint, no manual patching needed.
Pitfalls We Have Hit
- Status numbers hide semantics.
status=110is "completed", but missing95 shippedmakes in-transit transfers vanish. Always enumerate statuses explicitly. order_type=2is transfer-out. Mis-mapping it as purchase return-out (3) routes the bill into the wrong downstream flow with no easy rollback.- Exhaustively branch transfer type. A new warehouse falls through to
OverOrgTransfer; the bill posts, but accounting is wrong. Keep a whitelist in Qeasy's dictionary table and route misses to the exception queue. - Target schedule must not exceed source. Otherwise the Qeasy executor spins empty and pollutes alerting.
- Keep
idCheck=true. Without it, Qeasy marks a duplicate push as success when Kingdee returns "already exists".
When It Fits and When It Does Not
Use it when a single- or multi-org retail/distribution network executes transfers in the WMS and needs matching book entries in the ERP. Do not use it for pure intra-warehouse moves (the WMS already closes the loop) or for cross-legal-entity transfers that require invoicing and AR/AP — those need a combined transfer + receivable/payable strategy.