Assembly/Disassembly Inbound to Miscellaneous Inbound: A Qeasy Inventory Sync Playbook
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 field | Target field | Mapping type | Rule |
|---|---|---|---|
| goodsdocNo | FBillNo | DIRECT | {{goodsdocNo}} |
| — | FBillTypeID | CONSTANT | QTRKD01_SYS |
| companyCode | FStockOrgId | DIRECT | {{companyCode}} |
| — | FStockDirect | CONSTANT | GENERAL |
| inOutDate | FDate | TRANSFORM | DATE_FORMAT(inOutDate,'%Y-%m-%d') |
| — | FDEPTID | CONSTANT | BM000016 |
| — | FOwnerTypeIdHead | CONSTANT | BD_OwnerOrg |
| companyCode | FOwnerIdHead | DIRECT | {{companyCode}} |
| billNo | F_LSJC_Text | DIRECT | {{billNo}} |
| sourceBillNo | F_LSJC_Text1 | DIRECT | {{sourceBillNo}} |
| inouttypeName | F_LSJC_Text4 | DIRECT | {{inouttypeName}} |
| memo | F_LSJC_Text11 | DIRECT | {{memo}} |
| goodsDocDetailList | FEntity | COLLECTION | goodsDocDetailList |
Detail line mapping:
| Source field | Target field | Notes |
|---|---|---|
| goodsNo | FMaterialId | Material code |
| quantity | FQty | Inbound quantity |
| unitName | FUnitId | Unit of measure |
| batchNo | batch field | Required for batch-managed materials |
| productionDate | production date | Batch traceability |
| expirationDate | expiry date | Shelf-life management |
| recId | source line ID | Lineage |
| warehouseCode (header) | FStockId | Propagated 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. ConfirmselelctFieldscovers every business-required field;deliveryNois easy to miss. - Target: API
batchSave, FormIdSTK_MISCELLANEOUS,IsAutoSubmitAndAudit=true,IsVerifyBaseDataField=true,idCheck=truefor idempotency onFBillNo. - Code mapping: Centralize material, unit, organization, and warehouse mapping in Qeasy. Run the material master strategy first so
goodsNoresolves cleanly. - Constants:
FStockDirect=GENERAL,FBillTypeID=QTRKD01_SYS,FDEPTID=BM000016,FOwnerTypeIdHead=BD_OwnerOrgare written as constants in the target request. - Date transform:
FDateuses_function DATE_FORMATtoYYYY-MM-DD. - Incremental window:
gmtModifiedStartandgmtModifiedEnduse_function from_unixtimeagainstLAST_SYNC_TIMEandCURRENT_TIME, both shifted back 86400 seconds.
Implementation steps
- 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.
- Configure Source: Create a source scheme, set pagination (
pageIndex=0,pageSize=100) and the incremental window, enablebuildModel. - Configure Target: Create a target scheme with FormId
STK_MISCELLANEOUS, complete the request mapping per the tables above, turn on auto-submit and audit. - Pilot run: Trigger a full replay over a historical window; verify that
FBillNolands asgoodsdocNo, quantities and batches are correct, and audit status flips as expected. - Scheduling: Source crontab
20 7-23/5 * * *(every 5 hours from 07:00 to 23:59, at minute 20). Target crontab7-59/20 7-23 * * *(every 20 minutes). This two-track cadence keeps extraction and landing roughly aligned. - 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.
- Exception handling:
idCheck=trueprevents duplicate documents. If a material or unit fails to resolve, update the centralized mapping table and rerun the affected window.
Lessons learned
- The deliveryNo gap: The target mapping references
deliveryNointoF_LSJC_Text2, but the sourceselelctFieldsdoes not include it. Either adddeliveryNoto the source pull list, or drop it from the target mapping so the platform does not choke on empty values. - Silent batch and expiry loss: When
batchNo,productionDate, andexpirationDateare not explicitly listed in the target request, behaviour depends onbuildModelor API conventions. For batch-managed materials, missing batch numbers will cause the document to fail. Always replay with batch-managed materials before go-live. - 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.
- 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_onso the platform runs them first. - Auto-audit side effects:
IsAutoSubmitAndAudit=trueis 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.