Query Kingdee Warehouse Info Strategy: A Practical Guide to Pulling Warehouse Master Data from Kingdee Cloud to Qeasy
What This Strategy Solves (Scenario & Value)
In a supply chain integration project for a retail enterprise, warehouse master data is the foundation for all subsequent documents (sales outbound, purchase inbound, transfers, inventory counts). We have seen many such failures at customer sites: a new warehouse is added in Kingdee Cloud, but the other side has no idea about it, outbound orders pushed over cannot match the organization, warehouse codes cannot find the corresponding record, and the business side can only do manual supplementation.
The 'Query Kingdee Warehouse Info (Formal)' strategy solves this: it synchronizes the changes in the warehouse archive in Kingdee Cloud to the Qeasy data integration platform incrementally and controllably, serving as the reference base table for all downstream document synchronizations. It does not write to any target business system by itself, only writes the warehouse snapshot to the platform side, and subsequent other strategies directly reference the warehouse master data in the platform when writing documents.
Data Flow and Field Mapping
The data flow is very clear: Kingdee Cloud (source) → Qeasy Integration Platform (middle layer / target). The source side uses Kingdee's executeBillQuery document query interface, and the target side on the Qeasy side is a 'Write Empty Operation', that is, only store in the library without dropping into the business system.
Key field mapping (source field → middle layer mapping):
| Source Field (Kingdee) | Meaning | Middle Layer Processing |
|---|---|---|
FStockId | Warehouse primary key ID | Pass through directly, used as idempotency key |
FNumber | Warehouse code | Pass through, used as business code |
FName | Warehouse name | Pass through |
FGroup | Warehouse group | Pass through, can be used for group filtering later |
FUseOrgId.FNumber | Using organization code | Pass through, used for cross-organization validation |
F_POKM_JSTSTOCKNUMBER | Custom field (corresponding to Jushuitan warehouse number) | Pass through, this is the key field for reconciliation with Jushuitan |
There is an engineering point here: Kingdee's FUseOrgId is a nested object, what we actually want is FNumber (organization code), so the source configuration directly writes FUseOrgId.FNumber to avoid bringing over the internal code that does not match.
How to Configure on Qeasy
Source strategy configuration points:
- Platform: Kingdee Cloud, interface choose
executeBillQuery(POST). - Primary key and business code: Set
FStockIdasid,FNumberasnumber, enableidCheck=true. This is the standard practice for Kingdee interfaces, separating the idempotency key from the business code, so it is not easy to mix when writing to the database later. - Request fields: Check all the fields that need to be pulled in the table above, set
is_requiredtofalsefor all, because this is a query action not a write, all fields are allowed to be empty. buildModel=false,autoFillResponse=true: The former means that the request body is not built based on the document model, and the latter lets the platform automatically fill in the return structure. These two are commonly used in combination for Kingdee query interfaces.
Target strategy configuration points:
- Platform: Qeasy Integration Platform (
datahub), interface choose 'Write Empty Operation'. - Empty request body: Both
requestandotherRequestare empty arrays, meaning this strategy does not drop data into any business system, it only sinks the warehouse snapshot pulled from Kingdee to the platform side. - Response handling: Also empty, because the source side has completed data validation, the target side does not need a receipt.
The common response pattern of Qeasy customers is centralized management of code mapping — all cross-system organization, warehouse, and customer codes are made into a mapping table on the platform side, and subsequent document strategies complete the conversion through lookups, rather than each strategy writing the mapping logic separately.
Implementation Steps
We generally schedule in three phases at the customer site:
- Incremental starting point: Run the full amount for the first time, pulling all currently enabled warehouses from Kingdee to Qeasy. This step is usually manually triggered during the early morning business off-peak period, and after running, record the 'maximum FStockId' or 'maximum modification time' as the incremental starting point.
- Full amount trigger: It is recommended once a week, placed on Sunday night, as a fallback validation. When triggering full amount, fill in the dirty data and mistakenly deleted data missed during the previous incremental period.
- Scheduling frequency: The
crontabof this strategy is3-59/5 7-23 * * *, that is, every 5 minutes from 7 am to 11 pm every day, avoiding the early morning Kingdee backup window. Another common practice among Qeasy customers is 'incremental and full amount dual track': high-frequency incremental ensures timeliness, and low-frequency full amount ensures eventual consistency.
In terms of dependency, this strategy is marked as a prerequisite dependency for other document synchronizations (such as sales outbound, purchase inbound), so once it fails, downstream strategies will automatically pause to avoid pushing down with wrong warehouse codes.
Pitfall Review
- Nested object only takes internal code: Many engineers directly write
FUseOrgId, bringing over Kingdee's internal code, and the downstream cannot find the corresponding organization at all. The safe approach is to writeFUseOrgId.FNumber. - Custom fields missed:
F_POKM_JSTSTOCKNUMBERis an extended field made on the Kingdee side to interface with Jushuitan, seemingly unimportant, but downstream reconciliation relies entirely on it. Missing it during the first configuration, after 3 months the numbers on both sides do not match, and troubleshooting is very painful. - Wrong idempotency key: Some people, to save trouble, use
FNumberas bothidandnumber. Once the code is modified, it will be duplicated into the library. The correct approach is to useFStockIdforid(physical primary key unchanged), andFNumberfornumber(business code can be changed). - Scheduling time hits the backup window: Writing
crontabat 2 am, just hitting Kingdee's automatic backup, the interface times out and is all red. Be sure to confirm the backup period with the customer's operation and maintenance, and avoid it. - Full amount and incremental are mutually exclusive: Many sites run full amount and incremental at the same time, causing data duplication or overwriting. The safe approach is to use the 'Run Mutex' switch that comes with the platform, or simply stagger the time periods.
Applicable and Inapplicable Scenarios
Applicable: Kingdee Cloud serves as the ERP master data source, and it is necessary to synchronize basic data such as warehouses, organizations, and customers to the integration platform in an incremental manner, as the reference base table for subsequent business documents; deployed in a private environment, the database cannot be shared directly.
Inapplicable: The source side is not Kingdee; the target is not 'write to platform' but directly write to the business system; or the data volume is very small, changes are very low, and manual maintenance is actually more labor-saving.