Practical Guide to Syncing Inventory Transfer-Out Orders: Implementing a Single Strategy from Source Query to Downstream Consumption
What This Strategy Solves
In cross-system inventory transfer scenarios, the source system continuously generates transfer-out orders. Downstream systems need these orders for stock deduction, bookkeeping, or in-transit tracking. However, pulling all data every time wastes API quotas and can trigger rate limits. The core value of this strategy is: using a "query-only" approach with time-window incremental pulls to aggregate transfer-out orders from the source system into the Qeasy data integration platform's middleware layer, where downstream systems can consume them as needed. The entire process does not write back to the target system, avoiding duplicate stock deductions.
Data Flow and Field Mapping
The data flow is one-directional: Source System → Qeasy Integration Platform Middleware Layer. The target endpoint is a "write no-op" (POST WebAPI placeholder), meaning it only aggregates without persisting to a target system.
Key source request fields we always check on customer sites:
| Field | Meaning | Typical Value |
|---|---|---|
| enable | Availability filter | 1 (only available) |
| bill_no | Document number | Used for breakpoint resumption |
| modify_start_time | Modification start timestamp | {{HOURE_AGO_1}}*1000 (1 hour ago) |
| modify_end_time | Modification end timestamp | {{CURRENT_TIME}}*1000 |
| page | Current page | 1 |
| page_size | Page size | Depends on API limit, recommend 50 or less |
Downstream-consumed fields are actually the raw documents returned by the source: document number, source document number, transfer direction, source/destination warehouse, item details, modification time, etc. We suggest preserving an original JSON snapshot in the middleware layer to avoid downstream repeatedly calling back to the source due to field interpretation differences.
How to Configure on Qeasy
In the Qeasy data integration platform, this strategy typically involves four configuration areas:
- Data source platform: Select the adapter corresponding to the source system. Fill in the source endpoint path, request method GET, type QUERY.
- Request parameter template: Write
modify_start_timeandmodify_end_timeusing platform-supported built-in variable expressions (HOURE_AGO_1,CURRENT_TIME) rather than hardcoded dates. Setenableto1by default to avoid polluting downstream with disabled documents. - Pagination and rate limiting: Clearly define
page_sizeand pagination limits. If the source API has QPS restrictions, set request intervals in the Qeasy executor—200–500ms is generally safe. - Target platform: Select type WebAPI, effect EXECUTE, leave request empty, and write a "write no-op" placeholder. After this configuration, the strategy only collects data into the middleware layer; downstream systems retrieve it via Qeasy's query interface or subscription method.
Implementation Steps
We typically follow three phases: "incremental starting point → full trigger → scheduling frequency":
- Incremental starting point: During the first go-live, forcibly change
modify_start_timeto 90 days before the business launch date and run a historical backfill to capture all existing transfer orders. After that, switch to the normal incremental window. - Full trigger: Use incremental mode daily, but schedule a full validation once a month (typically early morning at the start of the month). Compare the source system's total document count with the middleware layer's record count, and immediately trigger a re-pull if missing records are found.
- Scheduling frequency: Refer to the crontab
59 2 * * *in the materials (execute once daily at 2:59 AM)—this is the most common choice at customer sites. The rationale is to avoid business peaks and reserve a window for the source system's nighttime batch processing. Meanwhile, crontabs like1 1 1 1 1("never executes") should be reserved for placeholder targets—never accidentally enable them, or you'll trigger empty-run alerts.
Lessons Learned
- Timestamp unit confusion: The source system requires millisecond timestamps, but
HOURE_AGO_1returns seconds by default—you must remember to*1000. This is the most common pitfall; the failure manifests as empty data on the first pull with no error returned. - Incremental window overlap: If time windows overlap between two consecutive executions, duplicate documents will be pulled. The safe approach is to use the source system's
modify_timerather than creation time, and use document number as the deduplication primary key in the middleware layer. - Disabled documents mixed in: If the
enablefield is not fixed to1, downstream systems will receive voided transfer orders, causing repeated stock deductions. We encountered this at a retail customer site—the client asked "why is inventory decreasing?" and we found downstream systems had received a batch of disabled documents. - Placeholder target accidentally triggered: The target crontab in the materials is written as
1 1 1 1 1(never executes)—this is intentional. If a new engineer doesn't understand the meaning and changes it to a normal expression, you'll see one empty run per day and the alert channel will be flooded. It's recommended to add a strategy note stating "this target is a write no-op placeholder; modifying crontab is prohibited." - No breakpoint resumption: If network jitter causes a single page pull to fail, all data within that time window will be missing. We recommend enabling breakpoint resumption in Qeasy, recording progress by
pagedimension rather than simply rerunning by timestamp.
Applicable and Non-Applicable Scenarios
Applicable: When the source system provides a query API with modification-time pagination, when downstream only needs "to know which transfer-out orders occurred" without requiring source-system persistence, and when multiple downstream systems need to share the same transfer data.
Not applicable: When downstream needs strongly consistent feedback from the source system (e.g., synchronously triggering stock changes in another system), when the source system only has creation time without update time (making incremental syncing impossible), or when business requirements demand second-level real-time performance (daily scheduling is insufficient).