Integration Solution Overview: Kingdee Cloud Galaxy to Sihua MES for Master Data and Business Documents
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 ID | Data Object | Sync Direction | Notes |
|---|---|---|---|
| S01 | Material group → material category | Kingdee → MES | Master data, no dependency |
| S02 | Unit of measure → MES unit | Kingdee → MES | Master data, no dependency |
| S03 | Warehouse | Kingdee → MES | Master data, no dependency |
| S04 | Customer | Kingdee → MES | Master data, no dependency |
| S05 | Supplier | Kingdee → MES | Master data, no dependency |
| S06 | Material | Kingdee → MES | Depends on S01, S02 |
| S07 | BOM | Kingdee → MES | Depends on S06, S03 |
| S08 | Contact persons → supplier | Kingdee → MES | Depends on S05 |
| S09 | Production BOM | Kingdee → Platform | QUERY_ONLY |
| S10 | Purchase order | Kingdee → Platform | QUERY_ONLY |
| S11 | Expense item | Kingdee → Platform | QUERY_ONLY |
| S12 | Employee | Kingdee → Platform | QUERY_ONLY |
| S13 | Production order → work order | Kingdee → MES | Depends on S06 |
| S14 | Receiving notice → pending inspection | Kingdee → MES | Depends on S06, S05, S03 |
| S15 | BOM_modify | Kingdee → MES | Staggered from inserts |
| S16 | Expense PO → MES purchase order (subcontracting) | Kingdee → MES | Depends on S05, S06 |
| S17 | Miscellaneous receipt → inspection sign-off | Kingdee → MES | Depends on S06, S03, S05 |
| S18 | Supplier_modify | Kingdee → MES | Staggered from inserts |
| S19 | Material_modify | Kingdee → MES | Staggered from inserts |
| S20 | Warehouse_modify | Kingdee → MES | Staggered from inserts |
| S21 | Customer_modify | Kingdee → MES | Staggered from inserts |
| S22 | Unit_modify | Kingdee → MES | Staggered 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
- 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.
- 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.
- 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.
- 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.
- 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.