Qeasy Cloud
Get Started

Wangdiantong Stock-In Transfer → Kingdee Cloud Direct Transfer Order: Single-Strategy Sync in Practice

· 高金凤· Integration Solutions· 20 views· 4 min read
WDTKingdee Cloud库存调拨单策略轻易云供应链集成

What This Strategy Solves (Scenario and Value)

In multi-org, multi-warehouse retail or manufacturing companies, transfers happen constantly between stores and warehouses. The source system uses Wangdiantong to manage front-end inbound and outbound operations, while the target system uses Kingdee Cloud to record direct transfer orders as the basis for financial and inventory accounting. Both sides "have data," but if code and organization mappings are not aligned, the inventory ledger stops matching within three months. This strategy focuses on one thing only: pulling transfer stock-in orders from Wangdiantong that have reached the settlement state, on a scheduled incremental basis, and landing them as direct transfer orders in Kingdee Cloud, so that the books match reality on both sides.

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

The overall direction is Wangdiantong Enterprise Qimen → Qeasy Data Integration Platform → Kingdee Cloud. The source side calls wdt.stockin.order.query to pull stock-in orders, and the target side calls batchSave to write direct transfer orders.

Key field mapping (source → target):

Business MeaningSource (Wangdiantong)Target (Kingdee Cloud)Conversion Notes
Document No.order_noFBillNoPassed through directly, used as the idempotency key
Document Type—FBillTypeIDFixed value ZJDB01_SYS
Business Type—FBizTypeFixed value NORMAL
Transfer Direction—FTransferDirectFixed value GENERAL
Transfer Typewarehouse_noFTransferBizTypeBranched by warehouse number; intra-org uses InnerOrgTransfer, otherwise OverOrgTransfer
Warehousewarehouse_noSales / In / Out OrgConverted via the code mapping table
Item CodeskuFMaterialIdConverted via the material mapping table
Quantityline numFQtyPassed through directly

The code mapping is the most valuable part of this strategy. The three mapping tables for material, warehouse, and organization should be managed centrally in Qeasy rather than scattered across multiple scripts.

How to Configure in Qeasy

In the Qeasy Data Integration Platform, this strategy is broken into three parts:

  1. Source collector: Use the built-in Wangdiantong adapter; select the API wdt.stockin.order.query with method POST. The start_time / end_time parameters use the platform variables {{LAST_SYNC_TIME|datetime}} and {{CURRENT_TIME|datetime}}, which naturally form the incremental window. Leave status empty to use the default value, which represents completed stock-in orders.
  2. Field mapping and transformation: In the Qeasy "Field Mapping" canvas, use "Constant" nodes for header fields (document number, document type, business type, transfer direction) to assign fixed values directly. For FTransferBizType, use a "Function" node to write a case when expression that branches by warehouse number to determine the transfer type. Line-level material, warehouse, and organization fields use "Lookup Mapping" nodes that reference a single code mapping table maintained in Qeasy.
  3. Target writer: Use the Kingdee Cloud adapter with API batchSave and method POST. The transformed JSON is pushed directly, and the platform handles pagination and retry on failure.

Two common patterns in Qeasy — "centralized code mapping management" and "staged header and body processing" — both apply here: headers land first, then the body is written in batches, avoiding half-written documents being rolled back.

Implementation Steps

Three steps for a stable rollout:

  1. Incremental start point: In the Qeasy scheduling parameters, initialize LAST_SYNC_TIME to a clear historical time point (for example, midnight on the first of the month). Run one or two empty rounds first to observe the data volume returned from the source, and confirm that order_no has no duplicates or missing entries.
  2. Full backfill trigger: Before the first formal go-live, manually trigger a one-time full backfill to push historical data into Kingdee in a single time window. Once the backfill completes, the platform automatically advances LAST_SYNC_TIME to the current time, and from then on it runs in pure incremental mode.
  3. Scheduling cadence: The Wangdiantong source-side polling is recommended at */5 * * * * (every 5 minutes), and the Kingdee target-side write is recommended at */10 * * * * (every 10 minutes). The source side runs slightly more often to leave buffer for the "pull → map → write" pipeline; the write side should not be pushed too hard, to avoid rate limiting on the Kingdee interface. This "source every 5 minutes / target every 10 minutes" dual-track rhythm is the most common configuration among Qeasy's retail customers.

Lessons Learned

  1. Hard-coding the transfer type is a trap: FTransferBizType should not be hard-coded to InnerOrgTransfer for convenience. In one real project, the customer opened a new inter-org transfer warehouse, but the code was hard-coded, which caused incorrect document types in Kingdee and brought the monthly closing to a halt. The safe approach is to branch by warehouse_no.
  2. Do not pass the status field carelessly: Among Wangdiantong's stock-in order statuses, only settlement-completed orders should be pushed to Kingdee, so leaving status at the default (80) is fine. If statuses like "editing" or "pending review" are passed by mistake, you end up in an awkward situation where Kingdee has the document but the warehouse side withdraws it.
  3. The incremental time window needs a fallback: When the source returns empty, never advance LAST_SYNC_TIME to the current time; otherwise, if the source clock drifts, an entire window can be lost. In Qeasy, it is recommended to enable the "empty response rollback" switch to preserve the previous time point.
  4. The code mapping table must be bidirectionally queryable: Material and warehouse mappings should not only support source→target lookup. When troubleshooting reconciliation issues, you often need to look up the source from the target side. In Qeasy, this can be solved by configuring a single view, and it should not be added only after a problem occurs.
  5. The idempotency key must remain stable: order_no must not be trimmed or restructured before being written to Kingdee; any modification will cause duplicate writes. If duplicates appear in Kingdee, first check whether order_no has been altered.

Applicable and Non-Applicable Scenarios

Applicable: Multi-org, multi-warehouse retail and manufacturing companies with frequent transfers, where Wangdiantong serves as the front end and Kingdee Cloud as the back end for financial and inventory accounting, requiring book-to-physical consistency. Non-applicable: Cross-legal-entity scenarios that require purchase/sales orders (a "transfer-out + purchase-in" dual-document pattern should be used instead), and businesses that require real-time per-document push with very low latency. This strategy runs in 5–10 minute batches and is not suitable for millisecond-level linkage.

Original content. Please credit the source when reposting: https://www.qeasy.cloud/insights/solutions/strat-wdt-kingdee-cloud-2008-n3a9efaa4-72de4978

Comments