Syncing Kingdee Miscellaneous Stock-In to Jky: A Practical Configuration Tutorial with Qeasy
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 Type | Description |
|---|---|---|---|
| FSTOCKID.FNumber | inWarehouseCode | DIRECT | Receiving warehouse code |
| — | inType | CONSTANT | Fixed 104 (Miscellaneous Stock-In) |
| FBillNo | relDataId | DIRECT | Kingdee document number as business traceability key |
| FDate | applyDate | DIRECT | Application time |
| FCreatorId.FName | operator / applyUserName | DIRECT | Document creator / applicant |
| — | source | CONSTANT | OPEN (open platform identifier) |
Line Item Key Field Mapping
| Source Field | Target Field | Mapping Type | Description |
|---|---|---|---|
| FMATERIALID.FNumber | goodsNo / skuCode | DIRECT | Material code must align with Jky goods master data |
| FQty | inQty | DIRECT | Received quantity (note: differs from surplus document's FGainQty) |
| FPrice | price | DIRECT | Cost price |
| FAmount | amount | DIRECT | Total cost |
| FLOT.fnumber | batchNo | DIRECT | Required for batch-managed materials |
| FPRODUCEDATE | productionDate | DIRECT | Production date |
| FEXPIRYDATE | expirationDate | DIRECT | Expiration date |
| FCMKBarCode | barcode | DIRECT | Retail 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:
- Source metadata: Select the
executeBillQueryAPI (QUERY / POST), set FormId toSTK_MISCELLANEOUS, number field toFBillNo, line id toFEntity_FEntryID. Write object paths likeFSTOCKID.FNumberandFMATERIALID.FNumberinto FieldKeys—the platform will parse sub-fields using the.notation. - Target metadata: Select the
erp.storage.stockincreateAPI (EXECUTE / POST), use theidreturned by Jky as the id, connect relDataId to{{FBillNo}}, and hardcode inType as104. - Mapping rules: Fill in item by item according to the table above; constants (inType, source) are written directly; collections (stockInDetailViews) reference the grouped
details_listfrom the source. - 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. - 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 to10-59/20 7-22 * * *to avoid simultaneous fetch causing congestion. Off-hours are not scheduled to reduce database pressure.
Pitfalls and Lessons Learned
- Flattened data not grouped. Kingdee's
executeBillQueryreturns flattened rows, with header fields repeated on every line item. If you don't group by FBillNo at the data flow layer to constructdetails_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. - 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}}. - Wrong quantity field selected. Miscellaneous stock-in should use
FQty(received quantity), not copy the surplus document'sFGainQtyor purchase stock-in'sFRealQty. Write field semantics into mapping notes to reduce future maintenance risks. - 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.
- 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).