Qeasy Cloud
Get Started

Authoritative Tutorial: Jky Assembly/Disassembly Outbound Order Query Interface Field Handbook

· Engineering Best Practices· 47 views· 5 min read

What Problem This Interface Solves

In supply chain integration scenarios between Jky and ERP systems like Kingdee Cloud Flagship Edition, assembly/disassembly outbound orders are the key vouchers connecting inventory movements with financial accounting. This interface (erp.storage.goodsdocout.v2) filters assembly/disassembly-type outbounds with a fixed inouttype=207, incrementally pulls the master and detail rows by creation time, and feeds downstream assembly/disassembly order mapping, cost and batch tracing.

Interface Capability Overview

  • Authentication: Jky Open Platform AppKey/AppSecret signature auth; AccessToken carried in request header.
  • Request structure: POST form/JSON. Core parameters: startDate, endDate, inouttype (fixed 207), pageIndex, pageSize (default 50), selelctFields (comma-joined).
  • Response structure: JSON object with data.list (master array, each carrying goodsDocDetailList) and data.total.
  • Pagination / Incremental: Paging via pageIndex/pageSize, default 50 per page; incremental cursor uses the gmtCreate window from {{LAST_SYNC_TIME}} to {{CURRENT_TIME}}.
  • Schedule: Production commonly uses 1-59/5 6-23 * * *, every 5 minutes from 06:00 to 23:00 daily.

Typical Field Mapping

FieldTypeMeaningPractical Notes
recIdstringMaster unique ID in Jkymetadata id field; anchor for cross-system reconciliation
goodsdocNostringOutbound business codemetadata number field; bridge for business references
billNostringRelated order no. (assembly/disassembly)One-to-one with Kingdee assembly order no. for idempotent dedup
inouttypestringOutbound type codeAlways pass "207"; omitting it pulls the full set
inouttypeNamestringDisplay nameUse for logs/exceptions, not as a code
gmtCreatestringCreation timeIncremental anchor; timezone +0800
redStatusstringReversal status (1 blue / 2 reversed / 9 reversal)Filter reversals downstream or write them back
financeBillStatusstringFinance status (1/11/21/25/31)Only 21/25 are bookable; add a conditional branch in the Qeasy field mapper
warehouseCode / warehouseNamestringWarehouse code / nameNames change; always use the code for cross-system mapping
companyCode / companyNamestringCompany code / nameCodes are the stable key in multi-org scenarios
vendCustomerCodestringBP codeOften null for internal assembly; tolerate null
goodsDocDetailList.recIdstringDetail row primary keyKey to idempotent write-back
goodsNo / skuId / skuBarcodestringMaterial code / SKU ID / barcodePrefer goodsNo for primary match; SKU for spec enrichment
batchNo / batchNumberstringBatch no. / batch codeCritical for shelf-life industries; never drop
quantity / unitNamestringQuantity / unitApply unit conversion in Qeasy's mapper
estPrice / estCost / estTax / taxRatestringEstimated price/cost/tax/tax rateUse with trans* series; assembly usually uses est*
transHasTaxAmount / transNoTaxAmountstringTransaction tax-included / tax-excluded amountBookable fields; cross-check with transTaxAmount
field1field5 / detailField15stringMaster / detail custom fieldsReserved for customers; Qeasy can pass through

How to Configure on Qeasy

On the Qeasy data integration platform, this interface is usually accessed via the "Jky Adapter + Query Strategy" combination:

  1. Adapter selection: Pick the built-in "Jky ERP Adapter" with erp.storage.goodsdocout.v2. Fill in AppKey/AppSecret on the auth page; the platform auto-renews the token.
  2. Request parameter wrapping: In the strategy canvas, hardcode inouttype=207. Bind startDate/endDate to Qeasy's built-in LAST_SYNC_TIME / CURRENT_TIME variables. pageSize defaults to 50; selelctFields is automatically trimmed by the platform's "Field Mapper" based on the fields actually referenced on the canvas, avoiding the overhead of pulling all columns.
  3. Field Mapper: The platform auto-flattens goodsDocDetailList into a master-detail dual-stream. Master's recId/goodsdocNo flows to the target header; detail rows' recId/goodsNo/quantity/batchNo flow to the target lines; custom field1~5 go through the passthrough channel.
  4. Dedup & idempotency: Write recId + goodsDocDetailList.recId as the idempotency key into Qeasy's "Primary Key Dedup" node to prevent duplicate writes.
  5. Target = empty write: This is a pure-query strategy; configure the target side in Qeasy as "empty write", only landing data into the staging table for downstream consumers.

Cross-Project Practical Highlights

  1. inouttype must be fixed to 207: In multiple customer projects, omitting or mis-passing this field caused the interface to mix in sales outbounds / transfer outbounds, leading to wrong document types on the Kingdee side.
  2. Incremental window keyed on gmtCreate: Don't use inOutDate (business date). Cross-month adjustments or unapproval scenarios will lose data. Qeasy's LAST_SYNC_TIME defaults to gmtCreate — safe choice.
  3. Dual anchor (primary key + doc no.) for dedup: Use recId for idempotency, goodsdocNo for business reconciliation. The same applies to detail rows: goodsDocDetailList.recId must flow to the target.
  4. Pick one of the two price sets: est* (estimated) and trans* (transaction) coexist. Assembly/disassembly typically uses est*; lock down one set in Qeasy's mapper to avoid cost volatility on the Kingdee side.
  5. Reversal & finance status linkage: redStatus=9 (reversal) must trigger a reverse write-back downstream. Documents with financeBillStatus<21 should not be used for booking — add a filter in the mapper.
  6. Pagination 50 + 5-min schedule: One round every 5 minutes, 50 per page, stable for customers with under 10k daily documents. Qeasy auto-concurrent-paginates for burst backlogs — no manual tuning needed.

Pitfall Retrospective

  1. Missing inouttype=207 mixed in sales outbounds: A retail customer's first launch did not hardcode inouttype, syncing sales outbounds into Kingdee assembly orders and generating massive wrong documents. Safe practice: hardcode inouttype as a constant in the Qeasy adapter; never expose it as a variable.
  2. Using business date as incremental key lost data: A customer used inOutDate; after an unapproval modified the business date, the next 7 days of data were all missed. Safe practice: always use gmtCreate as the incremental key — Qeasy defaults to this.
  3. Detail row primary key not passed through caused duplicate writes: The target Kingdee assembly order did not persist Jky detail recId, so subsequent re-pushes duplicated. Safe practice: always write detail recId back as a custom field on the target document.
  4. field1~5 silently trimmed by Qeasy: An early platform version dropped custom fields not referenced on the canvas, causing customer extension data loss. Safe practice: enable "passthrough unreferenced fields" in the Qeasy adapter, or explicitly list them in selelctFields.
  5. Timezone misalignment drifted the incremental window: A private deployment server was on UTC; when the +0800 business evening tick fired, trailing data was truncated. Safe practice: standardize Qeasy deployments on Asia/Shanghai and explicitly declare gmtCreate as +0800 in the adapter.

When to Use

Suitable for assembly/disassembly integration between Jky and a downstream ERP (typically Kingdee Cloud Flagship Edition) where incremental sync of inouttype=207 outbound master and detail is required. If the target side needs no write and only stock ledger reconciliation, this pure-query interface is sufficient; if writing back to Kingdee assembly/disassembly orders, pair it with downstream SYNC strategies.

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

Comments