Purchase Receiving Sync in Practice: A Non-Associated Strategy from Jushuitan to Kingdee Cloud Sky
What This Strategy Solves
A retail enterprise runs its e-commerce front end on Jushuitan and its ERP back end on Kingdee Cloud Sky. Every day, stores and warehouses generate a large number of purchase receiving documents. If staff have to key them in twice, the finance team will be buried in reconciliation work within a month. This strategy solves exactly that problem: it pushes purchase receiving documents from Jushuitan into Kingdee Cloud Sky automatically, without establishing a back-reference to the purchase order, keeping inventory and monetary figures consistent on both sides. We use the Qeasy data integration platform to host the flow, so neither the source nor the target system needs any code change.
Data Flow and Field Mapping
The flow is one-directional: Jushuitan (source) → Qeasy middle layer → Kingdee Cloud Sky (target). The middle layer handles pagination by time window, field renaming, code mapping, and retry on failure.
Key field mapping:
| Business Meaning | Jushuitan Source Field | Qeasy Variable | Kingdee Cloud Sky Target Field |
|---|---|---|---|
| Receiving document number | io_id | {{io_id}} | FBillNo |
| Document type | — | Constant | FBillTypeID (RKD01_SYS) |
| Business type | — | Constant | FBusinessType (CG) |
| Owner | — | Constant | FOwnerIdHead (101) |
| Receiving date | — | {{io_date}} | FDate |
| Modification time window | modified_begin / modified_end | {{LAST_SYNC_TIME}} / {{CURRENT_TIME}} | — |
A non-associated strategy means that upstream reference fields such as FSourceBillNo are not passed; the target system creates a standalone receiving document directly.
How to Configure It on Qeasy
Open the Qeasy integration platform and create a new "QUERY + EXECUTE" combined strategy:
- Source configuration: select the API
/open/purchasein/query. Setpage_indexstarting from 1 andpage_sizeto 50 (the official upper limit). Bind the time window tomodified_beginandmodified_endwith template variables{{LAST_SYNC_TIME|datetime}}and{{CURRENT_TIME|datetime}}. - Middle layer: enable "centralized code mapping management", map Jushuitan's warehouse and item codes to Kingdee's internal codes, and store them in one mapping table so future changes happen in one place.
- Target configuration: select Kingdee's
batchSaveAPI and build the standard "header + entry" JSON. FBillNo takes{{io_id}}; document type, business type, and owner are written as constants. - Phased header and entry: get the header (head) working first and confirm an empty-body document can be saved; then add entry-level fields. This avoids the trap of debugging 200 fields at once.
- Enable idCheck: let Qeasy query the target by FBillNo before writing, which gives natural idempotency.
Implementation Steps
We split the rollout into three phases:
- Phase 1, incremental starting point: on the first run, manually specify a
modified_begin(for example, midnight of the current day) so the system only pulls that window and we can validate mapping and saving. - Phase 2, full backfill: move
modified_beginback to the business go-live date and run a full load; meanwhile, watch Qeasy's error queue and fix mappings one by one. - Phase 3, steady-state scheduling: set the source crontab to
20 5-6 * * *(one window per hour starting at 05:20, covering a rolling 7 days), and the target crontab to40 6-7 * * *(20 minutes later, leaving a write buffer). Source pulls, target writes — the classic "incremental and full dual-track" pattern.
Lessons from the Field
- Never exceed the 7-day time window: Jushuitan's API explicitly forbids
modified_beginandmodified_endfrom being more than 7 days apart, otherwise it errors out. The safe approach is to slice the window into 1-hour pieces so cross-day runs never exceed the limit. - Do not set page_size arbitrarily high: the official cap is 50; setting 100 will be truncated and may cause data loss.
- FBillNo must be carried over: in a non-associated strategy, FBillNo is the only traceability anchor; if left empty, the target system generates an auto number and later reconciliation becomes impossible.
- FOwnerIdHead must be a real internal code: before writing the constant "101", query it inside Kingdee first — the value differs across books.
- Retry based on error code, not blindly: business validation errors from Kingdee (such as a deactivated warehouse) should not be retried indefinitely, otherwise they block the queue. Pull these documents from Qeasy's error queue and handle them manually.
When to Use and When Not to Use
Use it when: the e-commerce front end and ERP back end are separated, orders and receiving are decoupled, and you do not need to write back purchase order references — typical for retail and distribution businesses. Do not use it when: receiving must match the purchase order line by line, you need full traceability by writing the source document number back into Kingdee, or single documents exceed 500 lines and require batch splitting — the latter needs a dedicated batch strategy.