Qeasy Cloud
Get Started

Purchase Receiving Sync in Practice: A Non-Associated Strategy from Jushuitan to Kingdee Cloud Sky

· 尹春锐· Integration Solutions· 7 views· 3 min read
JushuitanKingdee Cloud采购入库单供应链集成轻易云不关联策略

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 MeaningJushuitan Source FieldQeasy VariableKingdee Cloud Sky Target Field
Receiving document numberio_id{{io_id}}FBillNo
Document type—ConstantFBillTypeID (RKD01_SYS)
Business type—ConstantFBusinessType (CG)
Owner—ConstantFOwnerIdHead (101)
Receiving date—{{io_date}}FDate
Modification time windowmodified_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:

  1. Source configuration: select the API /open/purchasein/query. Set page_index starting from 1 and page_size to 50 (the official upper limit). Bind the time window to modified_begin and modified_end with template variables {{LAST_SYNC_TIME|datetime}} and {{CURRENT_TIME|datetime}}.
  2. 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.
  3. Target configuration: select Kingdee's batchSave API and build the standard "header + entry" JSON. FBillNo takes {{io_id}}; document type, business type, and owner are written as constants.
  4. 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.
  5. 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_begin back 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 to 40 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

  1. Never exceed the 7-day time window: Jushuitan's API explicitly forbids modified_begin and modified_end from 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.
  2. Do not set page_size arbitrarily high: the official cap is 50; setting 100 will be truncated and may cause data loss.
  3. 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.
  4. FOwnerIdHead must be a real internal code: before writing the constant "101", query it inside Kingdee first — the value differs across books.
  5. 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.

Original content. Please credit the source when reposting: https://www.qeasy.cloud/insights/solutions/strat-jushuitan-kingdee-cloud-9390-n1dd56331-247d73ec

Comments