Qeasy Cloud
Get Started

Syncing Kingdee Miscellaneous Stock-In to Jky: A Practical Configuration Tutorial with Qeasy

· 尹春锐· Integration Solutions· 15 views· 4 min read
吉客云Kingdee Cloud其他入库单Inventory Sync供应链集成轻易云

What This Strategy Solves

In the warehouse of a retail enterprise, a batch of "uncategorizable" stock-ins happens every day: gifts, samples, sporadic purchase returns, promotional material replenishments… These don't count as purchase stock-in, nor transfers or inventory surplus, so they must be recorded as "Miscellaneous Stock-In." The enterprise simultaneously uses Kingdee Cloud Stellar for financial and inventory accounting, and Jky for warehouse and store management—each system maintains its own set of miscellaneous stock-in documents. Three months later, during stocktaking, quantities on both sides don't match: finance can't trace the goods, while stores report shortages—a classic "distributed master data + document silo" problem.

Our approach: use the Qeasy Data Integration Platform to push Kingdee's miscellaneous stock-in documents to Jky incrementally by approval date, using the Kingdee document number as the reference key, creating stock-in documents with inType=104 on the Jky side to unify the inventory entry point. The real value of this strategy is not "moving documents over," but aligning inventory semantics across the two systems.

Data Flow and Field Mapping

Data flow: Kingdee Cloud Stellar (STK_MISCELLANEOUS / QTRKD02_SYS) → Qeasy middleware → Jky (erp.storage.stockincreate / inType=104).

Header Key Field Mapping

Source Field (Kingdee)Target Field (Jky)Mapping TypeDescription
FSTOCKID.FNumberinWarehouseCodeDIRECTReceiving warehouse code
—inTypeCONSTANTFixed 104 (Miscellaneous Stock-In)
FBillNorelDataIdDIRECTKingdee document number as business traceability key
FDateapplyDateDIRECTApplication time
FCreatorId.FNameoperator / applyUserNameDIRECTDocument creator / applicant
—sourceCONSTANTOPEN (open platform identifier)

Line Item Key Field Mapping

Source FieldTarget FieldMapping TypeDescription
FMATERIALID.FNumbergoodsNo / skuCodeDIRECTMaterial code must align with Jky goods master data
FQtyinQtyDIRECTReceived quantity (note: differs from surplus document's FGainQty)
FPricepriceDIRECTCost price
FAmountamountDIRECTTotal cost
FLOT.fnumberbatchNoDIRECTRequired for batch-managed materials
FPRODUCEDATEproductionDateDIRECTProduction date
FEXPIRYDATEexpirationDateDIRECTExpiration date
FCMKBarCodebarcodeDIRECTRetail barcode

How to Configure on Qeasy

Create a strategy on the Qeasy platform: select "Kingdee Cloud Stellar" as the source and "Jky" as the target, and configure according to the following key points:

  1. Source metadata: Select the executeBillQuery API (QUERY / POST), set FormId to STK_MISCELLANEOUS, number field to FBillNo, line id to FEntity_FEntryID. Write object paths like FSTOCKID.FNumber and FMATERIALID.FNumber into FieldKeys—the platform will parse sub-fields using the . notation.
  2. Target metadata: Select the erp.storage.stockincreate API (EXECUTE / POST), use the id returned by Jky as the id, connect relDataId to {{FBillNo}}, and hardcode inType as 104.
  3. Mapping rules: Fill in item by item according to the table above; constants (inType, source) are written directly; collections (stockInDetailViews) reference the grouped details_list from the source.
  4. Source filtering: Set FilterString to FApproveDate>='{{LAST_SYNC_TIME|dateTime}}' and FBillTypeID.FNUMBER='QTRKD02_SYS' and FSTOCKID.FNumber in ('RR-FZ1A','RR-FZ-JDZY','RR-FZ2Q')—incremental by approval date, locked document type, restricted warehouses.
  5. Validation: Enable idCheck to ensure the same FBillNo is not created multiple times.

Implementation Steps

We split the rollout into three phases:

  • Phase 1: Centralized code mapping management. First establish the material→goods and warehouse→warehouse master data mappings (use _findCollection joins in Qeasy)—this is the "foundation" for subsequent document sync.
  • Phase 2: Full-volume trigger. On go-live day, set LAST_SYNC_TIME to a date earlier than actual business, manually trigger once to backfill historical documents; meanwhile enable idCheck to prevent duplicate creation.
  • Phase 3: Scheduling frequency. Set source cron to 5-59/20 7-22 * * * (every 20 minutes during business hours), offset target by 5 minutes to 10-59/20 7-22 * * * to avoid simultaneous fetch causing congestion. Off-hours are not scheduled to reduce database pressure.

Pitfalls and Lessons Learned

  1. Flattened data not grouped. Kingdee's executeBillQuery returns flattened rows, with header fields repeated on every line item. If you don't group by FBillNo at the data flow layer to construct details_list, the target receives only 1 line, and inventory quantity is immediately off. This is a common pitfall—the safe practice is to explicitly configure grouping logic at the platform data flow layer.
  2. Warehouse code used directly with object path. {{FSTOCKID}} in some versions returns an object instead of a string, causing Jky to report "warehouse does not exist." You need to confirm whether source FieldKeys have object field flattening enabled, or rewrite the mapping as {{FSTOCKID_FNumber}}.
  3. Wrong quantity field selected. Miscellaneous stock-in should use FQty (received quantity), not copy the surplus document's FGainQty or purchase stock-in's FRealQty. Write field semantics into mapping notes to reduce future maintenance risks.
  4. Batch and expiration date omitted. If batch-managed materials don't pass batchNo, Jky will treat them as non-batch stock-in, breaking subsequent picking and expiration alerts. Recommend marking "batch managed" on material master data and implementing conditional mapping.
  5. Incremental starting point mismatched. If LAST_SYNC_TIME is written in server time zone, cross-timezone deployments will under-fetch or over-fetch data. Storing UTC uniformly and converting to local time in platform expressions is the safer practice.

Applicable and Non-Applicable Scenarios

Applicable: Multi-organization, multi-warehouse retail/distribution enterprises where Kingdee handles financial inventory and Jky handles warehouse WMS, needing to unify non-standard inventory movements (miscellaneous stock-in, surplus, sporadic replenishments) on the Jky side.

Not applicable: Single-warehouse scenarios using only Kingdee or only Jky (use the system's built-in features directly); high-frequency businesses requiring bidirectional real-time sync (recommend event-driven rather than 20-minute polling); complex group architectures with cross-legal-entity, inconsistent inventory organizations (requires organization mapping first before discussing documents).

Original content. Please credit the source when reposting: https://www.qeasy.cloud/insights/solutions/strat-p2ea595-kingdee-cloud-3711-n8d3b458f-0853a35c

Comments