Authoritative Tutorial on the Kingdee Material Query Interface: Aggregated Field Manual Across Integration Scenarios
What This Interface Solves
In supply chain integration, material master data is the foundation of every downstream flow—purchasing, sales, inventory. We need to continuously and reliably synchronize Kingdee Cloud materials to external systems (Guanyi products, 聚水潭 products, etc.) for code mapping, document line material mapping, and price/inventory retrieval. This interface acts as a "unified material exit" from Kingdee: a single query strategy supports multiple downstream consumers, avoiding repeated polling.
Interface Capability Overview
- Authentication: Kingdee Cloud WebAPI (AppId + AppSecret + AcctID), pre-configured in the connector.
- API:
executeBillQuery, HTTP POST, QUERY semantics (read-only). - FormId: fixed as
BD_MATERIAL(material master). - Request parameters:
FieldKeys(field whitelist),FormId,FilterString(filter condition),Limit(default 2000),StartRow(pagination start, typically{{PAGINATION_START_ROW}}),TopRowCount(default 0 means return total count). - Response structure: JSON array; each row contains fields specified by
FieldKeys; system auto-fills metadata fields likeFMasterId,FNumber. - Pagination and incremental: based on
Limit + StartRow; incremental sync depends onFilterString, typicallyFModifyDate>='{{LAST_SYNC_TIME|dateTime}}'. - Schedules: two common rhythms —
*/5 7-23 * * *(high-frequency, every 5 minutes) and*/10 8-21 * * *(business hours, every 10 minutes), chosen based on data volume and downstream capacity. - Target: configured as "WriteEmpty"—a pure query strategy whose output is consumed by downstream strategies.
Typical Field Mappings
| Field Name | Type | Meaning | Practical Notes |
|---|---|---|---|
| FMasterId | string | Material primary key, unique within Kingdee | Must bind to metadata.id; preferred for cross-system linkage |
| FNumber | string | Material code, business unique code | Binds to metadata.number; primary matching key for Guanyi/聚水潭 products |
| FName | string | Material name | Used for display and manual identification |
| FSpecification | string | Specification model | Combined with code for precise matching |
| FOldNumber | string | Legacy material code | Compatibility field during migration; usually empty in new scenarios |
| FBaseUnitId_FNumber | string | Base unit code | Basic unit must be calibrated before unit conversion |
| FMaterialGroup_FNumber | string | Material group code | Required query condition; often used for batch retrieval by group |
| FErpClsID | string | Material property (finished/semi-finished/raw material, etc.) | Required query condition; affects downstream business routing |
| FCreateOrgId_FNumber / FUseOrgId_FNumber | string | Create org / Use org code | Required; used for data isolation in multi-org Kingdee |
| FStockId_FNumber | string | Default warehouse code | Defaults into inbound/outbound documents |
| FCategoryID | string | Inventory category | Required; affects inventory and accounting categorization |
| FForbidStatus | string | Forbidden status | Downstream must filter; forbidden materials are unavailable |
| FDocumentStatus | string | Data status (approved/draft) | Only consume approved data |
| FBARCODE | string | Barcode | Key matching field in e-commerce scenarios |
| FMnemonicCode | string | Mnemonic code | Quick search auxiliary key |
| FIsPurchase / FIsSale / FIsProduce / FIsSubContract | string | Business attribute switches | Determine the available business scope downstream |
| FIsBatchManage / FIsKFPeriod / FIsSNManage | string | Batch/expiry/serial management | Determine whether downstream documents carry corresponding line fields |
| FExpPeriod | string | Expiry period (days) | Required for food/pharmaceutical industries |
| FProduceBillType_FNumber / FPOBillTypeId_FNumber / FSubBillType_FNumber | string | Production/Purchase/Subcontract doc type code | Basis for document type routing |
| FPurPrice_CMK | string | Purchase price (base currency) | Required for price synchronization scenarios |
| FTaxRateId / FTaxRateId_FTaxRate | string | Tax rate code / Tax rate value | Required when tax calculation is involved |
| F_UQRW_Text | string | External code (extension field) | Bridge for cross-system mapping; often stores Guanyi product code |
| F_PAEZ_Base2 | string | Wangdiantong/e-commerce inventory org code | Dedicated field linking 聚水潭/Wangdiantong in e-commerce |
| FModifyDate | string | Modification date | Source field for incremental sync watermark |
How to Configure on Qeasy
In the Qeasy Data Integration Platform, this interface is typically encapsulated as a visual data source via the "Kingdee Cloud Query Adapter":
- Connector: fill in Kingdee App ID/Secret, account code, internal domain (for private deployment); supports private gateway proxy.
- Data Source (Strategy Source): select adapter
kingdee.executeBillQuery, choose FormIdBD_MATERIAL. - Field Mapper: the platform auto-reads the response structure and generates the default
FieldKeyslist; Qeasy's field mapper supports visual field selection/deselection, and automatically injectsFMasterIdintoidandFNumberintonumber. - Filter and Pagination: reuse
{{LAST_SYNC_TIME|dateTime}}for the FilterString template; bindStartRowto{{PAGINATION_START_ROW}}. - Metadata: write
metadata.id = FMasterId,metadata.number = FNumber,idCheck = false,autoFillResponse = trueinto source metadata so downstream write strategies can consume with zero cost. - Target: select "WriteEmpty" to mark this strategy as query-only, no target writes.
- Schedule: paste
*/5 7-23 * * *or*/10 8-21 * * *in the strategy schedule.
Cross-Scenario Practical Points
- Separate query and write strategies: across multiple client projects, we always isolate "Kingdee material query" as an independent strategy with empty target; downstream consumers subscribe on demand, avoiding repeated Kingdee calls.
- Encapsulate required fields uniformly: required conditions like
FMaterialGroup_FNumber,FErpClsID,FCategoryID,FUseOrgId_FNumbershould be pre-bound in Qeasy's default parameter set to minimize script errors. - FilterString as incremental watermark: the stable approach is using
FModifyDateas the incremental key and maintainingLAST_SYNC_TIMEstate in Qeasy; for historical backfill, switch to conditional retrieval instead of relying on incremental. - Multi-org isolation first: under Kingdee's multi-org architecture, always pass
FUseOrgId_FNumberas a query condition to prevent cross-org data leakage. - Cross-system primary matching key selection: in B2C scenarios (Guanyi/聚水潭), prefer
FNumber; for legacy system migration, useFOldNumberas fallback; the extension fieldF_UQRW_Textsuits idempotent linkage code. - E-commerce extension fields must be aligned:
F_PAEZ_Base2,FBARCODE,FMnemonicCodevary across clients; in Qeasy's field mapper, they should be selected per target system.
Pitfall Retrospective
- Missing required fields yield 0 rows instead of errors: when any required condition like
FUseOrgId_FNumberorFErpClsIDis missing in FilterString, Kingdee returns an empty set rather than an error, which is easy to misdiagnose. The stable approach is putting them into Qeasy's default parameters to avoid script-level omission. Limitand pagination boundaries: 2000 seems enough, but with materials exceeding tens of thousands, multiple round trips occur; ifStartRowis not taken from{{PAGINATION_START_ROW}}, you'll fall into infinite loops or miss pages. Always use the platform pagination variable.- Cost of
idCheck = false: without primary key validation, if upstream renames fields or returns empty, platform deduplication will fail. Acceptable short-term, but enable it explicitly in production. - Time-zone drift on incremental field: when
FModifyDateandLAST_SYNC_TIMEtimezones differ, data loss or duplication occurs. In real scenarios, we align via UTC offset or Kingdee server timezone. - E-commerce extension fields vary across clients:
F_PAEZ_Base2,F_UQRW_Textare private extensions in some retail enterprises; when migrating to other clients, field mapping must be redone. Qeasy's field mapper supports one-click renaming—don't hardcode.
When to Choose
Choose this interface when business involves distributing Kingdee Cloud material master data externally (e-commerce, product/warehouse mapping, sales-outbound/purchase-inbound document mapping) with high-frequency incremental sync. Boundary: for one-time initialization, switch to full export; for millisecond-level real-time requirements, use Kingdee database CDC instead of WebAPI polling.