Qeasy Cloud
Get Started

Authoritative Tutorial: Kingdee Cloud Other Outbound Order Query Interface Field Handbook (P2-342)

· 尹春锐· Engineering Best Practices· 8 views· 4 min read
GuanYi ERPKingdee Cloud其他出库单字段手册管易云集成Supply Chain轻易云

What This Interface Solves

In retail and e-commerce supply chain integration, the "Other Outbound Order" (covering transfers, consumptions, scrapping, sample issues, and other non-sales outbound flows) is the key voucher that bridges Kingdee Cloud ERP with front-end e-commerce and OMS systems. Using this interface, you can row-by-row pull Kingdee's outbound details and precisely reconcile and write back against Guanyi Cloud sales orders, return orders, and platform order numbers, achieving voucher-level traceability. It addresses three pain points: ① bringing non-sales outbound flows into unified reconciliation; ② linking return outbound orders with sales orders bidirectionally; ③ filtering and incrementing under multi-org and multi-owner scenarios.

Interface Capability Overview

  • Authentication: OAuth/Session auth under Kingdee Cloud private deployment. After the Qeasy adapter wraps it, only tenant and account book need to be configured; no manual token management.
  • Request Method: POST /kapi/v2/bill/query, with the underlying API being executeBillQuery.
  • FormId: Fixed as STK_MisDelivery (Other Outbound Order).
  • Request Structure: otherRequest contains five key parameters: Limit, StartRow, TopRowCount, FilterString, and FieldKeys.
  • Pagination: Traditional pagination based on Limit/StartRow. Platform variables {{PAGINATION_PAGE_SIZE}} and {{PAGINATION_START_ROW}} are auto-injected.
  • Incremental Mode: The default filter FApproveDate>='{{MINUTE_AGO_20|datetime}}' AND FStockDirect='GENERAL' rolls by approval date and pins the inventory direction. A cron schedule */6 * * * * pulls every 6 minutes.
  • Response Structure: Row-by-row response. FID is the master key, FEntity_FEntryID is the line key, and FBillNo is the business document number. autoFillResponse:true lets the platform auto-fill.

Typical Field Mappings

FieldTypeMeaningHands-on Notes
FIDstringUnique master ID of the outbound orderMaster key, anchor for cross-system reconciliation
FEntity_FEntryIDstringDetail line master keyDeclared as id in metadata; core for row-level deduplication
FBillNostringDocument numberDeclared as number in metadata; first choice for business reconciliation
FBillTypeID_FNumberstringDocument type codeContains XSCKD01_SYS~XSCKD08_SYS; differentiate carefully
FDatestringBusiness dateDifferent from approval date FApproveDate; use the latter for increments
FStockDirectstringInventory directionDefault GENERAL; pinned in the filter
FOwnerIdHead / FOwnerTypeIdHeadstringOwner code / typeMandatory in multi-owner scenarios
F_UQRW_BasestringOutbound warehouse codeKey for warehouse mapping with Guanyi
FMaterialIdstringMaterial codeUse nested form FMaterialId.FNumber to fetch
FStockOrgId / FPickOrgIdstringStock org / Pick orgUsed for data isolation in multi-org environments
F_UQRW_SONOstringGuanyi sales order numberLinks to sales delivery
F_UQRW_THDHstringGuanyi return order numberRequired for return outbound scenarios
F_352_pingtaidanhaostringPlatform order numberAnchor for e-commerce order tracing
F_UQRW_TextstringSales delivery numberLinks to the sales delivery
F_UQRW_BaseProperty / F_UQRW_BaseProperty1stringMaterial / warehouse external codeBridges cross-system coding

How to Configure on Qeasy

On the Qeasy Data Integration platform, this interface is wrapped as a "Kingdee Cloud Query Adapter."

  1. Select the data source: Source = Kingdee Cloud; target left empty (Target = null write; pure query strategy).
  2. Configure FormId: Enter STK_MisDelivery in the adapter form; the platform auto-loads field metadata.
  3. Set the filter: In FilterString, write FApproveDate>='{{MINUTE_AGO_20|datetime}}' AND FStockDirect='GENERAL'; platform variables auto-compute by execution time.
  4. Configure pagination: Limit = {{PAGINATION_PAGE_SIZE}} (default 2000); StartRow = {{PAGINATION_START_ROW}}. Qeasy's field mapper auto-maintains the cursor.
  5. Declare metadata: In metadata.json, declare number=FBillNo, id=FEntity_FEntryID, idCheck=true, autoFillResponse=true.
  6. Schedule: Cron */6 * * * *, with an incremental window of MINUTE_AGO_20 to absorb a 20-minute approval lag.

Cross-Project Best Practices

  1. Row-by-row vs order-by-order: Row-level granularity is finer and fits multi-line returns or combo outbound, but data volume expands 5–10x; always assess storage and downstream consumer capacity.
  2. Approval date beats business date: Incremental field must be FApproveDate, not FDate, otherwise orders will be missed.
  3. Inventory direction filter is mandatory: FStockDirect='GENERAL' is a hard Kingdee business rule; omitting it lets transfer and consignment noise leak in.
  4. Business document number is the cross-system anchor: In Qeasy's field mapper, prefer FBillNo as the idempotency key rather than FID, because business users reconcile by document number.
  5. Multi-org isolation: When the customer runs multiple stock orgs, append FStockOrgId IN (...) to FilterString; otherwise data from the wrong org will leak in.
  6. External codes first: Guanyi's material and warehouse codes usually live in F_UQRW_BaseProperty*. Mapping via those fields is more direct and stable than using FMaterialId.FNumber.

Pitfall Recap

  • Pitfall 1 — Incremental "missed orders": Using FDate as the incremental window causes orders with delayed approval to be skipped. The safe approach is to uniformly use FApproveDate and keep the MINUTE_AGO_20 lag buffer.
  • Pitfall 2 — Misreading document type codes: XSCKD01_SYS through XSCKD08_SYS have overlapping meanings (standard outbound appears multiple times); filtering by string prefix is error-prone. Maintain an explicit enum table in Qeasy's field mapper.
  • Pitfall 3 — Wrong nested field access: FMaterialId is an object; you must write FMaterialId.FNumber to fetch the code. Qeasy's field mapper auto-expands nested fields, but hand-written scripts need care.
  • Pitfall 4 — Cursor not advancing: Hard-coding StartRow causes an infinite pagination loop — this is where things blow up. Always use the platform variable {{PAGINATION_START_ROW}}.
  • Pitfall 5 — Return-scenario mismatch: Return outbound orders must carry F_UQRW_THDH. If Guanyi's return order is approved before Kingdee's outbound, you get "orphan" records; add fault-tolerant linking on the downstream side.

When to Use

Suitable for: Guanyi/OMS to Kingdee Cloud supply chain integration that needs row-level outbound detail for reconciliation, return linking, platform order matching, and filtering by inventory direction and org dimension in pure-query scenarios. Not suitable for: real-time push (sub-second latency), write-back into Kingdee, or non-STK_MisDelivery documents such as sales outbound orders or transfer orders.

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

Comments