Qeasy Cloud
Get Started

Kingdee Cloud Delivery Notice executeBillQuery API Field Handbook & Tutorial

· Engineering Best Practices· 20 views· 5 min read

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/appSecret are exchanged for a SessionToken via 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 like FApproveDate>='{{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 against FieldKeys.
  • Pagination: Offset-based via StartRow + Limit; no native cursor. Incremental pattern is keyed on FApproveDate (approval date). Scheduled jobs usually run every 3 minutes during business hours via crontab 1-59/3 7-23 * * *.

Typical Field Mappings

FieldTypeMeaningPractical Notes
FIDstringHeader primary keyUse as delivery_notice_header_id for cross-system mapping.
FEntity_FEntryIDstringLine primary keyConfigured as metadata id; used for line-level idempotency and incremental sync.
FBillNostringDocument numberConfigured as metadata number; the business-side handle for reconciliation.
FBillTypeIDstringDocument type codeDistinguishes standard delivery notices from other business types; can be added to FilterString.
FCustomerIDstringCustomer codePull FCustomerID_FName together to avoid a later lookup against the customer master.
FMaterialIDstringMaterial codeCoexists with FCustMatID (customer material code); pick one consistently for cross-system joins.
FStockIDstringIssue warehouse codeMap to warehouse_code for cross-system use.
FUnitID / FBaseUnitIDstringSales unit / base unitDual units appear side by side; quantity reconciliation must respect unit conversion.
FQty / FBaseUnitQtystringSales qty / base qtyCore shipment quantities; never mix units.
FOrderNo / FSrcBillNostringOrder no. / source bill no.Link to sales orders for shipment traceability.
FSOEntryIdstringSales order entry inner idMore stable than order number for joining order lines.
FPrice / FTaxPrice / FBillAllAmountstringUnit price / tax-inclusive unit price / amount with taxBe explicit about tax inclusion; lock the convention before reconciliation.
FCarrierID / FCarriageNOstringCarrier code / tracking numberThe entry point for logistics callbacks; keep them as dedicated columns.
FApproveDatestringApproval timestampThe incremental field; the filter must reference it with a Kingdee-accepted date format.
FRowType / FParentRowId / FParentMatIdstringProduct type / parent row id / parent materialRequired for BOM/kits scenarios; do not count child lines as parent shipments.
F_YSZS_Assistant_apv / apv_tzk / apv_ca9stringProvince / 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 marks FID as the header key, FEntity_FEntryID as 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 FApproveDate cursor. The template FApproveDate>='{{LAST_SYNC_TIME|datetime}}' can be reused directly; the platform automatically toggles between the initial full pull and subsequent increments based on LAST_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: FID plus FEntity_FEntryID are jointly required to uniquely identify a row. Losing either breaks line-level idempotency.
  • FilterString is the linchpin of pagination correctness: Filtering only by document date misses late approvals; a safe practice is to filter by FApproveDate and add a time offset in the Qeasy incremental cursor to avoid drift.
  • Lock the convention for dual-unit quantities and tax-inclusive prices: FQty vs FBaseUnitQty and 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, and FParentMatId together 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 FCarrierID and FCarriageNO as dedicated fields from day one rather than hiding them in notes.
  • Pre-register Kingdee custom fields: For example, the F_YSZS_Assistant_apv province/city/district fields. If they are not published on the Kingdee side, selecting them in FieldKeys causes 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 use FApproveDate only.
  • Pagination overflow and misconfigured TopRowCount: Setting TopRowCount too high can cause timeouts at scale — a common pitfall. Default to 2000–5000 and tune after load-testing your tenant size.
  • FieldKeys missing extended fields: Custom fields must first be published in Kingdee and registered in metadata, then selected in FieldKeys; otherwise the API simply does not return that column.
  • Confusing FOrderNo with FSrcBillNo: Both relate to the sales order but carry different semantics — FOrderNo is the textual order number on the document, FSrcBillNo is 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.

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

Comments