Qeasy Cloud
Get Started

Supplier WMS ID Writeback to Kingdee Cloud: A Single-Strategy Tutorial

· 卢剑航· Integration Solutions· 7 views· 4 min read
WMSKingdee Cloud供应链集成供应商主数据WMS轻易云回写策略

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.

LayerFieldTypePurpose
WMS source (wmsbh)wmsbhstringWMS internal supplier number used as correlation key
Middle mappingKDIDstringMapping table Kingdee supplier ID ↔ WMS number maintained in Qeasy
Middle mappingKDFormIdstringKingdee Cloud supplier business-object form ID
Kingdee targetFSupplierIdstringSupplier primary key, receiving {{KDID}}
Kingdee targetF_UVQS_wmsbhstringCustom field receiving {{wmsbh}}
Common paramsFormId / Operation=Save / IsAutoSubmitAndAudit=false—Standard batchSave inputs

In practice, both KDID and KDFormId are 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.

  1. Source: WMS wmsbh query endpoint. The source metadata is a "no-op request" of type WebAPI, POST, effect QUERY. Set number to KDFNumber and id to wmsbh, with idCheck enabled and autoFillResponse set to true. With this, Qeasy takes the upstream wmsbh as a query key and fetches the latest value from the WMS.
  2. 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.
  3. Target: Kingdee Cloud batchSave. The target metadata is batchSave, POST, effect EXECUTE. Both number and id are set to id, with idCheck enabled. The request array carries the business fields FSupplierId and F_UVQS_wmsbh; otherRequest carries FormId, Operation=Save, and IsAutoSubmitAndAudit=false.
  4. Scheduling. The source crontab 1 1 1 1 1 is a placeholder—actual triggers come from upstream events. The target crontab is 23 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_wmsbh field. 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 batchSave timeouts. 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:

  1. Kingdee custom field missing or disabled. F_UVQS_wmsbh must be created on the Kingdee supplier document first, otherwise batchSave silently discards the value. The safe approach is to register the field as a "pre-dependency" in Qeasy—without it, the strategy cannot go live.
  2. Code mapping not centralized. Some teams scatter KDID across 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.
  3. IsAutoSubmitAndAudit mis-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.
  4. idCheck vs number/id mismatch. The source number must be the upstream unique key (KDFNumber here); the target number/id are both id. Once reversed, the entire batch fails but reports success.
  5. 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.

Original content. Please credit the source when reposting: https://www.qeasy.cloud/insights/solutions/strat-wms-kingdee-cloud-1787-wmsbh-d18c0088

Comments