Qeasy Cloud
Get Started

Field Manual for Kingdee Cloud Sales Delivery Note Query Interface: executeBillQuery (SAL_OUTSTOCK) Practical Tutorial

· 卢剑航· Engineering Best Practices· 39 views· 4 min read
吉客云Kingdee CloudexecuteBillQuery销售出库单字段手册轻易云供应链集成

What Problem This Interface Solves

In the supply chain integration between JikeCloud and Kingdee Cloud, the Sales Delivery Note is the critical document connecting "Sales Order" and "actual shipment." This interface (executeBillQuery, FormId SAL_OUTSTOCK) pulls line-level data of delivery notes from the Kingdee side, supporting scenarios such as shipment status tracking, cross-system reconciliation, and logistics tracking number write-back. It is an indispensable link in the chain of "Order → Delivery → Shipment."

Interface Capabilities Overview

  • Authentication: Kingdee Cloud standard OAuth/third-party login authorization; requires configuration of acctId, userName, password (or signing key) and the access domain.
  • Request Method: POST. The request body contains fields such as FormId, FieldKeys, FilterString, Limit, StartRow, TopRowCount.
  • Response Structure: The typical response is a nested Result -> ResponseStatus -> Result structure, containing Rows (a two-dimensional array mapped in FieldKeys order) plus per-record metadata number (corresponding to FBillNo) and id (corresponding to FEntity_FENTRYID).
  • Return Granularity: Line-level. Multiple material lines on the same delivery note will be returned as multiple records, sharing the same FID to associate them with the parent header.
  • Pagination Pattern: Traditional pagination based on Limit (page size) and StartRow (starting row index). The first pull sets TopRowCount=0 to probe the total row count.
  • Incremental Pattern: Use a time filter such as FApproveDate>='{{LAST_SYNC_TIME|datetime}}' in FilterString to perform incremental sync by approval time.

Typical Field Mappings

Field NameTypeMeaningPractical Notes
FBillNostringDocument numbernumber in metadata; the unique business number for reconciliation
FEntity_FENTRYIDstringLine primary keyid in metadata; anchor for cross-system line-level reconciliation
FIDstringDocument inner codeShared by all lines of the same parent document; used to aggregate the document
FDocumentStatusstringDocument statusDistinguishes Draft/Submitted/Approved; filtering "Approved" is key
FDatestringDelivery dateBusiness date; sometimes inconsistent with FApproveDate
FSaleOrgId_FNumberstringSales organization codeRequired in multi-org scenarios; otherwise dirty data from other orgs leaks in
FCustomerID_FNumber / FNamestringCustomer code/nameBridge for mapping with JikeCloud customer master
FMaterialID_FNumberstringMaterial codeMapping must be pre-established via a master-data strategy
FStockID_FNumber / FNamestringWarehouse code/nameAffects inventory perspective; pay attention in multi-warehouse enterprises
FMustQty / FRealQtystringRequired/Actual qtyReturned as strings; convert to decimal before numeric calculations
FPrice / FTaxPricestringUnit price (tax-inclusive/exclusive)String format; watch decimal places and precision
FAllAmountstringPrice-tax totalDistinguish from FAmount in tax handling
F_Express_tracking_numberstringTracking numberIn multi-parcel scenarios, F_Express_tracking_number2 also exists
F_EXPRESS_COMPANYstringCarrier codeMap with JikeCloud carrier master on write-back
F_Platform_order_numberstringPlatform order numberUsed for e-commerce traceability
FEntrynotestringLine noteCarries custom business information

How to Configure on Qeasy

On the Qeasy Data Integration Platform, this interface is encapsulated as a "Kingdee Cloud executeBillQuery" adapter. Configuration typically follows these steps:

  1. Data Source: Choose KingdeeCloud.executeBillQuery, fill in authorization info and account set (anonymized).
  2. Interface Parameters: Hard-code FormId to SAL_OUTSTOCK, pick FieldKeys as needed, and FilterString supports the template variable {{LAST_SYNC_TIME|datetime}}.
  3. Pagination Settings: The platform automatically manages Limit and StartRow. The first pull requests TopRowCount=0 to fetch the total row count.
  4. Field Mapper: Qeasy's metadata parser automatically identifies metadata.number and metadata.id, mapping FBillNo and FEntity_FENTRYID to the business-code and primary-key fields respectively, with no manual intervention required.
  5. Scheduling: In Qeasy's schedule panel, set 3 2 * * * (daily 02:03), consistent with the original plan, to implement incremental sync by approval time.

Cross-Plan Practical Points

  1. Line-level granularity is the default behavior: Multiple customer projects confirm "returned data is at line level." Cross-system reconciliation and shipment status write-back must all be handled line by line; do not deduplicate on FID.
  2. Approval time is more reliable than business date: FApproveDate is the real indicator that "the document is finalized." Using FDate for incremental sync easily causes missed or duplicate records.
  3. Code fields over name fields: For cross-system integration, always use *_FNumber / *_FNumber2 style code fields for mapping; FName is for display only.
  4. Explicit filtering is required for multi-org/multi-account-set: Add FSaleOrgId_FNumber='X' and account-set conditions to FilterString; otherwise delivery notes from other organizations will be pulled in — a very common pitfall in real scenarios.
  5. String-type numbers must be coerced: Almost all Kingdee qty/price/amount fields return as string. Convert to decimal before writing to the target, and watch out for empty strings vs null.
  6. Logistics write-back must choose tracking numbers per business rules: In multi-parcel scenarios, both F_Express_tracking_number and F_Express_tracking_number2 exist. Define merge-or-pick rules in the downstream strategy.

Pitfall Review

  • Pitfall 1: Using FID as the unique key. Kingdee returns line-level data, so the same delivery note yields N records sharing FID. Deduplicating on FID loses lines in downstream reconciliation. Safe practice: use FEntity_FENTRYID as the unique key.
  • Pitfall 2: Using FDate for incremental sync. Business date can be modified after un-approval, causing misaligned incremental windows. Safe practice: use FApproveDate, combined with FDocumentStatus='B' (Approved) as a dual filter.
  • Pitfall 3: Misreading types of qty/amount fields. Return values are string, not number; arithmetic operations will throw type errors. Safe practice: configure a "string→number" converter in the Qeasy field mapper.
  • Pitfall 4: Forgetting multi-org filtering. When a certain retail enterprise went live with multiple organizations, by default delivery notes from all orgs were pulled, doubling data volume and mixing in other business lines. Safe practice: explicitly constrain FSaleOrgId_FNumber in FilterString.
  • Pitfall 5: Losing the second tracking number on write-back. Only F_Express_tracking_number was written back, ignoring _number2. Safe practice: iterate all F_Express_tracking_number* fields in the downstream strategy.

When to Use It

This interface is suitable for one-way delivery data sync from Kingdee Cloud to external systems, such as JikeCloud integration, e-commerce platform logistics write-back, and BI delivery reporting. Boundary note: This interface is "query-only" and does not support writing. If you need to write external delivery notes into Kingdee, use the save/submit/audit family of interfaces and pair them with master-data mapping strategies.

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

Comments