Authoritative Tutorial on Kingdee Cloud Material Receiving Notice (executeBillQuery) Interface Field Manual
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 identifierFormId = 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 withFDocumentStatus='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_xxxprefix). The header primary key isFID, and the line primary key isFDetailEntity_FEntryID.
Typical Field Mappings
| Field Name | Type | Meaning | Practical Notes |
|---|---|---|---|
| FID | string | Document primary key ID | Foundation for cross-system primary key mapping and incremental cursor; must be deduplicated on storage |
| FDetailEntity_FEntryID | string | Entry primary key ID | Unique identifier for line items; configured as id in metadata |
| FBillNo | string | Document number | Configured as number in metadata; key for cross-system reconciliation |
| FSrcBillNo / FOrderBillNo | string | Source/Order document number | Links to purchase order; prefer FSrcBillNo for traceability |
| FMaterialId | string | Material code | Material master data must exist first, otherwise linkage will fail |
| FSupplierId | string | Supplier code | Key for cross-system supplier master data mapping |
| FStockOrgId / FPurOrgId | string | Receiving org / Purchase org | Must be used as filter dimensions in multi-org scenarios |
| FStockID | string | Warehouse code | Map with Wangdiantong warehouse dictionary after synchronization |
| FActlandQty | string | Actual arrival quantity | Core quantity for receiving business, reconciled against PO quantity |
| FActReceiveQty | string | Delivery/Inspection quantity | Quantity confirmed during inspection |
| FInStockQty | string | In-stock quantity | Used to track inbound progress |
| FInStockJoinQty | string | Qualified in-stock linked quantity | Linked quantity for qualified goods inbound |
| FSendBillNo | string | Delivery note number | Supplier delivery document, often used for logistics reconciliation |
| FDate | string | Receiving date | Business date, commonly used in reports |
| FApproveDate | string | Approval date | Core field for incremental cursor |
| FDocumentStatus | string | Document status | Must be 'C' (approved) to enter downstream |
| FNote / FDescription | string | Remarks | Two semantically similar fields; pick one |
| FCreatorId / FApproverId / FModifierId | string | Creator/Approver/Modifier | Commonly used for audit logs |
| FCancelStatus / FCloseStatus | string | Cancel/Close status | Determines 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
- 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
FApproveDateis monotonically increasing in standard scenarios, making it the most stable cursor. - 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. - 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~1000is the sweet spot for experience and stability. - 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.
- 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. - Use
FBillNoas 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 causedFModifyDateto roll back, resulting in missed pulls. The reliable approach is to switch toFApproveDate, 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.