Query Materials Strategy Tutorial: Master Data Sync from Kingdee YXC to Qeasy Integration Platform
What This Strategy Solves
In supply chain integration, material master data is the root of every transaction. One retail enterprise uses a marketing cloud as the front-end entry and Kingdee YXC as the back-end ERP; both sides need one authoritative material catalog. We use the Qeasy data integration platform as the middleware layer to pull Kingdee YXC material data incrementally into the platform, then distribute it to the marketing cloud and other downstream systems. On a real project, what the customer cares about most is not "can we pull it down" but "after pulling, do the codes match on both sides, and can changes be detected in time." This strategy is the first leg of that chain — Query Materials.
Data Flow and Field Mapping
The data flow is unidirectional: Source (Kingdee YXC V2) → Middleware (Qeasy datahub). The source side uses a WebAPI GET request; the target side performs an EXECUTE write (placeholder) on the platform, with the actual transformation done in the middleware.
| Dimension | Source Field | Meaning | Middleware Handling |
|---|---|---|---|
| Time window | modify_start_time / modify_end_time | Millisecond timestamp | Use {{LAST_SYNC_TIME}}000 and {{CURRENT_TIME}}000 for incremental window |
| Pagination | page / page_size | Page number, page size | 100 per page, loop through results |
| Business key | number / id | Code, ID | Used as idempotency key |
| Response | parent_name etc. | Material master | Map and cleanse in middleware before landing |
Key point: the timestamp must have three zeros appended to convert to milliseconds — this is a hard requirement of the Kingdee YXC V2 API; missing it returns empty data.
How to Configure on Qeasy
Configuration revolves around three segments: source connector, middleware processing, and target placeholder.
Source connector: Register Kingdee YXC V2 access on the platform (platform code Kingdee.YXC), API /jdy/v2/bd/material, method GET, effect QUERY. Configure the four request parameters as above; the time window uses platform variables, and the business module is tagged "Basic Data Sync."
Middleware processing: This is where Qeasy shines — transforming the flat JSON from the source into a structure downstream systems understand. A common practice is to centralize code mapping in the platform's Data Dictionary module, so materials, customers, and vendors all share one mapping table. In one project, code mapping was adjusted 7 times in half a year; with centralized management, one change takes ten minutes instead of a day.
Target side: Register an EXECUTE node on the platform using "write empty operation" as a placeholder. It may seem redundant, but it clearly defines the landing boundary on the platform — when connecting real downstream systems later, only the target side needs changing, not the source.
Implementation Steps
We roll out this strategy in three phases for stability.
Phase 1: Confirm the incremental starting point. Before the first run, do a "full baseline" — set modify_start_time to a timestamp far earlier than system go-live (e.g., 0 or a fixed historical point) to pull all historical materials in one go. All subsequent incremental runs are based on LAST_SYNC_TIME. Choosing the wrong starting point causes "data looks right but a batch of early data is missing," and it's extremely hard to troubleshoot.
Phase 2: Schedule design. The source strategy runs during business hours (*/3 7-22 * * *, every 3 minutes from 7am to 10pm), ensuring material changes during business hours are detected at the minute level. The target strategy runs at night (23 2 * * *, 02:23 daily) for reconciliation and batch landing. The incremental-and-full dual-track pattern is common among Qeasy customers: incremental ensures timeliness, full ensures completeness.
Phase 3: Scripts and verification. The strategy itself has no custom scripts (the scripts field is null); all transformations are done in the platform's visual configuration. We recommend running a "source count vs platform count" reconciliation daily for the first week after go-live.
Lessons Learned
- Forgot to multiply the timestamp by 1000. Kingdee YXC V2 requires milliseconds, but the source API returns seconds; passing it directly is interpreted as some date in 1970 and the API returns empty. The safe approach is to write
{{LAST_SYNC_TIME}}000directly in the request parameter and let the platform concatenate, rather than computing manually in a script. - Set page size to 1000 by gut feeling. Too large a page times out the API; too small causes a spike in schedule calls. We fixed it at 100 per page — the most stable in practice.
- Used only number as the idempotency key. Kingdee YXC allows multiple versions of the same code (across organizations); using only number loses data. Use number + id as a composite idempotency key.
- Skipped full load and went straight to incremental. The result: all historical pre-go-live materials were missing from downstream. The incremental starting point must be aligned first — basic hygiene.
- Treated the empty target write as useless. In fact, it defines the strategy's landing boundary. Later when connecting the marketing cloud, only this side changes; the source stays untouched. This is the essence of strategy orchestration in Qeasy.
When to Use and When Not
Use when: The source is Kingdee YXC V2, you need to sync material master data incrementally to a middleware layer for distribution to downstream systems; material changes frequently and timeliness matters (minute-level). Do not use when: The source is not Kingdee YXC V2, or the downstream needs batch files rather than API pulls; or the material catalog rarely changes and timeliness is not critical — in that case, a simple full import is enough.