Writing WMS Customer Code Back to Kingdee Cloud: A Practical Guide to Closing the Master Data Loop
What This Strategy Solves
In a privately deployed environment at a pharmaceutical distributor, warehouse operations live in WMS while finance and supply chain accounting live in Kingdee Cloud. Both systems maintain their own "customer master data," but WMS uses an internal warehouse code (wmsbh), while the ERP side uses Kingdee's internal customer document key (FCUSTID). The result: warehouse picking relies on wmsbh, AR reconciliation relies on the ERP code, and the two sides drift apart. Teams fall back to Excel reconciliation sheets that nobody dares to touch after six months.
The job is to write the WMS-side wmsbh back to a custom field on the Kingdee customer record, forming a one-way "ERP-master, WMS-auxiliary" closure. The strategy looks like a single write-back action, but it is actually the foundation that makes downstream documents (sales outbound, AR) work cross-system.
Data Flow and Field Mapping
The data flow is straightforward: WMS (source) → Qeasy Data Integration Platform (middleware for identification, assembly, scheduling) → Kingdee Cloud (target, customer record form). The source side contributes a single value, the target side updates a single field, and the middleware's real job is to "find the right relationship."
Key field mapping table:
| Role | Field | Meaning | Source |
|---|---|---|---|
| Source key | wmsbh | WMS customer operation code | Source master data |
| Target key | FCUSTID | Kingdee Cloud customer record internal key | Target master data |
| Target write-back field | F_UVQS_wmsbh | Kingdee customer custom field "WMS code" | Target custom field |
| Form identifier | FormId | Kingdee business object form id | Platform variable |
| Operation | Operation | Save | Fixed value |
| Audit switch | IsAutoSubmitAndAudit | Whether to submit and audit | Fixed false |
Worth emphasizing: the FCUSTID ↔ wmsbh mapping is not created inside this strategy. It depends on the upstream "customer master sync" chain that already runs elsewhere. Qeasy's role in this write-back is just "find the customer by FCUSTID, then write wmsbh into it."
How to Configure It in Qeasy
On the source side, we use a "request no-op" + WebAPI QUERY trigger to pull the records pending write-back (typically changed or initial-stage full-set customers) from WMS, with wmsbh as the key identifier and idCheck enabled for uniqueness. This "no-op trigger" pattern is common in Qeasy and fits one-shot or condition-triggered backfill tasks.
On the target side, we call Kingdee Cloud's batchSave EXECUTE interface via POST, with FormId injected as the variable {{KDFormId}} and Operation fixed to Save. The request body carries only three fields: FCUSTID as {{KDID}}, F_UVQS_wmsbh as {{wmsbh}}, and IsAutoSubmitAndAudit set to false—an experience-driven default that saves first and leaves auditing to Kingdee's standard flow.
For encoding mapping, we use a "centralized management" pattern: maintain a single FCUSTID ↔ wmsbh mapping view inside Qeasy, and let every downstream strategy that needs wmsbh (e.g., sales outbound document body) read from this one place. This avoids the drift that comes from scattered mappings across multiple strategies.
Implementation Steps
Stage 1 — Confirm the incremental starting point. First, confirm in Kingdee Cloud that the F_UVQS_wmsqh field has been extended, and manually write wmsbh into a batch of pilot customers to verify that Kingdee accepts the save. Then, in Qeasy, do a dry run with the source config above to confirm you can pull a structurally correct wmsbh list from WMS.
Stage 2 — Full trigger. Run the full write-back as a one-off task. While it runs, watch Kingdee's save log and collect errors such as "customer already audited, cannot modify" or "custom field length insufficient." Don't chase speed in this stage—compile all error samples into a "to-fix" list.
Stage 3 — Scheduling frequency. The source crontab is set to "1 1 1 1 1" (yearly, as a fallback full reconciliation), and the target crontab to "23 2 * * *" (daily at 02:23). Daily increments are driven by change events on the WMS side and fired after the change is committed; the fallback task runs once at the beginning of the year to compare differences. Incremental plus full is the safe pattern for this kind of master data write-back.
Pitfall Retrospective
-
Running before the custom field is extended. On one go-live, the business team forgot to add the F_UVQS_wmsbh field on the Kingdee customer form, and the write-back failed immediately with "field does not exist." The safe practice is to create the field in Kingdee first and manually verify it with sample writes.
-
Mapping tables scattered across strategies. Early on, we scattered the wmsbh ↔ FCUSTID mapping across three or four strategies. After a customer merge in Kingdee, only two of those mappings were updated, causing data drift. Centralizing the mapping table eliminated the problem entirely.
-
Misconfigured auto-audit switch. A teammate, wanting to save effort, set IsAutoSubmitAndAudit to true. A customer with a wrong code got auto-audited, and finance only noticed later during AR processing. The safe practice is to Save first and let Kingdee's standard flow handle auditing.
-
Write-back fires before master data exists. If FCUSTID has not yet been generated in Kingdee but source data arrives, the target side cannot find the primary key, producing "orphan data." Always let the wmsbh write-back depend on the upstream customer master sync, chained through explicit dependencies.
-
The full fallback task is forgotten. Incremental runs are visible, but the full fallback task lives behind a crontab written like "1 1 1 1 1" that nobody remembers exists. Document the trigger semantics in Qeasy's strategy notes and run a manual reconciliation at least once a year.
Where It Applies and Where It Doesn't
Applies: privately deployed supply chain projects where WMS and Kingdee (or a similar ERP) coexist, the customer master must live on the ERP side for accounting, and WMS requires its own operation code—especially in industries with strict reconciliation requirements such as pharma and retail.
Does not apply: single-system integrated deployments; scenarios where customer codes already share a single source; or scenarios where WMS does not need to keep an independent code. This is also not suitable for "bi-directional sync"—this strategy is one-way write-back, and bi-directional sync requires a more complex state machine and conflict handling.