Self-Shipped Order Sync in Practice: From JiJia ERP Query to Kingdee Direct Transfer
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 Meaning | Source Field | Target Field | Handling |
|---|---|---|---|
| Source order number | foOrderNo / id | FThirdSrcBillNo / FThirdSrcId | Pass-through, used for idempotency |
| Business status | bizStatusList | — | Only WAIT_ACCEPT, WAIT_SHIP_CONFIRM, WAIT_SHIP |
| Memo | memo | FNote | Pass-through |
| Order type | — | FBillTypeID | Fixed ZJDB01_SYS (standard direct transfer) |
| Source system code | — | FHvtThirdSrcType | Fixed GERPGO |
| Transfer type | — | FTransferBizType | Map by business scenario |
| Delta time window | updateTimeAfter / 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:
- Register the source API: Register
/fulfillment/order/foOrder/pageas a QUERY action, withpage=1andpagesize=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. - Register the target API: Register
batchSaveas an EXECUTE action, with the third-party source fixed toGERPGO, order type fixed toZJDB01_SYS, and header fields filled from intermediate variables. - 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
- 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_SHIPand not expose it as configurable. LAST_SYNC_TIMEnot 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.- 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
foOrderNohas no uniqueness constraint), targetbatchSavewill create duplicates. Always useFThirdSrcBillNo + FThirdSrcIdas the idempotency key and dedup at the integration layer. pagesizeset 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.- 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.