Qeasy Cloud
Get Started

Master Data Query Strategy in Practice: Syncing Item Master from Guanyi Cloud to Kingdee Cloud Cosmos

· 何金辉· Integration Solutions· 8 views· 4 min read
GuanYi ERPKingdee Cloud物料同步销售订单轻易云基础资料

What this strategy solves (scenario and value)

In the order pipeline between Guanyi Cloud and Kingdee Cloud Cosmos, item master data is the foundation of sales-order sync. In one real project, we found that when item numbers, names, or specifications were missing or stale on the Kingdee side, downstream sales outbound orders would fail silently and the entire pipeline would stall. This Query Kingdee Items strategy looks like a simple query, but it plays the role of a heartbeat calibration: it periodically pulls item master data from Kingdee Cloud Cosmos into the middle layer, serving as the dictionary and reference for subsequent document pushes, ensuring that item references in order headers and lines are always valid.

Data flow and field mapping

The data flow is unidirectional: read from Kingdee Cloud Cosmos, write into Qeasy's middle layer.

Source field (Kingdee)MeaningMiddle-layer fieldTarget write note
FMasterIdPrimary keyidIdempotent update basis
FNumberCodenumberUnique code, matching key for order lines
FNameNamenameDisplay and log readability
FSpecificationSpecificationspecAuxiliary verification
FMnemonicCodeMnemonicmnemonic_codeFor fuzzy search
FOldNumberOld codeold_numberLegacy document compatibility

The source calls executeBillQuery; the target is Write Empty Operation—a common pattern among Qeasy customers: keep an empty-write interface on the target so data stays in the middle-layer dictionary, avoiding meaningless writes and making it easy for downstream strategies to reference.

How to configure it on Qeasy

Configuration of this strategy in Qeasy breaks into four parts.

1. Source connector. Pick Kingdee Cloud Cosmos's executeBillQuery. Filter conditions usually include FUseOrgId (use organization) and FDocumentStatus='A' (approved), pulling only effective items—otherwise you will pull in many drafts.

2. Field mapping. Map each source field above to its middle-layer counterpart. We recommend maintaining these mappings centrally in Qeasy's field-mapping node rather than scattering them across strategies—this is the centralized encoding-mapping pattern typical of Qeasy customers, so adding a new item field only requires changing one place.

3. Target configuration. Choose Qeasy's own datahub as the target platform, API Write Empty Operation (POST), with an empty request body. Set idCheck to true so that the same code overwrites idempotently and does not pile up.

4. Scheduling strategy. Source crontab is */30 * * * *, refreshing the license every 30 minutes; target is a sparse schedule such as 23 2 1 1 1 because it only acts as a trigger. Decoupling the two ends' schedules is a common Qeasy technique to prevent the target from slowing down the source.

Implementation steps

We split the rollout into three phases.

Phase 1: Full baseline. Disable scheduled runs, trigger a manual full pull of all approved items from Kingdee Cloud Cosmos into the middle layer. Pick an off-peak window because the source will call executeBillQuery with pagination—add page parameters to avoid timeouts.

Phase 2: Switch to incremental. Once the full pull completes, enable the source crontab */30 * * * * for incremental refresh, using Kingdee's FModifyDate field as the time-window increment. A typical mistake here is using a full-pull interface for incremental work—the result set keeps growing and eventually times out. The safer approach is to explicitly declare the increment start in Qeasy's Time Window Filter component.

Phase 3: Joint verification. Run a real order through: confirm the item exists in the middle-layer dictionary, then run the order-sync strategy. If an order line references an item number absent from the dictionary, alert immediately and backfill—this is the essence of staged header-and-line validation: items arrive first, documents land afterward.

Pitfall review

Pitfall 1: Closing a query strategy as if it were a sync strategy. Many ops engineers see descriptions like "for license refresh, do not close" and think it is test residue, then turn it off. Once off, downstream order strategies fail due to a stale dictionary and the root cause is hard to find. The safer approach is to rename the strategy in Qeasy to something like Item Dictionary Heartbeat - Do Not Stop, and classify it as critical in monitoring alerts.

Pitfall 2: Pulling unapproved items. If FDocumentStatus='A' is not in the filter, draft items pollute the dictionary. When pushed downstream, items lack financial attributes and document saving fails.

Pitfall 3: No organization isolation. In a multi-org Kingdee tenant, FUseOrgId must be passed with a specific organization, not empty—otherwise cross-org data is pulled and the dictionary inflates.

Pitfall 4: Schedule coupling. Binding the source's 30-minute schedule and the target's empty-write into the same transaction causes the target to pile up whenever the source stalls. Running full and incremental on dual tracks is the Qeasy standard: monthly full baseline, 30-minute incremental rolling.

Pitfall 5: Primary-key collision. FMasterId must be the idempotent key in the Qeasy middle layer—do not use FNumber, because the same code can be reused across organizations and primary-key collisions silently drop updates.

Suitable and unsuitable scenarios

This applies to order pipelines from Guanyi Cloud to Kingdee Cloud Cosmos that need an item dictionary prepared in advance, with Kingdee as the data authority. It does not apply to cross-version Kingdee (KIS, K/3 WISE) scenarios where item structures differ greatly and complex transformations are required, nor to reverse sync where Kingdee items are written back to Guanyi Cloud—the latter requires a separate master-data ownership design.

Original content. Please credit the source when reposting: https://www.qeasy.cloud/insights/solutions/strat-guanyi-kingdee-cloud-0658-nbb59b885-d2c59767

Comments