Qeasy Cloud
Get Started

Production Inbound Assembly Order Sync: Kingdee Cloud Assembly Order → Wangdiantong WMS Inbound Order Tutorial

· 高金凤· Integration Solutions· 17 views· 4 min read

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.

DimensionKingdee Cloud Assembly OrderWangdiantong WMS Inbound OrderNotes
Document NumberFBillNoentryOrder.orderNoDirect mapping; keep source number for traceability
Entity KeyFIDentryOrder.externalIdUsed as idempotency key to avoid duplicates
StatusFDocumentStatus='C'—Sync only approved; filter draft/created
Business DateFDateentryOrder.orderDateFormat as yyyy-MM-dd HH:mm:ss
Approval DateFAPPROVEDATEentryOrder.checkTimeUse max line approval date
Doc TypeFBillTypeIDentryOrder.orderTypeMap via target dictionary
LinesFEntity_FEntryID arrayorderLines[] arrayAssemble in two phases: header, then lines
Material CodeFMaterialID.FNumberorderLines.skuCode mapping required
QuantityFQtyorderLines.numUnify unit before passing
WarehouseFStockIDentryOrder.warehouseMaintain 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.

  1. 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 filter FDocumentStatus='C' (approved).
  2. 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.
  3. Target writer: Platform "Wangdiantong WMS", API WDT_WMS_ENTRYORDER_CREATE, method POST. entryOrder accepts the header object; orderLines accepts the line array. A small pitfall: the WMS API requires orderLines to 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

  1. Missing status filter: On the first run, we forgot to filter FDocumentStatus and 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 only C in the source query and add a second filter in Qeasy's transformation layer.

  2. 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.

  3. 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.

  4. 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, FID is passed as externalId to WMS, so duplicate requests are discarded directly.

  5. 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.

Original content. Please credit the source when reposting: https://www.qeasy.cloud/insights/solutions/strat-wms-kingdee-cloud-3149-kd-wms-a302bd09

Comments