Qeasy Cloud
Get Started

Assembly/Disassembly Inbound to Miscellaneous Inbound: A Qeasy Inventory Sync Playbook

· Integration Solutions· 21 views· 4 min read
吉客云Kingdee CloudInventory Sync单据映射Incremental Sync踩坑复盘

What this strategy solves

In multi-system retail or manufacturing environments, assembly and disassembly documents often originate in one system but must be reflected in another. Without a reliable bridge, finished-goods and component stock drift apart, batch traceability breaks, and cross-system reconciliation becomes painful. This strategy uses the Qeasy data integration platform to push source assembly/disassembly inbound orders (inouttype=107) into the target as miscellaneous inbound documents, with automatic submission and audit.

Data flow and field mapping

Flow: source inbound order → Qeasy middleware → target miscellaneous inbound. The source goodsdocNo becomes the target FBillNo. The source detail array goodsDocDetailList maps directly into the target FEntity collection.

Header field mapping:

Source fieldTarget fieldMapping typeRule
goodsdocNoFBillNoDIRECT{{goodsdocNo}}
—FBillTypeIDCONSTANTQTRKD01_SYS
companyCodeFStockOrgIdDIRECT{{companyCode}}
—FStockDirectCONSTANTGENERAL
inOutDateFDateTRANSFORMDATE_FORMAT(inOutDate,'%Y-%m-%d')
—FDEPTIDCONSTANTBM000016
—FOwnerTypeIdHeadCONSTANTBD_OwnerOrg
companyCodeFOwnerIdHeadDIRECT{{companyCode}}
billNoF_LSJC_TextDIRECT{{billNo}}
sourceBillNoF_LSJC_Text1DIRECT{{sourceBillNo}}
inouttypeNameF_LSJC_Text4DIRECT{{inouttypeName}}
memoF_LSJC_Text11DIRECT{{memo}}
goodsDocDetailListFEntityCOLLECTIONgoodsDocDetailList

Detail line mapping:

Source fieldTarget fieldNotes
goodsNoFMaterialIdMaterial code
quantityFQtyInbound quantity
unitNameFUnitIdUnit of measure
batchNobatch fieldRequired for batch-managed materials
productionDateproduction dateBatch traceability
expirationDateexpiry dateShelf-life management
recIdsource line IDLineage
warehouseCode (header)FStockIdPropagated to each line

How to configure it on Qeasy

The strategy is split into a Source integration and a Target integration:

  • Source: API erp.storage.goodsdocin.v2, type QUERY, buildModel=true. Confirm selelctFields covers every business-required field; deliveryNo is easy to miss.
  • Target: API batchSave, FormId STK_MISCELLANEOUS, IsAutoSubmitAndAudit=true, IsVerifyBaseDataField=true, idCheck=true for idempotency on FBillNo.
  • Code mapping: Centralize material, unit, organization, and warehouse mapping in Qeasy. Run the material master strategy first so goodsNo resolves cleanly.
  • Constants: FStockDirect=GENERAL, FBillTypeID=QTRKD01_SYS, FDEPTID=BM000016, FOwnerTypeIdHead=BD_OwnerOrg are written as constants in the target request.
  • Date transform: FDate uses _function DATE_FORMAT to YYYY-MM-DD.
  • Incremental window: gmtModifiedStart and gmtModifiedEnd use _function from_unixtime against LAST_SYNC_TIME and CURRENT_TIME, both shifted back 86400 seconds.

Implementation steps

  1. Preparation: Ensure material, unit, organization, and warehouse masters have been synced via their respective strategies; verify that inouttype=107 documents carry complete details, batch numbers, and expiry dates.
  2. Configure Source: Create a source scheme, set pagination (pageIndex=0, pageSize=100) and the incremental window, enable buildModel.
  3. Configure Target: Create a target scheme with FormId STK_MISCELLANEOUS, complete the request mapping per the tables above, turn on auto-submit and audit.
  4. Pilot run: Trigger a full replay over a historical window; verify that FBillNo lands as goodsdocNo, quantities and batches are correct, and audit status flips as expected.
  5. Scheduling: Source crontab 20 7-23/5 * * * (every 5 hours from 07:00 to 23:59, at minute 20). Target crontab 7-59/20 7-23 * * * (every 20 minutes). This two-track cadence keeps extraction and landing roughly aligned.
  6. Go-live and monitoring: Start with a clean incremental checkpoint on a business day boundary, then let the schedule run automatically. Monitor pull volume, save success rate, and error samples.
  7. Exception handling: idCheck=true prevents duplicate documents. If a material or unit fails to resolve, update the centralized mapping table and rerun the affected window.

Lessons learned

  1. The deliveryNo gap: The target mapping references deliveryNo into F_LSJC_Text2, but the source selelctFields does not include it. Either add deliveryNo to the source pull list, or drop it from the target mapping so the platform does not choke on empty values.
  2. Silent batch and expiry loss: When batchNo, productionDate, and expirationDate are not explicitly listed in the target request, behaviour depends on buildModel or API conventions. For batch-managed materials, missing batch numbers will cause the document to fail. Always replay with batch-managed materials before go-live.
  3. Time window drift: The incremental window subtracts 86400 seconds from both ends. If the source system runs in a different timezone from the platform, boundary documents can be missed. Confirm the source timezone and parameterise the offset instead of hardcoding it.
  4. Masters not ready: Until material, unit, organization, and warehouse masters are synced, every detail line fails. A common pattern on customer sites is to declare these master strategies as explicit depends_on so the platform runs them first.
  5. Auto-audit side effects: IsAutoSubmitAndAudit=true is convenient, but failed audits do not roll documents back to draft state—investigations must rely on logs. In production, run in draft mode first, validate, then switch to auto-audit.

When to use it, and when not to

Use it when the source flags assembly/disassembly documents with inouttype=107, the target accepts them as miscellaneous inbound, and masters are already in sync on a private deployment. Do not use it for non-107 document types, scenarios that need reversal logic, custom target document types, or cross-org splits that require separate documents per company code—those need a dedicated design.

Original content. Please credit the source when reposting: https://www.qeasy.cloud/insights/solutions/strat-p2ea595-kingdee-cloud-3635-107v2-c03ae7dc

Comments