Kingdee Sales Outbound Order executeBillQuery Interface Field Manual & Cross-Scenario Tutorial
What Problem Does This Interface Solve
The Kingdee Cloud "Sales Outbound Order executeBillQuery" interface is used to batch-pull outbound delivery data based on business conditions. The typical scenario is reconciling orders from e-commerce/Jushuitan with outbound orders in Kingdee, tracking the to-be-confirmed receipt status, and providing a data source for subsequent status write-back. It solves the "can't find, can't find accurately, can't find completely" problem in cross-system outbound order synchronization and is the core query entry point for the Jushuitan ↔ Kingdee supply chain integration.
Interface Capability Overview
- Authentication: Kingdee Cloud's standard OAuth/account-set authorization, requiring parameters such as
acctId,appId,appSecret; the request header must carry a token. - Request Method:
POST, API isexecuteBillQuery, FormId is fixed asSAL_OUTSTOCK(Sales Outbound Order). - Request Body: Based on the
otherRequeststructure, with core parameters includingFormId,FieldKeys,FilterString,Limit,StartRow,TopRowCount. - Response Structure: Returns a
Resultarray, with each row containing key-value pairs of the requested fields; withautoFillResponse:truein metadata, the system auto-fills response fields. - Pagination/Incremental Mode: Pagination is implemented via
StartRow+Limit(Limitdefaults to 10000). There is no built-in incremental field; typically FDate or the receipt confirmation date is used as a soft incremental cursor. - Filter Logic: Default
F_QKMS_QRSHRQ is null and FCreatorId.FName='传单专用' and FThirdBillNo <> '', i.e., "to-be-confirmed receipt + created by transmission-dedicated account + internal order number non-empty".
Typical Field Mapping
| Field Name | Type | Meaning | Practical Notes |
|---|---|---|---|
| FBillNo | string | Document number, business primary key | Both number and id in metadata point to it; the anchor for cross-system reconciliation |
| FID | string | Master table unique ID, system primary key | Used for precise query and deduplication; should not be used as a business number |
| FThirdBillNo | int/string | Internal order number (Jushuitan order number / platform order number) | Filter requires non-empty; type compatibility must be confirmed, see pitfalls below |
| FCreatorId | object | Creator (including FName and other sub-properties) | Use FCreatorId.FName='传单专用' in filter to lock the source |
| F_QKMS_QRSHRQ | string | Receipt confirmation date (extended field) | Empty = to-be-confirmed, the key trigger for status write-back |
| FSALECHANNEL | string | Online order number (extended mapping) | Meaning varies slightly across customer scenarios, refer to metadata |
| FDate | string | Outbound document business date | Used for time range filtering and reconciliation, often as the incremental cursor |
In Qeasy, the field mapper automatically flattens FCreatorId.FName into a flat field, eliminating the need to write nested parsing scripts; meanwhile, the platform provides type-tolerant handling for FThirdBillNo, but it is still recommended to standardize as string at the source.
How to Configure on Qeasy
- Adapter Selection: Qeasy has a built-in Kingdee Cloud
executeBillQueryadapter; select FormIdSAL_OUTSTOCK, and the platform auto-generates the request skeleton and paginator. - Metadata Configuration: Set both
numberandidto FBillNo, enableidCheck:truefor primary key validation,buildModel:trueto build the data model. - Filter Conditions: Write directly in Qeasy's "Filter Expression":
F_QKMS_QRSHRQ is null and FCreatorId.FName='传单专用' and FThirdBillNo <> '', the platform will assemble it intoFilterString. - Field Mapper: Drag the fields listed in
FieldKeysinto the mapping panel; Qeasy's field mapper auto-builds the source→target field table; selecting "Write Empty Operation" on the Target side makes it a pure query strategy. - Scheduling: The cron task is written as
1-59/30 7-23 * * *, executing every 30 minutes between 7–23 o'clock; Qeasy's scheduler triggers automatically per this cron.
Cross-Scenario Practical Points
- Prefer FBillNo as the business primary key:
FIDis the system primary key and unreliable for cross-system reconciliation; FBillNo is unique and stable on the Kingdee side. - Filter Condition Trio: "To-be-confirmed receipt + transmission-dedicated + internal order number non-empty" is the minimum set verified by multiple customers; missing any one will pull dirty data.
- Incremental Cursor: FDate vs. Receipt Confirmation Date: Use FDate as soft incremental for high-frequency polling; use
F_QKMS_QRSHRQtransitioning from empty to non-empty for event-driven. - Don't guess the pagination size: The default
Limit=10000is the stable upper limit on most Kingdee instances; exceeding it triggers interface truncation or timeout. - Type compatibility must be solved at the source:
FThirdBillNois int in the source config, but Jushuitan order numbers often contain letters; do type conversion before integration. - Target Configuration for Pure Query Strategies: Select "Write Empty Operation" for Target, meaning this strategy only pulls data, and subsequent write-back actions are handled by downstream strategies.
Pitfall Retrospective
- Pitfall 1: Inconsistent FThirdBillNo Type. Source configured as int, but the actual order number contains letters, the interface errors out directly or returns null. The safe approach is to uniformly handle as string at the source, or force type conversion in Qeasy's field mapper.
- Pitfall 2: Filter Condition Missing FCreatorId. Only writing "receipt confirmation date is empty" will pull outbound orders from all channels, making them un-linkable on the Jushuitan side. Be sure to add
FCreatorId.FName='传单专用'to the filter. - Pitfall 3: Treating FID as the Business Number for Reconciliation. FID is the database primary key and changes across account sets or organizations; reconciliation must use FBillNo.
- Pitfall 4: Pagination Out-of-Bounds. When
Limitexceeds 10000, Kingdee silently truncates, and the data appears complete but loses the tail. Qeasy's paginator has built-in safety limits, but you still need to be careful with custom scripts. - Pitfall 5: Scheduling Window Missing Night Orders. The cron
7-23misses early-morning orders, which is easy to flip over when adding new strategies; if the business spans overnight, the safe approach is to expand the window to0-23or split into two segments.
When to Use
This interface is suitable for medium-to-large retail enterprises where "Kingdee creates orders and Jushuitan handles orders," requiring batch querying of sales outbound orders by business conditions and reconciling with upstream orders or writing back statuses. Boundary: it is query-only and does not handle writes; if writing into Kingdee, switch to save/submit-type interfaces; if real-time push is needed, pair with a message middleware rather than pure polling.