Sales Order to Sales Outbound: A Single Strategy Bridging the Offline Link Between Jikecloud and Kingdee Cloud Cosmos
What this strategy solves
In a real retail project, offline store sales orders are created in Jikecloud first, and then need to be generated as sales outbound documents in Kingdee Cloud Cosmos so they can flow into financial accounting and inventory deduction. It looks like just pushing one document, but across two systems, fields like customer code, item code, tax rate, price list, and outbound warehouse are very easy to misalign. This article focuses on a single concrete strategy: synchronizing offline sales orders from the Jikecloud Qimen channel into Kingdee Cloud Cosmos as sales outbound documents, and walks through the data flow, configuration, and pitfalls.
Data flow and field mapping
The overall link is: Jikecloud (offline sales order) → Qeasy data integration platform (the middle layer, responsible for cleaning, mapping, and enrichment) → Kingdee Cloud Cosmos (sales outbound document). The middle layer is not a simple relay; it handles code mapping, header/body split, and null-value fallback.
| Dimension | Jikecloud (Source) | Middle Layer Handling | Kingdee Cloud Cosmos (Target) |
|---|---|---|---|
| Document type | Offline sales order | Type conversion | Sales outbound document |
| Document number | Platform order number | Pass-through | Document number (prefix optional) |
| Customer | Platform customer code | Centralized code mapping | Customer code |
| Item | Platform product code/SKU | Code mapping + UOM conversion | Item code + sales unit |
| Quantity | Pieces | Convert to base unit | Quantity (base unit) |
| Price/amount | Tax-included or tax-exclusive | Price list enrichment, split price and tax | Unit price, tax-included amount, tax amount |
| Warehouse | Store warehouse code | Warehouse mapping | Outbound warehouse |
| Line items | Platform detail lines | Split/merge rules | Financial detail lines |
How to configure on Qeasy
On customer sites, we usually use the Qeasy data integration platform to host this strategy. The core configuration falls into four parts.
- Source access: Pull offline sales orders through the Jikecloud Qimen channel. We recommend only fetching documents that are approved and have not been pushed, using 'document status + modification time' as the filter.
- Data cleaning and mapping: Centralize the code mapping tables (customer, item, warehouse) in the Qeasy transformation component. This is the most common source of issues later, so it must be unified in the middle layer rather than scattered across multiple tables.
- Header and body in separate phases: Push the header first, generate the Kingdee sales outbound master document and write back the internal ID, then write the body line by line. This split significantly reduces null-value and duplicate-row risks.
- Target write: Call the Kingdee Cloud Cosmos save interface, using a two-phase commit of 'header first, body next', with an idempotency key (document number + item code + line number) to avoid duplicate pushes caused by network jitter.
Implementation steps
We prefer to split the go-live into three phases, rather than a one-shot cutover.
- Phase 1: Set the incremental baseline. Backfill the recent 3 days of offline sales orders as the initial incremental baseline, and confirm that code mapping, tax rate, and price list all match.
- Phase 2: Trigger one full run. Manually trigger a one-time full backfill on Qeasy to validate cross-period and exception documents (voided, changed).
- Phase 3: Lock down the schedule. Offline documents usually follow either an end-of-day batch or near-real-time cadence. A safe approach is a dual-track pattern: end-of-day batch plus near-real-time increments at key slots (e.g. 4pm, 8pm), which keeps outbound timely and avoids overnight backlogs.
Pitfall recap
- Code mapping not centralized. A typical mistake is to place the customer mapping on the Kingdee side and the item mapping on the Jikecloud side, and three months later the two sides do not reconcile. The safe approach is to maintain a single mapping table in the Qeasy middle layer, with all changes going through one entry point.
- Header and body submitted together. Kingdee Cloud Cosmos is sensitive to the 'save + submit' separation, and pushing them together tends to produce half-formed documents. The safe approach is to save the header first to get the internal ID, then loop the body lines, and only then submit.
- UOM conversion ignored. Jikecloud may use 'box' while Kingdee needs 'piece'. Passing the raw quantity causes inventory deduction errors. We usually maintain base-unit conversion factors in the middle layer and convert before push.
- Weak idempotency keys. Using only the document number as the idempotency key causes duplicates during batch pushes. The safe approach is a three-segment composite key: document number + item code + line number.
- Exception documents unmonitored. Offline orders are frequently voided, repriced, or have their address changed, and pushing them to Kingdee throws errors. The safe approach is to configure error retry and a manual fallback queue in Qeasy, instead of silently dropping the records.
When to use and when not to use
Suitable for: Offline store retail orders that need to enter financial accounting and inventory deduction in Kingdee; a clear 'push-on-approval' cadence; item and customer code systems that are already largely unified. Not suitable for: Pure e-commerce high-frequency orders (use real-time APIs instead of a single strategy batch push); cross-organization or cross-set-of-books transfers (need a separate strategy); business models where source documents are unstable and frequently modified (the middle layer mapping cost is too high).