Field Manual for Kingdee Cloud Sales Delivery Note Query Interface: executeBillQuery (SAL_OUTSTOCK) Practical Tutorial
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 asFormId,FieldKeys,FilterString,Limit,StartRow,TopRowCount. - Response Structure: The typical response is a nested
Result -> ResponseStatus -> Resultstructure, containingRows(a two-dimensional array mapped inFieldKeysorder) plus per-record metadatanumber(corresponding toFBillNo) andid(corresponding toFEntity_FENTRYID). - Return Granularity: Line-level. Multiple material lines on the same delivery note will be returned as multiple records, sharing the same
FIDto associate them with the parent header. - Pagination Pattern: Traditional pagination based on
Limit(page size) andStartRow(starting row index). The first pull setsTopRowCount=0to probe the total row count. - Incremental Pattern: Use a time filter such as
FApproveDate>='{{LAST_SYNC_TIME|datetime}}'inFilterStringto perform incremental sync by approval time.
Typical Field Mappings
| Field Name | Type | Meaning | Practical Notes |
|---|---|---|---|
| FBillNo | string | Document number | number in metadata; the unique business number for reconciliation |
| FEntity_FENTRYID | string | Line primary key | id in metadata; anchor for cross-system line-level reconciliation |
| FID | string | Document inner code | Shared by all lines of the same parent document; used to aggregate the document |
| FDocumentStatus | string | Document status | Distinguishes Draft/Submitted/Approved; filtering "Approved" is key |
| FDate | string | Delivery date | Business date; sometimes inconsistent with FApproveDate |
| FSaleOrgId_FNumber | string | Sales organization code | Required in multi-org scenarios; otherwise dirty data from other orgs leaks in |
| FCustomerID_FNumber / FName | string | Customer code/name | Bridge for mapping with JikeCloud customer master |
| FMaterialID_FNumber | string | Material code | Mapping must be pre-established via a master-data strategy |
| FStockID_FNumber / FName | string | Warehouse code/name | Affects inventory perspective; pay attention in multi-warehouse enterprises |
| FMustQty / FRealQty | string | Required/Actual qty | Returned as strings; convert to decimal before numeric calculations |
| FPrice / FTaxPrice | string | Unit price (tax-inclusive/exclusive) | String format; watch decimal places and precision |
| FAllAmount | string | Price-tax total | Distinguish from FAmount in tax handling |
| F_Express_tracking_number | string | Tracking number | In multi-parcel scenarios, F_Express_tracking_number2 also exists |
| F_EXPRESS_COMPANY | string | Carrier code | Map with JikeCloud carrier master on write-back |
| F_Platform_order_number | string | Platform order number | Used for e-commerce traceability |
| FEntrynote | string | Line note | Carries 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:
- Data Source: Choose
KingdeeCloud.executeBillQuery, fill in authorization info and account set (anonymized). - Interface Parameters: Hard-code
FormIdtoSAL_OUTSTOCK, pickFieldKeysas needed, andFilterStringsupports the template variable{{LAST_SYNC_TIME|datetime}}. - Pagination Settings: The platform automatically manages
LimitandStartRow. The first pull requestsTopRowCount=0to fetch the total row count. - Field Mapper: Qeasy's metadata parser automatically identifies
metadata.numberandmetadata.id, mappingFBillNoandFEntity_FENTRYIDto the business-code and primary-key fields respectively, with no manual intervention required. - 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
- 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. - Approval time is more reliable than business date:
FApproveDateis the real indicator that "the document is finalized." UsingFDatefor incremental sync easily causes missed or duplicate records. - Code fields over name fields: For cross-system integration, always use
*_FNumber/*_FNumber2style code fields for mapping;FNameis for display only. - Explicit filtering is required for multi-org/multi-account-set: Add
FSaleOrgId_FNumber='X'and account-set conditions toFilterString; otherwise delivery notes from other organizations will be pulled in — a very common pitfall in real scenarios. - String-type numbers must be coerced: Almost all Kingdee qty/price/amount fields return as
string. Convert todecimalbefore writing to the target, and watch out for empty strings vsnull. - Logistics write-back must choose tracking numbers per business rules: In multi-parcel scenarios, both
F_Express_tracking_numberandF_Express_tracking_number2exist. Define merge-or-pick rules in the downstream strategy.
Pitfall Review
- Pitfall 1: Using
FIDas the unique key. Kingdee returns line-level data, so the same delivery note yields N records sharingFID. Deduplicating onFIDloses lines in downstream reconciliation. Safe practice: useFEntity_FENTRYIDas the unique key. - Pitfall 2: Using
FDatefor incremental sync. Business date can be modified after un-approval, causing misaligned incremental windows. Safe practice: useFApproveDate, combined withFDocumentStatus='B'(Approved) as a dual filter. - Pitfall 3: Misreading types of qty/amount fields. Return values are
string, notnumber; 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_FNumberinFilterString. - Pitfall 5: Losing the second tracking number on write-back. Only
F_Express_tracking_numberwas written back, ignoring_number2. Safe practice: iterate allF_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.