Qeasy Cloud
Get Started

Integration Solution Overview: Kingdee Cloud Galaxy to Sihua MES for Master Data and Business Documents

· Integration Solutions· 12 views· 5 min read
四化智造MES(API)Kingdee CloudMES基础资料同步集成方案私有化部署

Scenario and Value

In a real project at a discrete manufacturing site, we ran into a recurring problem: MES had already completed work-order reporting and inbound inspection, but the corresponding production orders and receiving notices in Kingdee Cloud Galaxy were only patched up the next day when business staff manually reconciled. Month-end cost rollups were delayed, and procurement reconciliation kept looping. The bottleneck was not ERP data capture speed, but the lack of an automated closed loop between MES and ERP.

This solution covers master data and business document synchronization between Kingdee Cloud Galaxy (ERP finance and supply chain) and Sihua MES (API), with 22 integration strategies spanning material master data, production orders, purchase orders, inventory receipts, and auxiliary queries. The value is straightforward: link the chain of master data → business documents → inventory via an integration platform, so material creation immediately flows downstream, order release is immediately executable in MES, and inbound receipts are immediately traceable for quality.

Integration Architecture and Data Flow

The architecture uses unidirectional synchronization as the primary mode, supplemented by query-class caching. Kingdee Cloud Galaxy acts as the source of ERP master data, Qeasy (the integration platform) serves as the middle layer for scheduling, transformation, and mapping, and lands the data into Sihua MES.

Kingdee Cloud Galaxy (BD_/PRD_/PUR_/STK_)  ──one-way──►  Qeasy Platform  ──one-way──►  Sihua MES (/api/*)
   Master data / business documents                  Code mapping / lookup completion                Materials / work orders / POs / inspection
                                                                
Kingdee Cloud Galaxy (query class)    ──pull──►  Qeasy Platform cache  ──►  Business document lookups

Data flow proceeds in stages:

  • Master data flow: material groups, units of measure, warehouses, customers, suppliers → corresponding master data on the MES side; materials and BOMs depend on the upstream master data.
  • Production flow: Kingdee production orders → MES work orders, with material UUID lookup.
  • Procurement flow: expense purchase orders (subcontracting) → MES purchase orders, with supplier and material lookups.
  • Inventory flow: miscellaneous receipts → MES inspection sign-off; receiving notices → MES pending inspection information.
  • Query flow: production BOMs, purchase orders, expense items, employees → platform cache, available for business document lookups.

Interface List

Strategy IDData ObjectSync DirectionNotes
S01Material group → material categoryKingdee → MESMaster data, no dependency
S02Unit of measure → MES unitKingdee → MESMaster data, no dependency
S03WarehouseKingdee → MESMaster data, no dependency
S04CustomerKingdee → MESMaster data, no dependency
S05SupplierKingdee → MESMaster data, no dependency
S06MaterialKingdee → MESDepends on S01, S02
S07BOMKingdee → MESDepends on S06, S03
S08Contact persons → supplierKingdee → MESDepends on S05
S09Production BOMKingdee → PlatformQUERY_ONLY
S10Purchase orderKingdee → PlatformQUERY_ONLY
S11Expense itemKingdee → PlatformQUERY_ONLY
S12EmployeeKingdee → PlatformQUERY_ONLY
S13Production order → work orderKingdee → MESDepends on S06
S14Receiving notice → pending inspectionKingdee → MESDepends on S06, S05, S03
S15BOM_modifyKingdee → MESStaggered from inserts
S16Expense PO → MES purchase order (subcontracting)Kingdee → MESDepends on S05, S06
S17Miscellaneous receipt → inspection sign-offKingdee → MESDepends on S06, S03, S05
S18Supplier_modifyKingdee → MESStaggered from inserts
S19Material_modifyKingdee → MESStaggered from inserts
S20Warehouse_modifyKingdee → MESStaggered from inserts
S21Customer_modifyKingdee → MESStaggered from inserts
S22Unit_modifyKingdee → MESStaggered from inserts

Implementation Highlights

Phased scheduling. The 22 strategies are split into four execution stages: Stage 1 covers dependency-free master data (material groups, units, warehouses, customers, suppliers); Stage 2 covers materials and BOMs; Stage 3 covers production, procurement, and inventory business documents; Stage 4 covers modify-class strategies staggered from inserts. Query strategies run independently and do not participate in the main dependency chain.

Incremental field selection. On the Kingdee side, timestamps such as FApproveDate, FModifyDate, FAuditDate, FConveyDate, FCancelDate serve as incremental pull conditions. For initial go-live or data repair, the incremental condition is removed to run a full reconciliation.

Centralized code mapping. Materials, customers, suppliers, warehouses, and units of measure have their mapping tables maintained centrally in the integration layer. Business documents complete MES-side IDs through lookups (such as supplierNo, materialUuid, warehouseUuid). A common pitfall is scattering mapping logic across every strategy — once it is scattered, a single change forces a sweep across all strategies. The stable approach is to keep mappings in a central platform table and have strategies reference them as needed.

Staggered writes. Modify-class strategies are offset by 15 minutes from their corresponding insert strategies, to avoid the same master record being both inserted and modified in the same window.

Exception retry and alerting. Kingdee APIs occasionally time out or throttle; the platform side needs exponential backoff retries and failure alerts. Documents that fail to write to MES enter a manual reconciliation queue rather than being silently dropped.

Privacy and credentials. Kingdee and MES API credentials, along with tenant codes, live in environment variables or a secrets manager — never hardcoded inside strategy scripts. Organization codes are configured per tenant to prevent cross-tenant data leakage.

Best Practices and Lessons Learned

  1. Master data first. A common mistake during delivery is going live with materials and business documents simultaneously, which causes materialUuid to be missing on the MES side. The pattern we use is to let the master data stage run dry for a week, verify the mapping, then release business documents.
  2. Header and line items written in separate stages. For documents with line items such as BOMs and production orders, write the header first to obtain the MES document number, then write the lines and look up child materials. This avoids timeout from pushing oversized payloads in one shot.
  3. Separation of lookup completion and code mapping. Lookups are responsible only for fetching MES-side UUIDs; code mappings are maintained separately. With clear responsibilities, a future change in material coding rules touches only the mapping table, not the business strategies.
  4. Staggered modify strategies. The same material being inserted and modified within the same minute is a real-world scenario; a 15-minute offset directly avoids such race conditions.
  5. Independent channel for query strategies. Query strategies only pull and do not write, so they do not block the main pipeline; however, frequency must be controlled to avoid exhausting Kingdee query APIs.

When to Use Qeasy

When a project involves multiple master data sets and multiple business document types between ERP and MES — and requires scheduling orchestration, code mapping, staggered writes, and exception retry in a private deployment — Qeasy (the integration platform) provides out-of-the-box strategy orchestration, incremental/full reconciliation switching, lookup completion, and alerting. It fits the landing path of master-data-first, business-document-dependent, modify-staggered execution, so teams do not need to rewrite scripts for each new project.

Original content. Please credit the source when reposting: https://www.qeasy.cloud/insights/solutions/sol-mes-api-kingdee-cloud-5066

Comments