Kingdee Cloud Delivery Notice executeBillQuery API Field Handbook & Tutorial
What This API Solves
The Delivery Notice in Kingdee Cloud is a pivotal document in the sales supply chain, recording customer, material, warehouse, and carrier information for planned shipments. By paginating SAL_DELIVERYNOTICE via the executeBillQuery WebAPI, you can pre-sync shipment plans, pull logistics/carrier data, trace sales orders back to delivery notices, and reconcile with downstream systems such as WDT. This is a read-only integration pattern.
API Capability Overview
- Authentication: Kingdee Cloud WebAPI standard signature. Typically
dbId/userName/password/appId/appSecretare exchanged for aSessionTokenvia the login API; the token is then carried on subsequent calls. - HTTP Method: POST with
Content-Type: application/json. - Form ID:
SAL_DELIVERYNOTICE(Delivery Notice). - Key Request Parameters:
FormId,FieldKeys(field whitelist),FilterString(filter conditions; supports incremental patterns likeFApproveDate>='{{LAST_SYNC_TIME|datetime}}'),Limit,StartRow,TopRowCount. - Response Structure: JSON wrapping a two-dimensional array, typically
Result->ResultData->[0]->[1]returning row-by-row values, parsed againstFieldKeys. - Pagination: Offset-based via
StartRow + Limit; no native cursor. Incremental pattern is keyed onFApproveDate(approval date). Scheduled jobs usually run every 3 minutes during business hours via crontab1-59/3 7-23 * * *.
Typical Field Mappings
| Field | Type | Meaning | Practical Notes |
|---|---|---|---|
| FID | string | Header primary key | Use as delivery_notice_header_id for cross-system mapping. |
| FEntity_FEntryID | string | Line primary key | Configured as metadata id; used for line-level idempotency and incremental sync. |
| FBillNo | string | Document number | Configured as metadata number; the business-side handle for reconciliation. |
| FBillTypeID | string | Document type code | Distinguishes standard delivery notices from other business types; can be added to FilterString. |
| FCustomerID | string | Customer code | Pull FCustomerID_FName together to avoid a later lookup against the customer master. |
| FMaterialID | string | Material code | Coexists with FCustMatID (customer material code); pick one consistently for cross-system joins. |
| FStockID | string | Issue warehouse code | Map to warehouse_code for cross-system use. |
| FUnitID / FBaseUnitID | string | Sales unit / base unit | Dual units appear side by side; quantity reconciliation must respect unit conversion. |
| FQty / FBaseUnitQty | string | Sales qty / base qty | Core shipment quantities; never mix units. |
| FOrderNo / FSrcBillNo | string | Order no. / source bill no. | Link to sales orders for shipment traceability. |
| FSOEntryId | string | Sales order entry inner id | More stable than order number for joining order lines. |
| FPrice / FTaxPrice / FBillAllAmount | string | Unit price / tax-inclusive unit price / amount with tax | Be explicit about tax inclusion; lock the convention before reconciliation. |
| FCarrierID / FCarriageNO | string | Carrier code / tracking number | The entry point for logistics callbacks; keep them as dedicated columns. |
| FApproveDate | string | Approval timestamp | The incremental field; the filter must reference it with a Kingdee-accepted date format. |
| FRowType / FParentRowId / FParentMatId | string | Product type / parent row id / parent material | Required for BOM/kits scenarios; do not count child lines as parent shipments. |
| F_YSZS_Assistant_apv / apv_tzk / apv_ca9 | string | Province / City / District (custom) | Used to split the receiver address; must be pre-registered in metadata. |
How to Configure on Qeasy
- Adapter Selection: Qeasy Data Integration Platform ships a ready-made adapter for Kingdee Cloud's
executeBillQuery— pick "Kingdee Cloud - Bill Query" and skip writing an HTTP client. - Field Mapper: In Qeasy, the field whitelist (mapped to
FieldKeys) is generated through a visual picker. The mapper automatically marksFIDas the header key,FEntity_FEntryIDas the line key, and pre-applies Kingdee-to-generic naming (e.g.,delivery_notice_header_id,delivery_notice_line_id,source_sales_order_no), reducing naming divergence across systems. - Incremental Strategy: Qeasy defaults to an
FApproveDatecursor. The templateFApproveDate>='{{LAST_SYNC_TIME|datetime}}'can be reused directly; the platform automatically toggles between the initial full pull and subsequent increments based onLAST_SYNC_TIME. - Scheduling: Qeasy's scheduler accepts crontab expressions, so
1-59/3 7-23 * * *is configured right in the strategy panel — no external scheduler required. - Target Side: This strategy is "write to null" (
Target=null), i.e., pure query. In Qeasy, the result typically lands in an intermediate table for downstream strategies to consume.
Cross-Scenario Practical Points
- Persist both header and line keys together:
FIDplusFEntity_FEntryIDare jointly required to uniquely identify a row. Losing either breaks line-level idempotency. FilterStringis the linchpin of pagination correctness: Filtering only by document date misses late approvals; a safe practice is to filter byFApproveDateand add a time offset in the Qeasy incremental cursor to avoid drift.- Lock the convention for dual-unit quantities and tax-inclusive prices:
FQtyvsFBaseUnitQtyand tax-inclusive vs tax-exclusive prices coexist. Define the writing convention before reconciliation, or reconciliation gaps will keep coming back. - Recognize parent/child rows in BOM/kits: Use
FRowType,FParentRowId, andFParentMatIdtogether to filter out child lines before aggregating shipment quantities — otherwise child items get double-counted. - Carrier and tracking number are the gateway to logistics linkage: If you later need to push delivery-notice status back to a logistics system, store
FCarrierIDandFCarriageNOas dedicated fields from day one rather than hiding them in notes. - Pre-register Kingdee custom fields: For example, the
F_YSZS_Assistant_apvprovince/city/district fields. If they are not published on the Kingdee side, selecting them inFieldKeyscauses the query to fail outright.
Troubleshooting Recap
- Wrong incremental field causes repeated full reloads: Some teams mistakenly use
FDate(business date), but late approvals cause the incremental cursor to miss records and trigger a full reload, hammering the API. The safe practice is to useFApproveDateonly. - Pagination overflow and misconfigured
TopRowCount: SettingTopRowCounttoo high can cause timeouts at scale — a common pitfall. Default to 2000–5000 and tune after load-testing your tenant size. FieldKeysmissing extended fields: Custom fields must first be published in Kingdee and registered in metadata, then selected inFieldKeys; otherwise the API simply does not return that column.- Confusing
FOrderNowithFSrcBillNo: Both relate to the sales order but carry different semantics —FOrderNois the textual order number on the document,FSrcBillNois the source bill's inner id. Do not match on text alone across systems. - BOM child lines not filtered, shipment quantity is double-counted: Always filter by
FRowType(parent only) before summing shipment quantities, or your outbound reconciliation will fail immediately.
When to Use
Choose this approach when you need to incrementally pull Kingdee Cloud delivery notices by approval date and reconcile them with downstream systems such as WDT for order/logistics matching. Do not use it when you need to write back to Kingdee or change document status — this strategy uses Target=null and has no write-back capability. For write-back of outbound deliveries or shipment status, configure a separate save-class strategy.