Practical Configuration for Writing WMS Number Back to Kingdee Cloud Skylink on Sales Outbound Orders
What this strategy addresses
In many pharmaceutical and retail warehouses, documents such as sales outbound and purchase inbound are first processed in the WMS, which generates an internal WMS-side document number (wmsbh). The same document then needs to be recorded in the ERP side for financial reconciliation and downstream traceability. The most straightforward approach is to write the wmsbh back to a custom field of the corresponding document in Kingdee Cloud Skylink, so that both sides match. The strategy explained here is dedicated to that single "write-back" action rather than re-pushing the whole document, keeping it lightweight and stable.
Data flow and field mapping
The whole chain can be split into three segments: WMS → Qeasy Data Integration Platform → Kingdee Cloud Skylink. The WMS side generates documents and the wmsbh, the platform side performs scheduling and orchestration, and the Kingdee side only receives a simple write-back request.
| Segment | Field | Meaning | Notes |
|---|---|---|---|
| Source | KDFNumber | Kingdee document number | Used to look up the document internal ID on the Kingdee side |
| Middle layer | KDID | Document internal ID FID | Passed via platform intermediate variables |
| Middle layer | KDFormId | Business object form Id | Distinguishes document types |
| Target | FID | Document internal ID | Write-back primary key |
| Target | F_UVQS_wmsbh | WMS number (custom field) | Field to write into |
| Target | IsUserModelInit | Disable net control | Set to true during write-back to avoid locks |
The source side uses a no-op request (POST, QUERY) that only sends the Kingdee document number into the platform; the target side uses batchSave (POST, EXECUTE) carrying only FID, the custom field, and the form Id, which keeps the payload small and the call fast.
How to configure it on Qeasy
First, create this strategy as an independent integration strategy on Qeasy. Choose "no-op request" for the source, taking only the KDFNumber field; choose batchSave for the target, with FormId and Operation driven by variables, and Operation fixed to Save. Second, the custom field F_UVQS_wmsbh must already exist on the Kingdee Cloud Skylink document; otherwise the save will fail—this is the most common blocker. Third, pass the wmsbh from the WMS side using the variable {{wmsbh}}, and pass KDID using {{KDID}}. Do not hard-code them.
We recommend centralized management of code mapping: put the WMS coding scheme and the Kingdee custom field values into a single mapping table, so that adding new stores or warehouses later only requires changing one place. A phased header-then-line approach is also a common pattern: this strategy only handles header-level write-back, leaving the line items untouched; if line-level traceability is needed later, open a separate strategy for that.
Implementation steps
We recommend advancing in three phases: incremental start point → full-volume trigger → scheduling frequency.
- Incremental start point: start with the sales outbound documents completed in the last 24 hours to confirm that the write-back chain works and wmsbh matches FID. For the source scheduling we typically use
3 2 * * *, which triggers a lightweight check once a day at 02:03. - Full-volume trigger: run a one-off script to write back historical documents in batch, then switch to daily scheduling after it finishes. This step is most likely to expose issues such as missing custom fields or insufficient field permissions, so always run it on a test environment first.
- Scheduling frequency: target-side scheduling uses
6-59/5 8-22 * * *, i.e., every 5 minutes during working hours, avoiding the early-morning batch window. Run incremental and full-volume on parallel tracks: full-volume runs once, incremental runs continuously, and the two do not interfere with each other.
Lessons from the field
- Pushing before the custom field is created. If F_UVQS_wmsbh is not created on the Kingdee document, batchSave will fail directly. The safe approach is to validate the save once in a test ledger before going live.
- Net control not disabled. Kingdee Cloud Skylink locks documents when multiple users edit them, so IsUserModelInit must be set to true; otherwise the write-back will be queued or rejected.
- FormId hard-coded. Different document types (sales outbound, purchase inbound) have different FormIds; this must always use the variable
{{KDFormId}}, otherwise you will see the bizarre "write-back to the wrong document" issue. - Schedule collisions. If both source and target are triggered in the same minute, the platform may try to write back before the WMS has generated the wmsbh. Offsetting them by 2–3 minutes is the safe practice.
- wmsbh source misalignment. In one real project, we mistakenly pushed the wmsbh of a purchase inbound document onto a sales outbound document. The root cause was that the intermediate variables were not isolated by document type. We recommend building separate strategies per document type and not mixing variable pools.
Applicable and non-applicable scenarios
Applicable: the WMS and Kingdee already have basic document push in place, and the ERP side only needs to retain the WMS document number for traceability; fine-grained reconciliation is needed by warehouse, batch, or document type. Not applicable: the WMS side has not generated wmsbh; the custom field has not been built on the Kingdee side; or the requirement demands sub-second latency—this strategy can only reach a 5-minute level at best.