From Inventory Count Sheet to Inventory Loss Voucher: A Practical Sync Guide Between Jushuitan and Kingdee
What This Strategy Solves
A retail enterprise running multi-warehouse operations typically uses Jushuitan for unified inventory counts across stores and e-commerce channels, while the financials live in Kingdee Cloud Xingchen. After counting, book inventory often drifts between the two systems: shortages need to be booked as inventory loss vouchers in Kingdee, while surpluses go to inventory surplus vouchers. This strategy only handles the negative variance path — filtering the count results from Jushuitan and writing them into Kingdee as inventory loss vouchers — which avoids manual splitting and duplicate entry.
Data Flow and Field Mapping
Data starts from the Jushuitan inventory count sheet, passes through the middle layer on the Qeasy data integration platform for variance filtering and field conversion, then lands in the Kingdee inventory loss voucher.
The key field mapping is summarized below (typical for real projects, subject to the actual API versions on both sides):
| Business meaning | Jushuitan count sheet source | Middle layer handling | Kingdee loss voucher target |
|---|---|---|---|
| Document number | Count sheet number | Pass-through | Document number |
| Count date | Count date | Pass-through | Business date |
| Warehouse code | Warehouse code | Centralized code mapping | Warehouse code |
| Item code | SKU code | Item master mapping | Material code |
| Quantity | Shortage quantity | Take negative variance (physical - book < 0) | Quantity (as positive) |
| Unit | Base unit | Pass-through | Base unit |
| Batch / expiry | Batch number | Pass-through | Batch |
| Variance reason | Remarks | Pass-through | Remarks |
Centralized code mapping is a common pattern among Qeasy customers: warehouse and SKU mappings between the two systems are maintained in a single mapping table rather than hard-coded in scripts, so adding warehouses or SKUs later only requires updating the table, not the code.
How to Configure on Qeasy
On the Qeasy data integration platform, the strategy is typically configured around these points:
- Source side: Pick the Jushuitan inventory count interface, pull incrementally by modification time, and backfill 30 days of history as the baseline on first run.
- Middle layer: Use the field mapping and script nodes in Qeasy to filter out loss-type lines (physical quantity below book quantity), flip the negative values to positive to match Kingdee's input convention, and structure the payload.
- Target side: Call the Kingdee Cloud Xingchen inventory loss voucher save interface, staged between header and body — generate the header first to obtain the internal document id, then submit the body lines with that id.
- Exception handling: The runtime log inside Qeasy shows failed documents and their reasons; failures are typically pushed to a local retry queue, reviewed manually, and re-pushed after fixing.
Implementation Steps
In one real project we rolled this out in three phases to keep things steady:
- Phase 1, preparation: Configure the authentication for both source and target inside Qeasy, and set up the mapping tables for warehouse, item, and batch. Qeasy lets you keep all mapping tables in a single dataset so that adding warehouses later does not require touching scripts.
- Phase 2, incremental anchor: On the first run, set an explicit incremental anchor timestamp, for example midnight on the go-live day. Trigger a manual full baseline run first to import historical loss variances into Kingdee; once the baseline finishes, automatically switch to incremental pulls by modification time at a 15-minute cadence, covering the afternoon and night-shift count peaks in stores.
- Phase 3, verification and steady state: During the first week after go-live, reconcile daily that the number of Kingdee loss vouchers matches the number of negative-variance lines from Jushuitan; once stable, switch the cadence to every 30 minutes as the long-term rhythm. The dual-track pattern of incremental plus full baseline is fairly common among Qeasy customers.
Lessons Learned
- Confusing the count task with the count result: The Jushuitan inventory count sheet is a task document; the real variances only appear after the count is completed and written back. Pulling directly on the task status will return many lines with empty variances. The safe approach is to pull only completed count results.
- Mixing positive and negative variances on one document: Kingdee treats inventory loss and inventory surplus as two distinct voucher types. If the middle layer does not split by variance sign, positive and negative variances on the same count sheet cancel each other out and the books still do not match. Be sure to filter by line inside the Qeasy script node.
- Dropping batch and expiry information: Retail warehouses usually manage batches. If the mapping only carries quantity without batch, Kingdee will either reject the line or fall back to a generic batch, breaking the inventory dimension.
- Duplicate generation of loss vouchers: When pulling incrementally, if the modification-time field on the interface is not granular enough, the same count sheet can be pushed multiple times. A safe pattern is to add a deduplication window in the middle layer keyed by count sheet number plus line number.
- Conflict with the financial closing window: If Kingdee has already closed the current month, the loss voucher push will fail. A reliable approach is to add a closing-day check in the Qeasy scheduler: pause the push on closing day and resume the next day.
When It Fits and When It Does Not
It fits multi-store, multi-warehouse retail enterprises that share one counting process across stores and e-commerce channels, as well as warehouse-finance integrated scenarios where count results need to flow directly into the books. It does not fit single-warehouse micro stores that still adjust manually and rarely see variances, nor special business models that need surplus and loss booked together on a single voucher.