Qeasy Cloud
Get Started

Sync Warehouse Inventory Count (Loss) from Jiandaoyun to Kingdee Cosmic: A Single-Strategy Tutorial

· 何海波· Integration Solutions· 4 views· 5 min read

What This Strategy Solves

In a retail/manufacturing enterprise, monthly inventory counts are recorded as "Warehouse Inventory Count (Monthly)" in Jiandaoyun by frontline staff. The loss details (盘亏) need to be pushed into Kingdee Cosmic as "Other Outbound Orders (Inventory Loss)" so they become financially recognized documents for cost accounting and inventory adjustments. Jiandaoyun is lightweight and close to the field; Kingdee Cosmic is the ERP ledger and demands standardized documents with clear accounting subjects.

In one real project, the most common customer requirement is: push the loss records created on that day to Kingdee every hour, rather than re-pushing the entire count sheet. This keeps the ERP books in near-real-time and avoids document pile-up. This strategy is implemented on the Qeasy Data Integration Platform.

Data Flow and Field Mapping (Source → Middle Layer → Target)

The data flow is direct: the source is the "Warehouse Inventory Count (Monthly)" in Jiandaoyun; the target is the "Other Outbound Order (Inventory Loss)" in Kingdee Cosmic. The middle layer in Qeasy mainly handles three things: field renaming, unit/code unification, and splitting loss details into header + line items.

Business MeaningSource Field (Count Sheet)Middle LayerTarget Field (Other Outbound - Loss)
Document No.盘点单号Pass-through with prefixBillNo
Business Date盘点日期Format yyyy-MM-ddBusiness Date
Warehouse仓库名称Code mapping tableWarehouse Code
Material Code物料编号Code mapping (internal → Kingdee master)Material Code
Loss Qty差异数量 (negative)Absolute value, tag as "loss"Actual Issue Qty
Unit基本单位Align basic/stock unitStock Unit
Batch No.批次号Pass-throughBatch No.
Remark盘点备注Pass-throughRemark
Loss Reason差异原因Enum mappingBusiness Type / Reason Code

Header and body are processed in two stages: write the header first, then the body lines, filtered by loss qty > 0.

How to Configure on Qeasy

On the Qeasy Data Integration Platform, configuring this strategy is straightforward, but several points deserve emphasis:

  • Source Connection: Configure the Jiandaoyun form/dataset as the source. Use an incremental view filtered by modified_time > last_sync_time to avoid repeatedly pulling the entire monthly count.
  • Target Connection: Use the "Other Outbound Order" save interface in Kingdee Cosmic. You typically need a login/token call first; Qeasy's connector supports session persistence.
  • Field Mapping: Configure the key mappings above in Qeasy's mapping canvas. Code mappings (warehouse, material, reason) should be placed in Qeasy's "Unified Code Mapping Center" for reuse across strategies.
  • Data Transformation: Use Qeasy's expression nodes to take absolute values of loss qty, add business prefixes to document numbers, and set defaults for missing fields (default warehouse/reason).
  • Write Mode: Submit the Other Outbound Order as a whole document — header and body in one transaction — to avoid half-baked documents.

Implementation Steps

Our on-site implementation rhythm usually has three phases:

  1. Incremental Starting Point Alignment: Before the first sync, align with business owners on the starting timestamp. Common practice is to take 00:00 of the day after the last successful count of the previous month. If historical data needs to be backfilled, run a full backfill first, then switch to incremental.
  2. Full Trigger (Optional): If Kingdee needs historical loss data, manually trigger a one-time full backfill. After completion, Qeasy records the high-end timestamp and subsequent schedules will not replay.
  3. Scheduling Frequency: Monthly count scenarios suggest running once every early morning (covering loss entries created during the month). For more real-time requirements, switch to hourly. Qeasy's scheduler supports cron expressions and event triggers — for example, pushing immediately after a count sheet is approved.

After going live, add a small reconciliation step: every morning compare loss amounts/quantities on both sides, and notify ops through Qeasy's alert channel when anomalies occur.

Pitfall Review

  1. Pushing negative loss qty directly: A classic mistake is passing Jiandaoyun's "difference qty" as-is, resulting in negative outbound orders in Kingdee. The safe approach is to take absolute value in the middle layer and tag the business type as "loss".
  2. Codes maintained separately drift after 3 months: If warehouse/material/reason mappings are written per strategy, they will drift within 3 months. Centralize them in Qeasy's Code Mapping Center for cross-strategy reuse.
  3. Header lands before body, creating orphan headers: When submitting as a whole document, if body lines are filtered out due to missing codes, you end up with a header-only document. Add a validation in Qeasy's flow: only submit when body line count > 0.
  4. Monthly count re-pushed repeatedly: Without an incremental starting point, the same loss entries are pushed multiple times, creating duplicates. Incremental view + timestamp is the default.
  5. Unit mismatch causes quantity misalignment: If Jiandaoyun uses "pieces" while Kingdee's base unit is "boxes", quantities go wrong by orders of magnitude. Always align units in the middle layer; a lightweight unit conversion table is also recommended in Qeasy's mapping center.

Applicable and Non-Applicable Scenarios

Applicable: Monthly/quarterly counts where the "difference qty < 0" loss details need to flow into the ERP as outbound vouchers in near-real-time for retail, wholesale, and manufacturing enterprises. Non-applicable: scenarios where count differences are maintained only on the Kingdee side (single-side maintenance), and complex loss workflows requiring multi-level approval — in those cases, complete the approval in Jiandaoyun first, then use this strategy to sync.

Original content. Please credit the source when reposting: https://www.qeasy.cloud/insights/solutions/strat-pcdd5c6-kingdee-cloud-2364-n8e43a30a-405afaa0

Comments