Qeasy Cloud
Get Started

Authoritative Tutorial on the Kingdee Cloud Warehouse Information Query Interface

· 许创贵· Engineering Best Practices· 38 views· 4 min read
JushuitanKingdee Cloud仓库主数据executeBillQuery聚水潭集成供应链集成轻易云

What This Interface Solves

In supply chain integration scenarios between Jushuitan and Kingdee Cloud, warehouse master data is the reference foundation for all inbound, outbound, and transfer documents. This interface directly reads Kingdee warehouse basic data (form BD_STOCK) through executeBillQuery, used for cross-system warehouse mapping, code mapping maintenance, and warehouse field validation before downstream document sync, avoiding document write failures caused by missing master data.

Interface Capability Overview

  • Authentication: Standard signature authentication for Kingdee Cloud WebAPI, typically combining app secret with user credentials.
  • Request Method: POST to executeBillQuery, with FormId fixed as BD_STOCK.
  • Request Structure: Includes FormId, FilterString, Limit (default 2000), StartRow (default 0), FieldKeys, and request/otherRequest condition blocks.
  • Response Structure: Returns a JSON array where each record is a warehouse basic data object, with FStockId as the primary key.
  • Pagination Mode: Offset-based pagination using StartRow + Limit, with default Limit=2000 per page; cycles through pages when records exceed this limit.
  • Incremental Mode: FilterString defaults to FAuditDate>='{{LAST_SYNC_TIME|dateTime}}' and FDocumentStatus='C', performing incremental sync by audit date and syncing only approved warehouses.
  • Scheduling Strategy: crontab 3-59/5 7-23 * * *, polling every 5 minutes during business hours.
  • Strategy Type: QUERY only, Target configured as a no-op, no data written downstream.

Typical Field Mapping

Field NameTypeMeaningPractical Notes
FStockIdstringUnique warehouse primary keymetadata.id maps to this field, the unique anchor for cross-system deduplication
FNumberstringWarehouse business codemetadata.number maps to this field, unique within the organization, reference for document warehouse fields
FNamestringFull warehouse nameFor manual identification, not used as primary key
FGroupstringWarehouse group codeUsed for grouping by region/type, requires combined judgment with FUseOrgId during cross-org mapping
FUseOrgIdstringUsage organizationIn multi-org architecture, filter by passing FUseOrgId.FNumber organization code
F_POKM_JSTSTOCKNUMBERstringJushuitan warehouse mapping codeCustom extension field, one-to-one cross-system warehouse mapping
F_POKM_JSTSTOCKNUMBER2stringJushuitan sub-warehouse mapping codeFine-grained sub-warehouse mapping, required for Jushuitan logical sub-warehouse scenarios

How to Configure on Qeasy

On the Qeasy data integration platform, this kind of Kingdee Cloud query interface is typically connected directly through the built-in "Kingdee Cloud adapter". During configuration, we fill FormId as BD_STOCK, map the primary key field to FStockId, and the code field to FNumber. The platform automatically constructs the executeBillQuery request and handles pagination loops.

The field mapper directly expands custom-prefix fields like F_POKM_JSTSTOCKNUMBER and F_POKM_JSTSTOCKNUMBER2 in the response into target system standard fields, without requiring additional scripting. The {{LAST_SYNC_TIME|dateTime}} in FilterString is automatically maintained by Qeasy's incremental cursor manager, requiring no manual reset between scheduled runs.

Since the strategy type is QUERY, the Target side is configured on Qeasy as a "no-op adapter", only landing data into the intermediate database for subsequent strategy consumption, without triggering write actions to downstream systems.

Cross-Scenario Practical Points

  1. Extension fields are key to cross-system integration: The custom fields F_POKM_JSTSTOCKNUMBER and F_POKM_JSTSTOCKNUMBER2 in Kingdee warehouse master data carry the actual cross-system mapping; prioritize verifying their maintenance when building mappings.
  2. Multi-org must filter by FUseOrgId.FNumber: In Kingdee's multi-org architecture, pulling without an organization condition returns warehouses across the entire group, leading to severe mapping confusion downstream.
  3. Only sync approved warehouses: FDocumentStatus='C' is a hard constraint; unapproved warehouses will be rejected when referenced in downstream documents.
  4. Incremental cursor by audit date: FAuditDate is the incremental field; do not misuse FCreateDate, otherwise new unapproved records will be missed or pulled repeatedly.
  5. Limit=2000 is the platform default: In scenarios with warehouse counts exceeding tens of thousands, always confirm pagination loops correctly, otherwise tail-end data loss is extremely hard to detect.
  6. Pure query strategy writes no target: Target=no-op, after data enters the Qeasy intermediate database, subsequent sync strategies consume it by FStockId association.

Troubleshooting Review

  1. Pitfall: Wrong incremental field causes data loss: In one integration, FAuditDate was mistakenly configured as FCreateDate, resulting in new warehouses syncing successfully initially but never entering downstream after approval, causing inventory mismatches. The reliable approach: the incremental field must align with the business state-change field; always use FAuditDate for approval scenarios.
  2. Pitfall: Missing extension fields cause null pointer exceptions: If the custom field F_POKM_JSTSTOCKNUMBER is not enabled on the Kingdee side, the field returns null in the response, causing direct errors in downstream mapping. We recommend setting default value fallbacks in the Qeasy field mapper and pre-sync log warnings.
  3. Pitfall: Pagination not looping causes warehouse truncation: When warehouse count exceeds 2000 but pagination loops are not configured, only the first page is fetched, and new warehouses fail to sync later. We recommend explicitly defining pagination parameters and enabling the "auto-paginate" toggle on Qeasy.
  4. Pitfall: Wrong hierarchy in organization filter: FUseOrgId cannot directly accept organization code; it must accept FUseOrgId.FNumber, otherwise the server-side ignores the condition.
  5. Pitfall: Unapproved warehouses being consumed: FDocumentStatus='C' is omitted from FilterString, draft-state warehouses are pushed downstream, causing subsequent inbound/outbound document write failures. We recommend configuring the approved filter as a default mandatory condition in the Qeasy request template.

When to Use This Interface

Applicable scenarios: initialization and continuous sync of warehouse master data between Jushuitan and Kingdee Cloud, as well as any cross-system document flow prerequisite that depends on warehouse code mapping. Boundaries: only applicable to Kingdee Cloud private deployment, where customers must enable custom extension fields F_POKM_JSTSTOCKNUMBER and F_POKM_JSTSTOCKNUMBER2; not suitable for lightweight ERP scenarios lacking organizational dimensions.

Original content. Please credit the source when reposting: https://www.qeasy.cloud/insights/engineering/hb-p2-363-060a

Comments