Kingdee Cloud Skylus Material Query API Field Handbook: An Authoritative Tutorial from executeBillQuery to Qeasy Implementation
What This API Solves
In supply-chain integration, material master data is the foundation for every sales order, purchase order, inventory transaction, and production document. Kingdee Cloud Skylus's executeBillQuery API (FormId BD_MATERIAL) allows us to pull material records incrementally by modification time and filtered by using organization, with pagination. It serves both as the entry point for the initial bulk sync of materials to edge systems (e-commerce/ERP) and as a "license keep-alive" strategy—periodically waking the Kingdee API connection to prevent license expiration.
API Capability Overview
- Authentication: Kingdee Cloud Skylus API pass (AppId + AppSecret + tenant identifier), centrally managed via Qeasy credential vault.
- Request structure:
FormId=BD_MATERIAL,FieldKeys(passed in as a field list),FilterString(organization + incremental conditions),Limit(default 2000),StartRow(pagination cursor). - Pagination mode: Offset-based pagination using
StartRow+Limit. Loop calls are required until the returned row count is less thanLimit. - Incremental mode:
FModifyDate>='{{LAST_SYNC_TIME|datetime}}'. Qeasy scheduler persists the last successful timestamp and injects it automatically. - Response structure: Two-dimensional table + metadata.
idcomes fromFMasterId,numbercomes fromFNumber, and other fields are returned as flat columns.
Typical Field Mapping
| Field Name | Type | Meaning | Field Notes |
|---|---|---|---|
| FMasterId | string | Material primary key (id) | The unique anchor for cross-system mapping. Qeasy's field mapper automatically binds it to the target-side ID. |
| FNumber | string | Material code (number) | When mapping to Guanyi Cloud item codes, watch for case sensitivity and leading/trailing spaces. |
| FName | string | Material name | Used for display only; do not treat it as a deduplication key. |
| FSpecification | string | Specification model | For multi-spec items, consider concatenating "name+spec" for display. |
| FBaseUnitId_FNumber | string | Base unit code | Related-field format FBaseUnitId.FNumber. Qeasy automatically expands the underscore notation. |
| FUseOrgId_FNumber | string | Using organization code | Multi-org customers must constrain this in FilterString, or you'll pull data for the entire group and risk OOM. |
| FErpClsID | string | Material attribute | Distinguishes finished goods / semi-finished / raw materials; critical for downstream BOM explosion. |
| FIsSale / FIsPurchase / FIsProduce | string | Business switches | Control which business flows a material can participate in. Preserve them when syncing downstream. |
| FForbidStatus | string | Forbid status | Forbidden materials should be filtered or flagged; otherwise downstream documents will pick up invalid items. |
| FBARCODE | string | Barcode | Directly interfaces with WMS/PDA scanning scenarios. |
| FDefaultVendor_FNumber | string | Default vendor code | Auto-populated on purchase documents. Watch for consistency between vendor org and purchase org. |
| FSafeStock / FMinQty / FMaxQty | string | Inventory & batch qty | Used for MRP calculation. Numeric type conversion is required before writing. |
| FIsBatchManage / FIsKFPeriod / FIsSNManage | string | Batch / shelf life / serial | High-frequency fields in F&B and electronics; determine inventory dimension complexity. |
| FSalePrice_CMK / FVIPPrice_CMK / FPurPrice_CMK | string | Retail / VIP / purchase price | The _CMK suffix typically denotes a price type; organization-level pricing policies vary widely. |
| FModifyDate | datetime | Modification time | The core filter field for incremental sync. Timestamps must include a time zone. |
How to Configure on Qeasy
On the Qeasy Data Integration Platform, Kingdee Cloud Skylus material queries are typically built using an adapter + field mapper combo:
- Source adapter: Select "Kingdee Cloud Skylus - executeBillQuery" and fill in credentials and tenant identifier.
- Query template:
FormIdis fixed asBD_MATERIAL.FieldKeyscan directly reference Qeasy's built-in "Material Field List" to avoid manual typos. - Incremental variable: Insert
{{LAST_SYNC_TIME}}intoFilterString. Qeasy scheduler automatically injects the last successful timestamp—no manual maintenance required. - Paginator: The platform defaults to looping with
Limit=2000until an empty result set is returned, then automatically merges downstream. - Field mapper: Left side is Kingdee fields, right side is target system fields (e.g., Guanyi Cloud items). The platform supports "auto-expand underscores" and "auto-bind metadata.id/number", so almost no scripting is needed.
- Target write: For this kind of "license keep-alive" strategy, the Target is usually configured as a "no-op write" that only triggers the query to keep the license active.
Cross-Solution Practical Highlights
- FilterString must include using organization: In real scenarios, multi-org customers that don't filter will see hundreds of thousands of rows in a single call, stressing both Qeasy memory and the Kingdee server.
- Incremental timestamps must be ISO8601 with time zone: Kingdee's
FModifyDatecarries a time zone. Qeasy scheduler auto-aligns, but cross-region customers should explicitly tag+08:00. - Pagination cursor uses StartRow, not page numbers: Kingdee pagination is offset-based. Qeasy paginator maintains an accumulating
StartRowto avoid missing or duplicating rows. - Map primary key and code separately: In metadata,
id/numbermust strictly correspond toFMasterId/FNumber, otherwise downstream inserts will fail on unique constraints. - Pass through business switch fields: Don't drop
FIsSale,FIsPurchase, etc. in the middle layer, or sales/purchase sync will be rejected for material type mismatch. - Configure license keep-alive as a separate strategy: Run the no-op write query on its own schedule (e.g., every 5 minutes) to avoid contending with real sync tasks for license slots.
Pitfall Retrospective
- Pitfall 1: Forgot to constrain
FUseOrgId, blew up memory. A retail enterprise's first sync omitted the org filter and pulled 800k rows in a single shot, causing the Qeasy node to OOM. The safe approach is to make using-organization filter the very first condition inFilterString. - Pitfall 2: Used the wrong pagination variable. Kingdee's pagination parameter is
StartRow, notPageIndex. WritingPageNuminstead ofStartRowtraps the loop on the first page. - Pitfall 3: Mapped
idfield toFNumber. Metadataidmust bind toFMasterId; otherwise all downstream UPSERTs fail. - Pitfall 4: Incremental time used local time. When the node time zone differs from the Kingdee server, the incremental window shifts by hours. Qeasy scheduler injecting UTC+8 uniformly avoids this.
- Pitfall 5: Forbidden materials flowed downstream.
FForbidStatus='B'means forbidden. Not filtering causes sales orders to error out. The safe approach is to add a filter node in Qeasy's field mapper.
When to Use
Applicable scenarios: Kingdee Cloud Skylus is the ERP backbone, and you need to sync material master data to e-commerce / WMS / MES, or periodically keep the Kingdee API license alive. Boundaries: When material volume exceeds tens of millions and real-time sync is required, switch to direct database connection + binlog. If you only need queries without writes, use the "no-op write" mode directly as a license keep-alive.