Qeasy Cloud
Get Started

Sales Order Master Data Synchronization: Kingdee Material Query Strategy in Practice

· 尹春锐· Integration Solutions· 17 views· 4 min read
JushuitanKingdee Cloud销售订单物料主数据轻易云基础资料同步私有化集成

What This Strategy Solves

In a sales order synchronization chain, material master data is the "dictionary table" referenced by almost every downstream document (orders, delivery notes, inventory). In one real engagement, we found that without stabilizing the material dictionary before syncing sales orders, downstream orders frequently suffered from "code-name mismatches," "confused specifications," and "legacy codes lingering" — issues that are extremely time-consuming to debug. This strategy does just one thing: on a schedule, query materials from the source ERP (Kingdee Cloud in this case) and land them into an intermediate layer on the Qeasy platform, serving as a unified reference base for downstream sales order synchronization.

Data Flow and Field Mapping

The overall flow is Source ERP → Qeasy Platform Intermediate Layer. The source side calls Kingdee's executeBillQuery interface (POST), and the target side uses a placeholder "write no-op" on Qeasy, while the actual landing is consumed by downstream strategies.

Key field mapping (source → platform intermediate layer):

Business meaningSource fieldTypeRequiredNote
Primary key IDFMasterIdstringNoUsed for idempotency check
Material codeFNumberstringNoBusiness unique key, relied upon downstream
Material nameFNamestringYesMust be transmitted
SpecificationFSpecificationstringNoUsed for order line display
Legacy material codeFOldNumberstringNoCompatible with legacy systems, often used for code mapping
DescriptionFDescriptionstringNoAnnotation-style info

From experience, we recommend treating FNumber as the primary key field and FMasterId as the idempotency key, keeping the two decoupled.

How to Configure on Qeasy

Source strategy (source) side:

  • Set api to executeBillQuery, method to POST, effect to QUERY.
  • Bind the number field to FNumber, the id field to FMasterId, and turn off idCheck (downstream handles idempotency).
  • Enable autoFillResponse so the platform automatically backfills the response fields into the request structure, reducing script maintenance.
  • Turn off buildModel since this run is query-only and does not build a write model.
  • Declare the 6 core request fields as listed in the source materials, with FName marked as required.

Target strategy (target) side:

  • The platform points to the Qeasy integration platform itself (datahub) as the intermediate layer landing point.
  • Set api to the "write no-op" placeholder, method POST, effect EXECUTE.
  • Leave both request and response bodies empty; consumption happens in downstream strategies.

Implementation Steps

  1. Determine the incremental starting point: run a full sync first to land the existing material dictionary into the Qeasy intermediate layer as the baseline.
  2. Establish field mapping: configure source → platform mapping per the table above, register FNumber and FMasterId as dual keys, and use this as the entry point for centralized code mapping management.
  3. Configure scheduling: source-side crontab is suggested as */10 8-21 * * * (every 10 minutes during business hours); the target-side intermediate layer fallback write runs at 23 2 * * * (merged once daily at dawn). This is the common "high-frequency pull + low-frequency merge" dual-track approach we use.
  4. Trigger the full sync: manually run a full material query at go-live to verify that no fields are missing in the mapping.
  5. Move into the incremental steady state: poll every 10 minutes during business hours and run a differential merge at 2:23 a.m., ensuring downstream order synchronization always has access to the latest material dictionary.
  6. Jointly debug with downstream strategies: point the depends_on of subsequent sales order sync strategies to this strategy so that order lines always land against the latest material dictionary.

Lessons Learned (Pitfall Review)

  1. A typical mistake is using FMasterId as the business code. FMasterId is the database primary key; FNumber is the business code. The two can drift apart after source system upgrades or data migrations. The safe approach is to centralize code mapping and let the business key always go through FNumber.
  2. Discarding FOldNumber directly is a common pitfall. Many materials migrated from legacy systems are only recognized by their old codes in downstream e-commerce or WMS systems. We recommend pulling FOldNumber into the intermediate layer as well and building a compatibility map to avoid mismatched numbers during reconciliation three months later.
  3. Mixing full and incremental sync in one schedule will produce duplicate data. The safe approach is staged scheduling: full sync as the baseline, pure incremental afterward, and differential merge at dawn.
  4. FName is required but the source occasionally returns it empty. In such cases, the source system returns dirty data. We recommend adding a lightweight validation on the Qeasy side, routing materials with empty names into an exception queue rather than letting them into the master data pool.
  5. Pulling both header and line data in one shot tends to time out. This strategy only pulls the material master header dimensions (code, name, specification). Specifications, unit conversions, and other line-level details should be split into a separate strategy to avoid oversized responses.

Applicable and Non-applicable Scenarios

Applicable: Retail or manufacturing enterprises running on a private deployment with Kingdee Cloud as the ERP master data source, needing a unified material dictionary to support downstream sales order, inventory, and delivery synchronization.

Not applicable: Scenarios where the source ERP frequently performs large-scale master data changes (bulk imports / code reorganization), requires real-time (second-level) material change push, or requires independent material pools across multiple organizations/books. In those cases, event subscription or per-organization intermediate layer splitting is more suitable.

Original content. Please credit the source when reposting: https://www.qeasy.cloud/insights/solutions/strat-jushuitan-kingdee-cloud-7300-nd5991635-adac3655

Comments