Production Inbound Assembly Order Sync: Kingdee Cloud Assembly Order → Wangdiantong WMS Inbound Order Tutorial
What This Strategy Solves
At a manufacturing-retail customer site, once an assembly order is approved in the ERP, the warehouse must receive the finished-goods inbound instruction as soon as possible. The problem is that the ERP's "assembly order" and the WMS's "production inbound order" are two completely different document models—their code systems, statuses, and header/line fields do not align. Manual re-entry in the WMS is inefficient and error-prone. Our approach is to use Qeasy (Qingyiyun Data Integration Platform) to incrementally pull approved Kingdee Cloud assembly orders by approval timestamp, transform them into a WMS-readable inbound JSON, and push it over—achieving approval-to-inbound and real-time inventory sync between the books and the warehouse.
Data Flow and Field Mapping
The overall flow is Kingdee Cloud (source) → Qeasy middle layer → Wangdiantong WMS (target). The source side uses executeBillQuery to query approved assembly orders, and the target side calls WDT_WMS_ENTRYORDER_CREATE to write the inbound order.
| Dimension | Kingdee Cloud Assembly Order | Wangdiantong WMS Inbound Order | Notes |
|---|---|---|---|
| Document Number | FBillNo | entryOrder.orderNo | Direct mapping; keep source number for traceability |
| Entity Key | FID | entryOrder.externalId | Used as idempotency key to avoid duplicates |
| Status | FDocumentStatus='C' | — | Sync only approved; filter draft/created |
| Business Date | FDate | entryOrder.orderDate | Format as yyyy-MM-dd HH:mm:ss |
| Approval Date | FAPPROVEDATE | entryOrder.checkTime | Use max line approval date |
| Doc Type | FBillTypeID | entryOrder.orderType | Map via target dictionary |
| Lines | FEntity_FEntryID array | orderLines[] array | Assemble in two phases: header, then lines |
| Material Code | FMaterialID.FNumber | orderLines.sku | Code mapping required |
| Quantity | FQty | orderLines.num | Unify unit before passing |
| Warehouse | FStockID | entryOrder.warehouse | Maintain code mapping centrally |
Material code and warehouse code are the two fields most likely to cause trouble in this strategy. They must be managed through centralized code mapping in Qeasy, never hard-coded in scripts.
How to Configure in Qeasy
When configuring this strategy in Qeasy, we typically split it into three blocks: source collector, middle transformer, and target writer.
- Source collector: Platform "Kingdee Cloud", API
executeBillQuery, method POST. In the request body, select fields like FID, FBillNo, FDocumentStatus, FDate, FAPPROVEDATE, FBillTypeID. Hard-code the filterFDocumentStatus='C'(approved). - Middle transformer: In Qeasy's field mapping canvas, drag source fields to target fields per the table above. Anything involving code conversion goes into the global mapping table (material, warehouse, type) for reuse across strategies.
- Target writer: Platform "Wangdiantong WMS", API
WDT_WMS_ENTRYORDER_CREATE, method POST.entryOrderaccepts the header object;orderLinesaccepts the line array. A small pitfall: the WMS API requiresorderLinesto be an array, not an object. In Qeasy, mark line fields as "array nodes".
Remember to enable idCheck when writing the strategy so Qeasy dedupes by id, preventing one-order-multiple-inbound caused by retries.
Implementation Steps
Phase 1: Full Trigger (One-Time)
First, run a full backfill of approved assembly orders from the last 90 days so historical WMS stock aligns with the ERP. Use Qeasy's "manual trigger + range filter" and verify totals afterward.
Phase 2: Incremental Start Point
Set a watermark at the moment full backfill ends (recommended: max approval date + doc inner code). Going forward, only incrementals are fetched. Qeasy records this cursor in the strategy, so re-runs will not lose data.
Phase 3: Scheduling Frequency
Source crontab: 1-59/2 * * * * (every 2 minutes). Target crontab: 1-59/3 * * * * (every 3 minutes). Stagger the two sides to avoid hitting the target system at the same time—source fast, target slow is the norm. If the customer's daily assembly order volume is low, extend it to every 5 minutes; Qeasy handles this kind of supply chain document very reliably.
Phase 4: Monitoring and Reconciliation
For the first week after go-live, we recommend attaching a reconciliation task in Qeasy: run it once daily at dawn, comparing "approved and inbound" counts on both sides by document number. Any non-zero diff triggers an alert immediately.
Pitfall Recap
-
Missing status filter: On the first run, we forgot to filter
FDocumentStatusand pushed draft and created orders as well, producing a pile of pending inbound orders in WMS. This is where things easily go wrong. The safe approach is to hard-code onlyCin the source query and add a second filter in Qeasy's transformation layer. -
Header and lines not split into phases: The WMS inbound order API requires a header first, then lines. Sending the entire JSON in one shot caused some batches to report "warehouse does not exist". After splitting into phases, the issue disappeared. The common Qeasy customer pattern is header-and-lines split-phase.
-
Code mapping scattered across scripts: Early on, we took shortcuts and wrote if-else chains for code mapping in transformation scripts. When a material code changed, the two sides no longer matched. Later we moved all code mappings into Qeasy's "Global Mapping Table", so adding a new material only requires one change.
-
No idempotency; retries caused duplicate inbound: Once a Qeasy callback timed out and the target system retried, the same order was received twice. After enabling
idCheck,FIDis passed asexternalIdto WMS, so duplicate requests are discarded directly. -
Inconsistent date formats: Kingdee returns a date-time string, but WMS requires
yyyy-MM-dd HH:mm:ss. Handle this uniformly with a date-format function in Qeasy—do not let the downstream system guess.
Applicable and Non-Applicable Scenarios
Applicable: finished-goods assembly inbound, semi-finished inbound, light-manufacturing scenarios requiring sync by approval timestamp. Non-applicable: ultra-high-volume real-time posting (requires message queues, not polling), scenarios requiring cost-recognition write-back (set up a reverse posting strategy), and discrete manufacturing scenarios with complex document state machines.