Authoritative Tutorial on Kingdee Cloud Sales Outbound Order Query Interface (Row-by-Row Mode)
What This Interface Solves
In the supply chain of retail and e-commerce enterprises, Kingdee Cloud handles financial and inventory bookkeeping, while Guanyi Cloud manages front-end orders and shipments. The critical link between them is the "Sales Outbound Order": once a shipment is completed in Guanyi, the warehouse needs to generate an outbound voucher in Kingdee, and in return, tracking numbers, shipping addresses, and outbound details must flow back to Guanyi for reconciliation. The row-by-row query mode of executeBillQuery (FormId=SAL_OUTSTOCK) is the data source for this chain, enabling downstream systems to stably pull incremental outbound data at the line-item granularity.
Interface Capabilities Overview
- Authentication: Based on username/password and data center authorization for Kingdee Cloud private deployment, using the API gateway to call
executeBillQuery. - Request Method: POST, with a fixed form ID of
SAL_OUTSTOCK(Sales Outbound Order). - Field Keys: Declared on demand via the
FieldKeyscollection, such asFEntity_FENTRYID,FCustomerID.FNumber,FMaterialID.FNumber, etc. - Filter Conditions:
FilterStringdefaults to incremental by approval date, typically written asFApproveDate>='{{LAST_SYNC_TIME|datetime}}', and can be combined with business conditions likeFBillNo,FStockOrgId.FNumber. - Pagination Parameters:
Limitcontrols the maximum number of rows per request (recommended 2000–5000),StartRowis the starting row index, andTopRowCountdefaults to 0. In Kingdee's row-by-row mode, you must paginate through all pages before moving to the next window. - Response Structure: Returns a collection of detail lines. In metadata,
idpoints toFEntity_FENTRYID,numberpoints toFBillNo,idCheck: trueenables primary key validation, andautoFillResponse: trueauto-fills response fields.
Typical Field Mappings
| Field Name | Type | Meaning | Practical Notes |
|---|---|---|---|
| FID | string | Master table ID | Only unique at master level; in row-by-row mode, deduplication relies on FEntity_FENTRYID |
| FBillNo | string | Document number | Business primary key, used for cross-system reconciliation and writeback |
| FEntity_FENTRYID | string | Line ID | The only reliable primary key in row-by-row mode, essential for deduplication |
| FBillTypeID_FNumber | string | Document type | Values like XSCKD01_SYS (Standard)/07_SYS (B2C), used to route retail vs. e-commerce logic |
| FDate / FApproveDate | string | Business/Approval date | Use FApproveDate as the incremental cursor since business date can be modified via un-approval |
| FCustomerID_FNumber | string | Customer code | Cross-system customer mapping anchor |
| FStockOrgId_FNumber / FSaleOrgId_FNumber | string | Stock/Sales organization | Must be included in multi-org scenarios, otherwise full data is pulled |
| FStockID_FNumber | string | Warehouse code | Mapped to Guanyi warehouse code |
| FMaterialID / FCustMatID_FNumber | string | Material/Customer material code | Customer material code is more commonly used in B2C scenarios |
| FMustQty / FRealQty | float | Should-ship/Actual-ship quantity | If they differ, the line should go into a discrepancy list during reconciliation |
| FPrice / FTaxPrice / FAmount / FAllAmount / FEntryTaxAmount | float | Price and tax amounts | Mixing tax-inclusive and tax-exclusive prices will cause gross margin errors |
| FCarrierID_FNumber / FCarriageNO | string | Carrier/Tracking number | Carrier for logistics writeback to Guanyi |
| FReceiverName / FReceiverMobile / FReceiverPhone / FReceiverAddress | string | Consignee info | Privacy fields require masking and permission isolation during transmission |
| FReceiverCountry / State / City / District | string | Province/City/District | Bi-directionally mapped to Kingdee address master data |
| FThirdEntryId | string | Guanyi order number | Key field for linking with Guanyi shipment details |
| F_UQRW_Text / F_UQRW_Text1 / F_352_OMSdanhao | string | Platform order/OMS number | E-commerce order tracking and after-sales traceability |
| FSHOPNUMBER / FSALECHANNEL / FVIPCODE | string | Shop/Channel/Member | Used for channel-based statistics in e-commerce scenarios |
| FDocumentStatus | string | Document status | Only process approved status to avoid dirty data |
| FGYFINDate | string | Guanyi payment arrival time | Used for payment reconciliation |
How to Configure in Qeasy Cloud
In the Qeasy Cloud data integration platform, the encapsulation of this interface is straightforward: the platform has a built-in Kingdee Cloud adapter, and you only need to fill in the private deployment's access address, account, and data center ID to get an out-of-the-box executeBillQuery call capability.
- Data Source Configuration: Select the "Kingdee Cloud" adapter, fill in the private gateway and authentication information, and the platform will automatically maintain tokens and retries.
- Metadata Mapping: In the Qeasy Cloud field mapper, point metadata
idtoFEntity_FENTRYIDandnumbertoFBillNo, and the platform will automatically enable primary key validation and response field auto-completion. - Filtering and Pagination: Use platform variables
LAST_SYNC_TIME,PAGINATION_PAGE_SIZE,PAGINATION_START_ROWto assembleFilterString, and Qeasy Cloud will iterate through all pages automatically. - Scheduling Strategy: Recommend a daytime high-frequency, nighttime pause window like
*/5 7-23 * * *, and Qeasy Cloud's scheduler will automatically handle missed-run compensation and failure alerts. - Empty Write Strategy: This interface is a pure query strategy, so configure the Target as "empty write operation", and Qeasy Cloud will skip downstream writes and only produce data streams for other strategies to subscribe.
Cross-Solution Practical Points
- Row-by-row mode must deduplicate by line primary key:
FEntity_FENTRYIDis the only unique identifier at line granularity;FIDwill appear duplicate during pagination. Never mix them up. - Choose
FApproveDaterather thanFDateas the incremental cursor:FDatecan be un-approved/modified, so usingFApproveDateensures stable incremental syncing without missing orders. - Page size should match Kingdee performance: Empirically, 2000–5000 rows per page is most stable; exceeding 10,000 easily triggers timeouts and memory pressure on the Kingdee side.
- Document type must participate in routing: B2C, retail, consignment, and VMI are completely different in financial and inventory accounting. After getting
FBillTypeID_FNumber, branch processing is recommended immediately. - Choose
FThirdEntryIdas the cross-system reconciliation anchor: It is the Guanyi order number, one-to-one mapped with shipment details, and is a natural bridge for logistics writeback and refund offsetting. - Minimize transmission of privacy fields: Fields like consignee name, mobile, and address should be trimmed on demand and masked on the landing side to avoid compliance risks.
Pitfall Review
- Using
FIDas the primary key causes duplicate imports: Row-by-row query returns a collection of detail lines, whereFIDis the same for every line, causing duplicate imports. The safe approach is to explicitly point metadataidtoFEntity_FENTRYID. FDateincremental cursor eaten by un-approval: When the business side un-approves and modifies the outbound date, incremental syncing byFDatebreaks. We later standardized onFApproveDatefor stability.- Pagination parameters exceeding bounds cause interface timeout: An aggressive configuration of 50,000 rows per page timed out directly in the Kingdee private environment. The safe approach is to keep
Limitbetween 2000–5000 and set reasonable pagination intervals. - B2C and standard outbound amounts mixed: B2C outbounds are usually tax-inclusive and settled via e-commerce, and not separating document types causes serious gross margin distortion. Be sure to branch processing after getting
FBillTypeID_FNumber. - Carrier/tracking number writeback lost:
FCarriageNOoverwrites old values after multiple logistics modifications. Writeback to Guanyi needs version control, otherwise old tracking numbers may overwrite new ones.
When to Use
Applicable scenarios: Need to sync Kingdee sales outbound data to Guanyi or other downstream systems at the line-item granularity for reconciliation, logistics writeback, and e-commerce order association. Not applicable for: Document writeback (should use save/approve interfaces), real-time single-document query (should use the document detail interface), or cross-entity multi-account-set mixed queries (requires splitting data sources).