Practical Guide to the Real-Time Inventory Query (Stocktake) Strategy: Pulling Snapshots from Kingdee Cloud into Qeasy
What This Strategy Solves
When stocktake season arrives, what operations teams fear most is not the physical counting itself, but the uncertainty of "how much does the book balance differ from the physical count, and where?" During an on-premise deployment for a manufacturing client, the customer made one requirement very clear: before stocktake begins, pull a one-time real-time inventory snapshot from Kingdee Cloud into the Qeasy integration platform as the baseline, then have on-site PDAs compare it against physical counts. The "Real-Time Inventory Query (Stocktake)" strategy exists precisely to deliver that trustworthy baseline. It is not a continuous sync strategy; it is an on-demand, query-style snapshot.
Data Flow and Field Mapping
The overall flow is "Kingdee Cloud → Qeasy." The source is Kingdee Cloud's query interface, and the target uses a no-op write node in Qeasy so that downstream stocktake workflows can subscribe to the snapshot.
Key field mapping:
| Business Meaning | Source Field (Kingdee Cloud) | Type | Target Landing Point |
|---|---|---|---|
| Inventory record key | FID | string | Snapshot table primary key |
| Warehouse ID | FStockId | string | Warehouse dimension |
| Material ID | FMaterialId | string | Material dimension |
| On-hand quantity | FBaseQty | string | Booked stock |
| Available quantity | FBaseAVBQty | string | Available stock |
| Lot number | FLot | string | Lot dimension |
On the source side, number is configured as FMaterialId_FNumber, id as FID, and autoFillResponse is true, indicating a one-shot pull that Qeasy auto-loads. The target side uses effect: EXECUTE, api: no-op write, and an empty request body—this is the typical pattern for a "query-style snapshot": the source fetches the data, and the target simply records the event and persists the snapshot.
How to Configure It in Qeasy
Step 1. In the Qeasy platform, create a new strategy. Select Kingdee Cloud as the source platform and datahub (Qeasy itself) as the target. Set the source api to executeBillQuery, type to QUERY, effect to QUERY, and method to POST.
Step 2. Configure the request fields. Select FID, FStockId, FMaterialId, FBaseQty, FBaseAVBQty, FLot, and so on, and set is_required to false on all of them. A stocktake baseline needs a full snapshot, not filtered by condition, so these fields are columns "to bring back," not "input criteria."
Step 3. Use the "no-op write" API on the target node, with an empty request body. The critical setting is idCheck=true, which makes Qeasy generate an idempotent record after each execution, preventing repeated triggers from overwriting the snapshot during the stocktake process.
Step 4. Centralize code mapping. Maintain mappings for the three dimensions—warehouse, material, and lot—in Qeasy's mapping table. Downstream stocktake applications then only need to recognize Qeasy's internal codes, without coupling to Kingdee's FID system.
Implementation Steps
We split this strategy into three phases, with a rhythm completely different from the usual "master data + business documents" sync.
Phase 1: Align the incremental starting point. The night before stocktake day, run a separate inventory closing in Kingdee to seal the book balance. Then manually trigger a full pull in Qeasy as the "midnight baseline."
Phase 2: Full trigger. At 8 a.m. on stocktake day, the business side clicks the "Start Stocktake" button in the Qeasy UI to trigger one execution. This execution pulls instant inventory for all warehouses and all materials at once and writes it to the snapshot table. Since the target is a no-op write, Kingdee is not polluted.
Phase 3: Scheduling frequency. For this stocktake-dedicated strategy, set crontab to "1 1 1 1 1" (i.e., no scheduling) and rely entirely on manual triggers. The regular inventory sync hanging off Qeasy is a separate strategy running hourly. The two follow the common "incremental + full dual-track" pattern: incremental at hourly cadence for daily operations, plus a single full snapshot right before stocktake.
Lessons from the Field
Lesson 1: Don't mix on-hand quantity with available quantity. FBaseQty is the booked stock; FBaseAVBQty is the available quantity after subtracting reservations. Stocktake comparison should use the former. In one customer scenario, the team used available quantity for comparison and all variances turned out to be "reserved by sales orders," costing them an entire night of wasted investigation.
Lesson 2: Always include the FLot lot number. Having only FMaterialId is not enough. The same material under different lots must be recorded separately; otherwise, variance analysis for lot-managed materials is impossible.
Lesson 3: A "no-op write" target is not really empty. It is fundamentally an idempotent event inside Qeasy. You must ensure idCheck=true; otherwise, repeated triggers leave dirty data that corrupts stocktake reconciliation.
Lesson 4: Separate stocktake day from inventory closing day. We once saw a case on a customer site: stocktake in the morning, inventory closing in the afternoon, and then at 11 a.m. an auto-closing ran again, so the snapshot no longer matched physical counts. The safe approach is "close first, snapshot second."
Lesson 5: In on-premise deployments, align the Qeasy scheduler timestamp with the Kingdee server. If the clock skew exceeds one minute, the FID order returned by Kingdee becomes inconsistent, and downstream deduplication by FID produces duplicate rows.
When to Use It and When Not To
Use it for: periodic stocktake, annual physical inventory, book-balance freezing before warehouse migration, and audit data extraction—any "one-time, needs-freezing, needs-reconciliation" scenario. Do not use it for: daily store-level available inventory queries, real-time e-commerce display, or MRP calculations. Those scenarios need hourly or even minute-level incremental sync and should run on a separate, regular inventory sync strategy, not this stocktake-dedicated query.