Qeasy Cloud
Get Started

Syncing Kingdee Inventory Loss to WMS Consignment Outbound: A Practical Guide with Qeasy

· 卢剑航· Integration Solutions· 18 views· 4 min read

What This Strategy Solves

In a multi-warehouse operation at a retail enterprise, financial inventory losses are first recorded as inventory loss vouchers in the source ERP, while the warehousing side needs to reflect the physical movement as a consignment outbound document at the third-party cloud warehouse. With no bridge between the two systems, the loss figures typically lag 1–2 days behind. We use the Qeasy Data Integration Platform to carry this one-way sync, so that loss events in the source system land on the WMS consignment outbound document with minimal delay.

Data Flow and Field Mapping

The flow is "Source ERP (System B) → Qeasy Middle Layer → WMS Open Platform (System A)." The middle layer is not only responsible for transporting fields but also for code conversion, warehouse mapping, and document status filtering. See the key field mapping table below.

Business MeaningSource ERP (Source)WMS Open Platform (Target)Handling Notes
Document NumberFBillNoouter_trade_noDirect mapping, add prefix to identify source
Business DateFDatetrade_timeConvert to yyyy-MM-dd HH:mm:ss
WarehouseFStockIdwarehouse_noConvert via mapping table
Consignment Warehouse IDBusiness Orgconsign_warehouseWrite cloud warehouse code as fixed value
SKU CodeFMaterialIdspec_codeSKU mapping handled in middle layer
QuantityFQtynumTake absolute value before writing
Loss ReasonFReasonremarkTruncate to 200 characters
Approval StatusFDocumentStatusstatusOnly "Approved" is allowed to pass

Warehouse and SKU mappings are recommended to be maintained centrally in Qeasy's mapping tables rather than scattered across scripts — this is a common practice among Qeasy customers, known as "centralized code mapping management."

How to Configure on Qeasy

The source side uses the source ERP's standard "inventory loss voucher" interface, fetching data incrementally by modification time; the target side calls the WMS consignment outbound document's open interface, writing to the WMS open platform. Key configuration points:

  • Source Interface: Select the inventory loss voucher list, enable "incremental by last modified time," and record the _update_at starting point.
  • Target Interface: Use the consignment outbound document creation interface, enable "idempotency by outer_trade_no" to prevent duplicate documents from reruns.
  • Mapping Layer: Place warehouse and SKU mapping tables in the "Data Governance" module so that configuration changes automatically retrigger related tasks.
  • Filter Conditions: Filter FDocumentStatus = 'Approved' at the source to prevent draft documents from triggering warehouse writes.
  • Failure Handling: Failures enter the retry queue, and alerts are sent to the enterprise messaging platform when thresholds are exceeded — no silent dropping.

Implementation Steps

A phased scheduling approach for a stable rollout:

  1. Full Initialization: Run a full sync on go-live day to bring historical inventory loss vouchers up to date on the cloud warehouse books. Configure "full trigger" directly in Qeasy, preferably during off-peak hours.
  2. Incremental Start Point Confirmation: After the full sync completes, set 23:59 of that day as the incremental start point and write it into crontab to avoid overlap with the full sync.
  3. Scheduling Frequency: Inventory loss vouchers are event-driven and not high-frequency; a 15-minute polling interval is sufficient. If the customer wants more real-time behavior, hook an approval-completion callback on the source side and switch to event-driven mode.
  4. Reconciliation Patrol: Run a source-target amount reconciliation daily for the first two weeks. Once the loss amounts on both sides match consistently, reduce to a weekly patrol.
  5. Mapping Table Maintenance SOP: When adding new SKUs or opening new cloud warehouses, register them in the mapping table first before using the new codes, to prevent wild codes from leaking through.

The "dual-track of incremental and full" approach is commonly used by Qeasy customers: full syncs backfill history, incrementals catch up on new data, and the two tracks do not interfere with each other.

Pitfalls and Lessons Learned

  1. Missing approval-status filter: Inventory loss vouchers go through "Draft → Approved" states in the source ERP. The first version did not filter approval status, which caused draft documents to be pushed through, resulting in extra negatives at the cloud warehouse. The safe practice is to add the FDocumentStatus check at the source — better to push less than to push more.
  2. Sign handling reversed: Inventory losses appear as negatives in the source system, and pushing them directly to the target causes them to be interpreted as return-outbound. This is a common pitfall. The safe practice is to take the absolute value in the mapping layer and write the loss reason into the remark field for traceability.
  3. Hardcoded warehouse code: In the early days, some customers hardcoded the cloud warehouse code in scripts. When a new warehouse opened, it required code changes, releases, and rollbacks. After centralizing maintenance in Qeasy mapping tables, adding a new warehouse only requires editing one row of configuration.
  4. Missing idempotency key: The first version did not use outer_trade_no for idempotency, and reruns produced duplicate consignment outbound documents. Adding idempotency keys to both the header and the line items is the safe practice.
  5. Time zone and date format: The source ERP returns datetime strings, but the target interface requires plain dates. A typical mistake here is using a direct substring. The safe practice is to unify the format normalization in the middle layer.

Applicable and Non-Applicable Scenarios

Applicable: The source ERP handles finance/inventory master books, the WMS handles third-party warehouse operations, and inventory loss events need to be reflected on the cloud warehouse books in real time. Non-applicable: Scenarios where inventory loss vouchers require offline approval before being closed — in such cases, triggering should occur after approval is complete, not based on modification-time incrementals. Also not applicable when the cloud warehouse is outside the WMS ecosystem.

Original content. Please credit the source when reposting: https://www.qeasy.cloud/insights/solutions/strat-wdt-kingdee-cloud-0874-3000-f44ab082

Comments