Inventory Loss Sync from JikeCloud to Kingdee Cosmic: A Field Guide
What This Strategy Solves
A retail client runs frequent cycle counts and frequently surfaces inventory shortages. Once the loss-outbound document is posted in JikeCloud, Kingdee Cosmic's inventory ledger must decrease on the same day—otherwise finance close and physical stock drift apart. It looks like a single document pass-through, but loss postings touch quantity, valuation, and accounting at once, so a careless interface causes quantity mismatches and cost anomalies. This strategy converts JikeCloud's loss-outbound document into Kingdee Cosmic's loss document under a fixed set of code and field rules, achieving same-day ledger-to-physical reconciliation.
Data Flow and Field Mapping
The chain is unidirectional: JikeCloud (source) → Qeasy integration platform (middleware) → Kingdee Cosmic (target). The middleware does not compute business values; it rewrites fields, converts units, and maps codes.
Key field mapping table:
| Meaning | JikeCloud (Source) | Kingdee Cosmic (Target) | Notes |
|---|---|---|---|
| Doc number | Outbound doc no. | Loss doc no. | Source carries a prefix; target usually regenerates or remaps |
| Posting date | Posting date | Business date | Keep time zone consistent |
| Warehouse | Warehouse code | Warehouse code | Code mapping maintained centrally in middleware |
| Material | SKU code | Material code | Source and target codes may differ |
| Quantity | Loss quantity | Actual quantity | Default in base UOM |
| Cost | Not carried | Unit cost | Target refills via cost policy |
| Reason | Memo | Loss reason | Enums mapped to target dictionary |
| Operator | Operator | Applicant | Employee master uses another sync |
This table is not hard-coded; it is maintained visually in Qeasy's field-mapping module, so adding a field later means editing the map, not editing code.
How to Configure on Qeasy
We used the Qeasy integration platform to host this strategy on-site. Four configuration areas matter most:
- Source ingestion: For JikeCloud's loss-outbound documents, trigger only when status equals "approved"—never push drafts. The incremental cursor is a combination of "last modified time + document number" to avoid gaps or duplicates.
- Target write: Kingdee Cosmic's loss document uses its standard inventory interface. Organization, stock direction, and document type are pinned in the connector up front; do not decide these at runtime.
- Field mapping: Header and lines are maintained in two layers. Header holds document-level fields (warehouse, date, reason); lines hold material rows (code, quantity, memo). Any custom items on the line also live in the same map.
- Centralized code mapping: Warehouses, materials, and reason dictionaries are maintained in a single mapping table on Qeasy. A common pattern among Qeasy customers is to extract these mappings out of scripts and place them in a queryable, editable table, so business owners adjust dictionaries by clicking instead of editing code.
Implementation Steps
This strategy does not start in full-load mode. We typically roll it out in three phases, which is much safer.
Phase 1: Set the incremental starting point. Confirm the initial document-number range for loss documents in Kingdee, then in JikeCloud use that number as the incremental anchor and pull only documents after it, to avoid replaying historical losses and polluting the ledger.
Phase 2: Trigger a one-shot full backfill. Push pre-anchor historical loss-outbound documents through a one-time task, then close it. On Qeasy this is usually done with "manual trigger + full-load mode," archived after completion, and never scheduled again.
Phase 3: Steady-state scheduling. In production, use timed incremental runs. Frequency depends on volume: high-volume clients run every 5–15 minutes; smaller clients can extend to hourly. Incremental and full-load run on parallel tracks without interfering.
Retry uses a tiered policy: transient network errors auto-retry up to 3 times; field-mapping errors land in a pending queue for manual review before re-push.
Lessons from the Field
Pitfall 1: Drafts got pushed too. On one project we initially pulled by last-modified time and ended up syncing still-editing loss-outbound documents to Kingdee, surfacing unstable data to finance early. The safer pattern is to filter source status to "approved"—prefer to miss one and backfill than to push a half-finished document.
Pitfall 2: Base-unit conversion was skipped. Some materials were entered in "box" on JikeCloud while Kingdee settled in "piece," so quantity passed through 1:1, distorting inventory value immediately. The typical mistake is computing the conversion only at the header and forgetting to override it on the lines. This is a common pitfall; the safe approach is to run unit conversion on every line of the body map, with null-value fallbacks.
Pitfall 3: Loss-reason dictionary drift. Source had 12 reason categories, target dictionary accepted 9, and the remaining 3 were silently dropped, leaving incomplete attribution. We built a "reason dictionary mapping" on Qeasy that routes unmatched items to "Other — pending manual entry" rather than dropping them silently.
Pitfall 4: Cost carried from the source. A sync script once pushed JikeCloud's provisional cost to Kingdee, which then recomputed using its own costing policy, causing a fight. Loss documents' cost field is refilled by the target's costing policy—source does not push cost.
Pitfall 5: Document-number collisions on rerun. When historical data was manually re-pushed, the same document numbers hit target rejection. Once the incremental anchor is set, rolling it back is risky; reruns should use a different prefix on a supplementary channel.
When to Use and When Not to
Use it for multi-org, multi-warehouse retail and distribution scenarios that need same-day loss booking and settlement. Skip it for batch-intensive, high-value-volatility industries like chemicals or jewelry that require batch-level costing, and for large manufacturers whose documents go through multi-level approval before posting—this strategy would need to be extended.