Qeasy Cloud
Get Started

Inventory Calibration in Practice: Syncing Kingdee Cloud Stock Positions to Wangdian Tong·Qimen

· 钟家寿· Integration Solutions· 14 views· 4 min read
旺店通·奇门Kingdee Cloud库存校准旺店通奇门供应链集成私有化部署

What This Strategy Solves

In retail and distribution, position-level stock numbers drive allocation, shipping, and reconciliation. When Kingdee Cloud stock drifts away from Wangdian Tong·Qimen, the front end starts overselling, running out, or assigning the wrong position. The strategy we dissect here—"Inventory Calibration – Kingdee with Stock Positions – 1"—periodically pushes Kingdee Cloud's warehouse-and-material inventory into Wangdian Tong·Qimen, where it is used to build stocktaking documents or align on-hand quantity. It sits at sequence=B in the broader supply-chain pipeline and only becomes stable once sequence=A (material master sync) is in place.

Data Flow and Field Mapping

The flow is B (Kingdee Cloud) → middleware (Qeasy Data Integration Platform) → A (Wangdian Tong·Qimen). The source uses executeBillQuery to read the inventory view; the target calls wdt.stock.sync.by.pd to create stocktaking documents. Key field mappings:

MeaningKingdee Cloud (source)Wangdian Tong·Qimen (target)Notes
WarehouseFStockId / FStockId_FNumberwarehouse_noResolve FStockId to code before sending
MaterialFMaterialId / FMaterialId_FNumberspec_no (typical)Depends on sequence=A material sync
On-handFBaseQtyqtyUse base-unit quantity
AvailableFBaseAVBQtyreference fieldUsed to decide whether to trigger
LotFLotlot_noRequired when lot-managed

In practice, warehouse and material codes never line up by themselves—you depend on the code table produced by the previous stage.

How to Configure It on Qeasy

Create the "Inventory Calibration – Kingdee with Stock Positions – 1" strategy in Qeasy Data Integration Platform and configure as follows:

  1. Source connection: Choose Kingdee Cloud, configure the private-deployment credentials and IP whitelist; note that executeBillQuery uses POST.
  2. Target connection: Choose Wangdian Tong·Qimen, select wdt.stock.sync.by.pd, and turn on idCheck=true for idempotency.
  3. Field mapping: Bind FStockId_FNumber and FMaterialId_FNumber via template variables into warehouse_no and spec_no; set mode=1 for position-level counting.
  4. Centralized code mapping: Maintain warehouse and material code mappings in Qeasy's mapping table rather than scattering them across strategies—this is one of the patterns we have applied on customer projects.
  5. Strict mode and audit: is_check=1 enables auto-audit; is_post_error controls strict mode—one missing spec_no fails the whole document.
  6. Idempotency key: Use api_outer_no as the external document number so retries do not produce duplicate stocktaking documents.
  7. Exception handling: Turn on Qeasy's alert channel for 4xx/5xx errors with automatic retry and manual intervention hooks.

Implementation Steps

  • Phase 1: Baseline. On the go-live day, run a full pull once to push every position-level stock record from Kingdee Cloud into Wangdian Tong·Qimen as the baseline.
  • Phase 2: Staggered scheduling. Source crontab */5 * * * *, target 1-59/5 * * * *. Stagger the two ends by 1–4 minutes to avoid resource contention.
  • Phase 3: Frequency tuning. Keep 5-minute intervals for the first two weeks while you observe stability, then move to 10–15 minutes based on peak/valley patterns.
  • Phase 4: Monitoring and reconciliation. Configure a reconciliation dashboard in Qeasy that compares FBaseQty with successfully pushed qty; alert when the gap exceeds a threshold.
  • Phase 5: Incremental plus full reload. Run incremental in daily operations, but trigger a full reload when new lots arrive or operators request it—this is the second common pattern we use for Qeasy customers.

Pitfall Recap

  1. Material master not yet synced. If sequence=A's "cp_KQM Material Sync" is not stable when you start pushing inventory, every spec_no fails and the whole document is rejected. A must come before B.
  2. Sending FStockId directly. Kingdee's FStockId is a numeric primary key; Wangdian Tong·Qimen expects a code string. Translate it in the mapping layer, otherwise warehouses end up created incorrectly.
  3. Missing lot info. In position+lot inventory scenarios, sending availability as on-hand when FLot is empty produces the "total matches, lots don't" mystery.
  4. Strict mode flipped on too early. Starting with is_post_error=1 causes the entire stocktaking document to fail whenever a single new material appears, delaying a lot of inventory data. Stabilize on non-strict mode first, then flip.
  5. Duplicate pushes create dirty documents. If api_outer_no is empty or random, Qeasy's retry mechanism will spawn multiple stocktaking documents on the Wangdian Tong side. A stable composite key (source ID + warehouse + material) is the safe pattern.

When to Use and When Not to

Use this when Kingdee Cloud is the inventory source of truth and Wangdian Tong·Qimen is the front-end fulfillment system, in mid-to-large retail or distribution businesses with stable warehouse positions and an established material mapping. Do not use it when: material master data is not yet synced, Kingdee has no position dimension, you need sub-second real-time inventory (use a message queue instead of polling), or warehouse positions change too frequently.

Original content. Please credit the source when reposting: https://www.qeasy.cloud/insights/solutions/strat-pc2ef6c-kingdee-cloud-0165-nfe011a74-10a6c7d2

Comments