Qeasy Cloud
Get Started

Authoritative Tutorial on Kingdee Cloud Material Receiving Notice (executeBillQuery) Interface Field Manual

· 许创贵· Engineering Best Practices· 13 views· 5 min read
WDTKingdee Cloud收料通知单executeBillQuery供应链集成轻易云字段手册

What Problem Does This Interface Solve

The Material Receiving Notice (Purchase Receive Bill) is the core document for recording supplier material arrival, inspection, and warehousing in the supply chain. In integration scenarios between Wangdiantong and Kingdee Cloud, we frequently need to pull approved receiving bills from Kingdee into the middleware in incremental fashion, for purposes such as purchase arrival reconciliation, inbound status synchronization, supplier delivery detail extraction, and traceability between purchase orders and receiving bills. This interface is a typical read-only strategy that pulls data without writing to the target system, making it suitable as an entry point for reconciliation, auditing, or data aggregation.

Interface Capability Overview

  • Authentication: Kingdee Cloud WebAPI uses session-based authentication (a SessionId is obtained via the login interface, then carried in subsequent requests via Cookie or Token).
  • Request structure: POST request to executeBillQuery, with form identifier FormId = PUR_ReceiveBill. The request body contains pagination and filter parameters.
  • Pagination parameters: Limit (page size), StartRow (starting row), TopRowCount (max rows this call), FieldKeys (fields to return), FilterString (filter expression).
  • Incremental mode: The default uses FApproveDate >= '{{LAST_SYNC_TIME}}' as the incremental cursor, combined with FDocumentStatus='C' (approved) to ensure only approved and subsequently changed documents are fetched.
  • Response structure: Array-style JSON. Each record contains both header fields and entry fields (entry fields are returned with the FDetailEntity_xxx prefix). The header primary key is FID, and the line primary key is FDetailEntity_FEntryID.

Typical Field Mappings

Field NameTypeMeaningPractical Notes
FIDstringDocument primary key IDFoundation for cross-system primary key mapping and incremental cursor; must be deduplicated on storage
FDetailEntity_FEntryIDstringEntry primary key IDUnique identifier for line items; configured as id in metadata
FBillNostringDocument numberConfigured as number in metadata; key for cross-system reconciliation
FSrcBillNo / FOrderBillNostringSource/Order document numberLinks to purchase order; prefer FSrcBillNo for traceability
FMaterialIdstringMaterial codeMaterial master data must exist first, otherwise linkage will fail
FSupplierIdstringSupplier codeKey for cross-system supplier master data mapping
FStockOrgId / FPurOrgIdstringReceiving org / Purchase orgMust be used as filter dimensions in multi-org scenarios
FStockIDstringWarehouse codeMap with Wangdiantong warehouse dictionary after synchronization
FActlandQtystringActual arrival quantityCore quantity for receiving business, reconciled against PO quantity
FActReceiveQtystringDelivery/Inspection quantityQuantity confirmed during inspection
FInStockQtystringIn-stock quantityUsed to track inbound progress
FInStockJoinQtystringQualified in-stock linked quantityLinked quantity for qualified goods inbound
FSendBillNostringDelivery note numberSupplier delivery document, often used for logistics reconciliation
FDatestringReceiving dateBusiness date, commonly used in reports
FApproveDatestringApproval dateCore field for incremental cursor
FDocumentStatusstringDocument statusMust be 'C' (approved) to enter downstream
FNote / FDescriptionstringRemarksTwo semantically similar fields; pick one
FCreatorId / FApproverId / FModifierIdstringCreator/Approver/ModifierCommonly used for audit logs
FCancelStatus / FCloseStatusstringCancel/Close statusDetermines whether the document participates in valid reconciliation

How to Configure on Qeasy Cloud

On the Qeasy Cloud Data Integration Platform, this interface is encapsulated as a "Kingdee Cloud Document Query" adapter. We only need to specify FormId = PUR_ReceiveBill in the source configuration and select the built-in executeBillQuery template. The platform will automatically generate the authentication login, pagination scheduling, and incremental cursor triad. The field mapper automatically expands Kingdee's underscore-style naming (FDetailEntity_FEntryID) into a nested structure, and we can drag it directly to target fields without writing JSONPath by hand. When the Target is configured as "Write Null Operation," the strategy functions as a pure query, and the data lands in Qeasy Cloud's resource center for downstream strategies to consume. The scheduler defaults to 1-59/3 7-23 * * *, running every 3 minutes during business hours, and can be paused off-hours to save quota.

Cross-Scenario Practical Points

  1. Use approval time as the unified incremental cursor: Across multiple customer projects we have verified that the business date (receive date) can be modified via un-approval, while FApproveDate is monotonically increasing in standard scenarios, making it the most stable cursor.
  2. Status filtering is mandatory: FDocumentStatus='C' is the baseline. Without it, draft documents pollute reconciliation data—this is where real-world scenarios most easily go wrong.
  3. Don't be greedy with page size: When Kingdee WebAPI returns more than 2000 rows at once, backend assembly time grows noticeably. In practice, Limit=500~1000 is the sweet spot for experience and stability.
  4. Master data first: If material, supplier, warehouse, and organization master data are not synchronized first, even after pulling receiving bills, mapping cannot be performed. The dependency chain "master data → business documents" must be strictly followed.
  5. Entry fields are returned with FDetailEntity_ prefix: When configuring FieldKeys on the front end, write flat field names directly; the response is flat rather than nested—this is easy to confuse with the save interface.
  6. Use FBillNo as foreign key for cross-system mapping: When matching with Wangdiantong purchase orders, prefer FBillNo over FID, since business numbers are visible on both sides and more readable.

Pitfall Review

  • Pitfall 1: Incremental missing records. One customer's incremental sync used FModifyDate, but un-approval operations caused FModifyDate to roll back, resulting in missed pulls. The reliable approach is to switch to FApproveDate, or use dual cursor comparison.
  • Pitfall 2: Draft pollution. Without status filtering, draft-status receiving bills were pulled into reconciliation reports, triggering business complaints. FDocumentStatus='C' must be hard-coded in the configuration.
  • Pitfall 3: Full-field response timeout. When FieldKeys is left empty, all fields are returned by default; when historical data reaches millions of rows, the interface times out. Always trim down to 20–40 fields based on business needs.
  • Pitfall 4: SessionId expiration. WebAPI Sessions have a short default validity period, and long-running scheduled tasks easily get disconnected midway. Qeasy Cloud's adapter has built-in automatic re-login, but self-developed scripts must remember to catch 401 and retry.
  • Pitfall 5: Multi-org data mixing. Without filtering by FStockOrgId, receiving bills from different organizations get mixed together, causing downstream warehouse mapping errors. In multi-org scenarios, the filter conditions must include the organization dimension.

When to Choose This

When you need to pull approved purchase receiving bill details from Kingdee Cloud for reconciliation, inbound status tracking, or supplier delivery analysis, and do not intend to write back to Kingdee, this is the right choice. If the business goal is to write back to Kingdee or push to a downstream ERP, you should use a save-type interface, or layer a transformation-write strategy on top of this query.

Original content. Please credit the source when reposting: https://www.qeasy.cloud/insights/engineering/hb-p2-254-340c

Comments