Qeasy Cloud
Get Started

Self-Shipped Order Sync in Practice: From JiJia ERP Query to Kingdee Direct Transfer

· 高金凤· Integration Solutions· 18 views· 4 min read

What This Strategy Solves

In a real project at a retail enterprise, customer service recorded self-shipped orders in the front-office ERP, while warehouse staff expected to see corresponding transfer entries in the finance ERP. When the two sides did not reconcile, someone had to patch the books manually. This strategy pulls self-shipped orders in three statuses (waiting to accept, waiting for shipment review, waiting to ship) from the source system incrementally, then transforms them into standard direct transfer orders in the target system, achieving book-on-ship.

Data Flow and Field Mapping

The data flow is unidirectional: Source System (self-shipped order query API) → Qeasy Integration Layer (filter, mapping, code conversion) → Target System (direct transfer order write API).

Key field mapping:

Business MeaningSource FieldTarget FieldHandling
Source order numberfoOrderNo / idFThirdSrcBillNo / FThirdSrcIdPass-through, used for idempotency
Business statusbizStatusList—Only WAIT_ACCEPT, WAIT_SHIP_CONFIRM, WAIT_SHIP
MemomemoFNotePass-through
Order type—FBillTypeIDFixed ZJDB01_SYS (standard direct transfer)
Source system code—FHvtThirdSrcTypeFixed GERPGO
Transfer type—FTransferBizTypeMap by business scenario
Delta time windowupdateTimeAfter / updateTimeBefore—Driven by intermediate variables

How to Configure on Qeasy

We use the Qeasy data integration platform to carry the whole chain. Three things matter:

  1. Register the source API: Register /fulfillment/order/foOrder/page as a QUERY action, with page=1 and pagesize=200, and bind the update time window to platform variables {{LAST_SYNC_TIME|date}} and {{CURRENT_TIME|date}}, so the window rolls with each schedule.
  2. Register the target API: Register batchSave as an EXECUTE action, with the third-party source fixed to GERPGO, order type fixed to ZJDB01_SYS, and header fields filled from intermediate variables.
  3. Centralized code mapping: Put enumerations such as warehouse, organization, and transfer type into Qeasy's mapping table. Adding a new store later only requires updating the mapping, not the flow.

Implementation Steps

Three steps, steadily:

Step 1: Decide the delta starting point. Run a full sync on the go-live day, initialize LAST_SYNC_TIME to 7 days before business launch. Then switch to a 15-minute incremental schedule to avoid missing orders.

Step 2: Full sync and backfill. Configure a manually triggered full sync task in Qeasy that does not run automatically. Trigger it only during period switches or code switches for one-time backfills. Incremental for daily use, full sync for correction, dual-track.

Step 3: Scheduling frequency. The source crontab is 5-59/15 7-23 * (offset 5 minutes to avoid pressuring the source system on the hour), and the target crontab is 10-59/15 7-23 * (offset 10 minutes). The 5-minute gap between sides ensures sequencing and leaves the target system enough processing time.

Pitfall Review

  1. Status filter skipped, shipped orders get reversed back: A typical mistake is writing all orders to the target without filtering, causing SHIPPED status orders to be written back. The safe approach is to fix the source to WAIT_ACCEPT,WAIT_SHIP_CONFIRM,WAIT_SHIP and not expose it as configurable.
  2. LAST_SYNC_TIME not persisted, lost on restart: On the first deployment, the time variable persistence was missed; after platform restart the window rolled back a year, almost re-writing the entire historical dataset. Always confirm that Qeasy's time variables are persistent.
  3. No dedup on third-party order number, duplicates pile up in target: When the source returns the same order multiple times in a short window (especially when foOrderNo has no uniqueness constraint), target batchSave will create duplicates. Always use FThirdSrcBillNo + FThirdSrcId as the idempotency key and dedup at the integration layer.
  4. pagesize set too large, source times out: A page size of 200 is the empirical value; exceeding it will cause 504 timeouts on the source during certain windows. Keep it at 200 and paginate instead of enlarging.
  5. Header and body merged, long fields get truncated: Some customers put memos directly in the header, where the target field length is limited and long content is silently truncated. Recommended practice: process header and body in stages; send long text via body memo.

Applicable and Non-Applicable Scenarios

Applicable: When the e-commerce front-office ERP and finance/supply-chain ERP are separated, and you need a transfer/outbound entry generated at the moment of shipment, with clearly enumerable order statuses. Not applicable: When latency requirements are at the second level, when cross-organization distributed transactions are needed, or when the source order state machine is not enumerable. These scenarios require a message middleware or event-driven architecture, not scheduled polling.

Original content. Please credit the source when reposting: https://www.qeasy.cloud/insights/solutions/strat-erp-kingdee-cloud-1306-hakii-20656219

Comments