Supplier WMS ID Writeback to Kingdee Cloud: A Single-Strategy Tutorial
What This Strategy Solves
In supply-chain master-data synchronization, supplier records are usually created in the ERP first (Kingdee Cloud in this case) and then opened in the WMS. The WMS maintains its own internal supplier number (wmsbh), which downstream strategies such as inbound, return, and inventory queries rely on for correlation. If the wmsbh is not written back, WMS business documents cannot find the corresponding ERP supplier, breaking voucher generation and compliance traceability.
The goal of this strategy is straightforward: when a supplier record is created or modified in Kingdee Cloud, the wmsbh already assigned in the WMS must be written back into a custom field on the Kingdee side, ensuring a one-to-one mapping between the two systems. On one of our private-deployment projects for a pharmaceutical distribution enterprise, it was this strategy that closed the WMS internal-coding loop.
Data Flow and Field Mapping
The end-to-end chain is Kingdee Cloud ← Qeasy DataHub ← WMS. The WMS exposes wmsbh through a no-op query endpoint, Qeasy handles the orchestration, and finally the Kingdee batchSave API persists the result.
| Layer | Field | Type | Purpose |
|---|---|---|---|
WMS source (wmsbh) | wmsbh | string | WMS internal supplier number used as correlation key |
| Middle mapping | KDID | string | Mapping table Kingdee supplier ID ↔ WMS number maintained in Qeasy |
| Middle mapping | KDFormId | string | Kingdee Cloud supplier business-object form ID |
| Kingdee target | FSupplierId | string | Supplier primary key, receiving {{KDID}} |
| Kingdee target | F_UVQS_wmsbh | string | Custom field receiving {{wmsbh}} |
| Common params | FormId / Operation=Save / IsAutoSubmitAndAudit=false | — | Standard batchSave inputs |
In practice, both
KDIDandKDFormIdare maintained centrally in Qeasy's "Code Mapping" module so nothing is scattered across individual strategy scripts.
How to Configure in Qeasy
In the Qeasy Data Integration Platform (Qeasy) strategy canvas, this is a typical "writeback" configuration: few steps, but plenty of detail.
- Source: WMS wmsbh query endpoint. The source metadata is a "no-op request" of type WebAPI, POST, effect QUERY. Set
numbertoKDFNumberandidtowmsbh, withidCheckenabled andautoFillResponseset to true. With this, Qeasy takes the upstream wmsbh as a query key and fetches the latest value from the WMS. - Middle layer: centralized code mapping. We dedicate a mapping table in Qeasy for suppliers, keyed by the Kingdee supplier ID, with the wmsbh as the value. Every writeback strategy references the same table. When a new supplier is added, a row is written automatically; the wmsbh is filled in after the WMS opens the account.
- Target: Kingdee Cloud batchSave. The target metadata is
batchSave, POST, effect EXECUTE. Bothnumberandidare set toid, withidCheckenabled. Therequestarray carries the business fieldsFSupplierIdandF_UVQS_wmsbh;otherRequestcarriesFormId,Operation=Save, andIsAutoSubmitAndAudit=false. - Scheduling. The source crontab
1 1 1 1 1is a placeholder—actual triggers come from upstream events. The target crontab is23 2 * * *, executing daily at 02:23 to flush the day's writebacks.
Implementation Steps
We recommend splitting the go-live into three phases following an "incremental first, full reconciliation, then schedule" rhythm:
- Phase 1: Incremental starting point (manual trigger). Synchronize only suppliers changed in the last 7 days first, to verify that wmsbh reliably lands in Kingdee's
F_UVQS_wmsbhfield. The key checkpoint is whether the custom field is ready and whether the "save-and-submit" secondary trigger is enabled. - Phase 2: Full reconciliation (one-shot backfill). Once incremental is stable, pull and write back the full supplier set. The full pass must be batched, under 200 records per batch, to avoid
batchSavetimeouts. This is also the best window for validating the mapping table's completeness. - Phase 3: Scheduling frequency. The target crontab runs daily in the early hours, paired with event-driven triggers on the source to deliver "near real-time" behavior. If the WMS completes account opening during the day, the overnight batch cleanly covers the day's changes, balancing latency and Kingdee-side load.
Pitfalls We Have Hit
This strategy only writes back a single field, but in real projects it has exposed a cluster of typical issues:
- Kingdee custom field missing or disabled.
F_UVQS_wmsbhmust be created on the Kingdee supplier document first, otherwisebatchSavesilently discards the value. The safe approach is to register the field as a "pre-dependency" in Qeasy—without it, the strategy cannot go live. - Code mapping not centralized. Some teams scatter
KDIDacross per-strategy scripts, so a single update is easily forgotten. A common pattern we have seen with Qeasy customers is to centralize all master-data mappings in a single "Code Mapping" module and manage them in one place. IsAutoSubmitAndAuditmis-enabled. Setting it to true causes the writeback to auto-submit and audit, dragging along suppliers that are already in the approval flow. Keep it false by default; switch later only when business confirms.idCheckvsnumber/idmismatch. The sourcenumbermust be the upstream unique key (KDFNumberhere); the targetnumber/idare bothid. Once reversed, the entire batch fails but reports success.- Writeback chained to the wrong upstream. Hooking the wmsbh writeback after "purchase order sync" leaves a window where orders arrive before wmsbh is written back. The correct approach is to make it a standalone strategy, dependent on the WMS account-open event, and decoupled from order/return strategies.
When to Use and When Not To
Use when: both ERP and WMS are already in use, the ERP owns supplier master data, and the WMS needs an internal correlation key—typical of private-deployment supply-chain integrations. Do not use when: the ERP custom field is not yet enabled, the WMS does not need its own internal code, or the supplier master flows the other way (WMS → ERP). In the last case, the master-slave relationship itself must be redesigned.