Qeasy Cloud
Get Started

Syncing Kingdee Assembly Bill Sub-Item Outbound to Wangdiantong Other Outbound Orders via Qeasy

· 钟家寿· Integration Solutions· 54 views· 4 min read

What This Strategy Solves

In a subcontracted-warehouse setup, a retail enterprise runs Kingdee Cloud Galaxy for finance and supply-chain accounting and Wangdiantong Flagship Edition for WMS operations. Once an assembly bill is approved on the Kingdee side, its sub-items must generate "other outbound orders" on the WMS side for the physical outbound process. Because the two systems use different document models, manual entry is slow and error-prone. The core value of this strategy is to push the header and line items reliably through the Qeasy Data Integration Platform, so vouchers remain traceable and stock never drifts.

Data Flow and Field Mapping

Overall flow: Kingdee Cloud Galaxy (source) → Qeasy middleware → Wangdiantong Flagship Edition (target).

On the source side, the platform calls /kapi/v2/dtog/im/im_assembbill/getList, paginating via pageNo and pageSize. The primary key is id, and the business document number is billno. On the target side, data is written to wms.stockother.Out.push, which accepts two main objects: order (header) and order_details (an array of line items mirroring the sub-item entries on the Kingdee side).

Key field mapping (typical; adjust to the customer's actual schema):

Business MeaningKingdee FieldWangdiantong FieldHandling Notes
Document numberbillnoorder.order_noPass through; used as the idempotency key
Business dateBusiness date fieldorder.order_dateNormalize to yyyy-MM-dd HH:mm:ss
Warehouse codeWarehouse codeorder.warehouse_noResolved via a code-mapping table
SKU codeSub-item material codeorder_details.sku_noManaged centrally via code mapping
QuantitySub-item quantityorder_details.qtyKeep two decimal places
RemarkRemark / noteorder.remarkTruncate to the API's allowed length

A common Qeasy customer pattern is to centralize warehouse and SKU code mapping in the platform's code-mapping module, so downstream strategies reference one shared table instead of duplicating logic across scripts.

How to Configure in Qeasy

  1. Register two data sources: pick the Kingdee Cloud Galaxy adapter for the source, fill in the API endpoint and credentials; for the target, choose the Wangdiantong Flagship Edition adapter and complete the WebAPI onboarding.
  2. Build the source dataset: point the API at /kapi/v2/dtog/im/im_assembbill/getList, set pageSize to 10, keep idCheck=true for incremental recognition, and buildModel=false so no physical table is created here.
  3. Build the target dataset: select wms.stockother.Out.push as the write API, and explicitly declare order_details as the array type items so line items can be expanded downstream.
  4. Configure mappings and scripts: header fields map one-to-one; sub-item line items are expanded via Qeasy's batching mechanism. Encoding replacements live in a unified script block rather than being rewritten per strategy.
  5. Storage strategy: with autoFillResponse=true and number=billno, the platform automatically returns the document number for troubleshooting and write-back.

Implementation Steps

  1. Incremental starting point: pick an approval timestamp as the starting point on first go-live. The platform deduplicates on id to avoid duplicate pushes.
  2. Full backfill: run a one-off full backfill for historical assembly bills during off-peak hours, writing in batches.
  3. Schedule frequency: the source crontab is 10-59/20 7-23 * * *, and the target is offset to 15-59/20 7-23 * * *. The 5-minute offset prevents both ends from contending for the API at the same moment.
  4. Monitoring and alerts: enable Qeasy's document tracing, search the full chain from source to target by billno, and notify the owner through an alert channel on failure rather than waiting for the business to complain.

Lessons Learned

  1. A typical mistake is using billno directly as the idempotency key. Some Wangdiantong interfaces do not strictly enforce uniqueness, and duplicate pushes can produce multiple other outbound orders. The safer approach is to use Kingdee's id as the idempotency key and store it in Qeasy's dedup table.
  2. Sub-item quantity precision gets truncated. Kingdee quantities may carry four decimals while the target API only accepts two, leading to a long-term 0.01 drift. It is safer to explicitly call toFixed(2) in the mapping script and validate the difference.
  3. Warehouse codes are not mapped. The warehouse code systems on the two sides are entirely different; passing them through directly triggers "warehouse does not exist" errors on the target side. Most customers end up centralizing this mapping in Qeasy's code-mapping module.
  4. Header and body pushed in one go. When header and lines are pushed together, any single line failure rolls back the entire document. A safer pattern is to land the header first, then write lines in batches so that failed rows can be retried without affecting already-successful ones.
  5. Schedule clashes. Both source and target pulling near the top of the hour can hammer the API. Offsetting the two ends by 5 minutes is a detail that is easy to miss in early go-live.

When to Use and When Not to

Use it when: the subcontracted-warehouse / assembly business volume is moderate, document structure is stable, and the customer demands tight consistency between the inventory ledger and the physical count. Do not use it when: assembly bills need manual confirmation on the WMS side before being pushed, or when the target side requires splitting by bin location with complex sub-warehouse logic — those scenarios deserve a dedicated strategy of their own.

Original content. Please credit the source when reposting: https://www.qeasy.cloud/insights/solutions/strat-wdt-p110c26-0304-ok-0980f64b

Comments