Transfer Inbound Order Sync in Practice: From WMS to Kingdee Cloud
What This Strategy Solves
The transfer inbound order is generated after a warehouse-to-warehouse transfer is confirmed received at the destination warehouse. In real projects, the most common pain point is this: once a transfer in the e-commerce WMS completes both outbound and inbound, the data must flow back into the ERP for accounting. If the WMS receipt confirmation is not synced to the ERP in time, the inventory accounts on both sides drift apart, leaving piles of variances at month-end closing.
This strategy does one thing: it lands the transfer inbound order from the WMS into Kingdee Cloud as a "miscellaneous receipt" with document type DBRKD, then auto-submits and audits it, aligning both inventory accounts and document flow across the two systems. Paired with the transfer outbound order strategy, it forms a complete transfer loop.
Data Flow and Field Mapping
Data flow: Source WMS → Qeasy (middleware layer) → Kingdee Cloud (target).
The middleware layer transforms the source document structure into the format accepted by Kingdee's STK_MISCELLANEOUS form according to the field mapping rules, and uses the idCheck mechanism to ensure incremental sync without duplicates.
Header field mapping (key fields):
| Source Field (WMS) | Target Field (Kingdee Cloud) | Mapping Type | Description |
|---|---|---|---|
| order_no | FBillNo | DIRECT | Document number passed through |
| — | FBillTypeID | CONSTANT | Fixed value DBRKD, marks as transfer inbound |
| — | FStockOrgId | CONSTANT | Fixed value 100, inventory org |
| — | FStockDirect | CONSTANT | Fixed value 1, normal inbound direction |
| check_time | FDate | TRANSFORM | Audit time converted to date format |
| — | FDEPTID | CONSTANT | Fixed value BM000032, department |
| — | FOwnerTypeIdHead / FOwnerIdHead | CONSTANT | Owner type org, owner code 100 |
| operator_name | F_TPRO_Text5 | DIRECT | Source operator written to custom field |
| — | F_TPRO_Text6 | CONSTANT | Fixed value 调拨入库单, document source flag |
| remark | F_UBGN_LargeText | DIRECT | Transfer inbound remark passed through |
Detail line field mapping (source detail_list → target FEntity, one-to-one per row):
| Source Field | Target Field | Mapping Type | Description |
|---|---|---|---|
| detail_list.goods_no | FMaterialId | DIRECT | Material code |
| detail_list.num | FQty | DIRECT | Actual received quantity |
| to_warehouse_no | FStockId | DIRECT | Header passes through to detail lines |
| detail_list.price | FPrice | DIRECT | Cost unit price |
| detail_list.total_price | FAmount | DIRECT | Cost amount |
| — | FUnitID | DIRECT | Unit taken from detail line |
| — | FOwnerTypeId / FOwnerId | CONSTANT | Owner type and code same as header |
| — | FKeeperTypeId / FKeeperId | CONSTANT | Keeper type and code same as header |
How to Configure in Qeasy
In the Qeasy strategy canvas, this strategy mainly configures three blocks: source query API, target save API, and field mapping.
Source: API wdt.wms.stockin.transfer.querywithdetail, type QUERY, POST method. Set the primary key field to stockin_id, the business number field to order_no, enable idCheck=true, autoFillResponse=true, buildModel=false. Use crontab */50 7-20 * * * to cover business hours.
Target: API batchSave, type EXECUTE, POST method. Set FormId to STK_MISCELLANEOUS (miscellaneous receipt), Operation to Save, and tick IsAutoSubmitAndAudit=true and IsVerifyBaseDataField=true so documents are auto-submitted and audited without manual steps. Set both number and id to the Kingdee-returned primary key id.
Field mapping: Configure header and detail mappings per the tables above using DIRECT / CONSTANT / TRANSFORM. For the date field check_time → FDate, use the expression {{check_time|datetime}} for format conversion to avoid errors when a raw string lands in a date field. There are no cross-strategy _findCollection or _mongoQuery lookups here, so the code mapping stays clean.
Implementation Steps
On customer sites, we usually follow four phases: build connections → configure strategy → shadow run → go live.
- Build connections: In Qeasy, create data source connections to the WMS and Kingdee Cloud, then verify connectivity and authentication.
- Configure strategy: Drop this transfer inbound strategy into a single strategy and configure source, target, and field mappings as described above. Make sure
idCheckis enabled on both sides for incremental sync. - Scheduling: Use the high-frequency crontab
*/50 7-20 * * *, basically polling every 50 seconds during business hours. If round-the-clock is needed, simply expand the hour range to*, but assess source-system load first. - Shadow and full sync: Incremental start point — begin with transfer inbound orders created after deployment day; the source
idChecknaturally filters out historical data. Full sync trigger — when historical data needs backfill, temporarily disableidCheckor run a one-off backfill script, then restore incremental mode once done.
Lessons from the Field
- Wrong warehouse field: A typical mistake is taking
from_warehouse_no(source warehouse) and stuffing it into Kingdee'sFStockId. This is where things go wrong — the transfer inbound order is confirmed received at the destination warehouse, soFStockIdmust come fromto_warehouse_no.from_warehouse_nois business reference only and does not participate in mapping. - Date field passed as raw string:
check_timeis a string on the source side; passing it directly causes Kingdee to reject it with a date format error. The safe approach is to use TRANSFORM with{{check_time|datetime}}to produce a date Kingdee can recognize. - Missing owner/keeper codes on detail lines: If only the header
FOwnerTypeIdHeadis configured but the detail-levelFOwnerTypeId/FKeeperTypeIdare forgotten, Kingdee will fail basic data validation on save. Fill in both groups as CONSTANT on the detail lines. - Duplicate pushes: Both sides must have
idCheckenabled. Source deduplicates bystockin_id, target deduplicates by the Kingdee-returnedid. If either is missing, the same document gets pushed twice.IsAutoSubmitAndAuditwill catch it, but the logs will pile up duplicates. - Document type vs. inventory direction mismatch:
FBillTypeID=DBRKD(transfer inbound) pairs withFStockDirect=1(normal inbound direction). These two constants are bound together. Do not change one without the other, or Kingdee will reject the save due to type-direction inconsistency.
When to Use and When Not to
Use when: WMS and ERP are deployed separately and you need automatic accounting after destination-warehouse receipt confirmation; scenarios where manual audit is undesirable and real-time inventory alignment is required.
Do not use when: For transfer outbound (requires a separate transfer outbound strategy, this one does not cover it); cross-org or cross-entity transfers (this strategy fixes inventory org and owner to code 100 — multi-org scenarios need per-org strategies); transfers that require batch/bin-level granularity (this strategy only goes down to warehouse level).