Sync Warehouse Inventory Count (Loss) from Jiandaoyun to Kingdee Cosmic: A Single-Strategy Tutorial
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 Meaning | Source Field (Count Sheet) | Middle Layer | Target Field (Other Outbound - Loss) |
|---|---|---|---|
| Document No. | 盘点单号 | Pass-through with prefix | BillNo |
| Business Date | 盘点日期 | Format yyyy-MM-dd | Business Date |
| Warehouse | 仓库名称 | Code mapping table | Warehouse 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 unit | Stock Unit |
| Batch No. | 批次号 | Pass-through | Batch No. |
| Remark | 盘点备注 | Pass-through | Remark |
| Loss Reason | 差异原因 | Enum mapping | Business 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_timeto 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:
- 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.
- 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.
- 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
- 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".
- 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.
- 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.
- 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.
- 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.