Wangdiantong Stock-In Transfer → Kingdee Cloud Direct Transfer Order: Single-Strategy Sync in Practice
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 Meaning | Source (Wangdiantong) | Target (Kingdee Cloud) | Conversion Notes |
|---|---|---|---|
| Document No. | order_no | FBillNo | Passed through directly, used as the idempotency key |
| Document Type | — | FBillTypeID | Fixed value ZJDB01_SYS |
| Business Type | — | FBizType | Fixed value NORMAL |
| Transfer Direction | — | FTransferDirect | Fixed value GENERAL |
| Transfer Type | warehouse_no | FTransferBizType | Branched by warehouse number; intra-org uses InnerOrgTransfer, otherwise OverOrgTransfer |
| Warehouse | warehouse_no | Sales / In / Out Org | Converted via the code mapping table |
| Item Code | sku | FMaterialId | Converted via the material mapping table |
| Quantity | line num | FQty | Passed 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:
- Source collector: Use the built-in Wangdiantong adapter; select the API
wdt.stockin.order.querywith method POST. Thestart_time/end_timeparameters use the platform variables{{LAST_SYNC_TIME|datetime}}and{{CURRENT_TIME|datetime}}, which naturally form the incremental window. Leavestatusempty to use the default value, which represents completed stock-in orders. - 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 acase whenexpression 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. - Target writer: Use the Kingdee Cloud adapter with API
batchSaveand 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:
- Incremental start point: In the Qeasy scheduling parameters, initialize
LAST_SYNC_TIMEto 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 thatorder_nohas no duplicates or missing entries. - 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_TIMEto the current time, and from then on it runs in pure incremental mode. - 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
- Hard-coding the transfer type is a trap:
FTransferBizTypeshould not be hard-coded toInnerOrgTransferfor 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 bywarehouse_no. - Do not pass the
statusfield carelessly: Among Wangdiantong's stock-in order statuses, only settlement-completed orders should be pushed to Kingdee, so leavingstatusat 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. - The incremental time window needs a fallback: When the source returns empty, never advance
LAST_SYNC_TIMEto 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. - 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.
- The idempotency key must remain stable:
order_nomust not be trimmed or restructured before being written to Kingdee; any modification will cause duplicate writes. If duplicates appear in Kingdee, first check whetherorder_nohas 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.