Syncing WMS Purchase Inbound Orders to Kingdee: One Strategy to Demystify Supply-Chain Document Delivery
What This Strategy Solves
In retail and manufacturing enterprises running multiple systems in parallel, the WMS, as the on-site operational system, generates purchase inbound orders first, while the financial-side Kingdee system needs to land these inbound records into the general ledger and accounts payable modules. The most common pain points are: inconsistent document status between the two ends, mismatched batch/serial numbers, and each side using its own supplier coding system. We use the Qeasy Data Integration Platform to carry this strategy, aiming to push WMS inbound orders to Kingdee according to established standards, achieving consistency across documents, amounts, and auxiliary accounting.
Data Flow and Field Mapping
The flow structure is Wangdiantong WMS (Purchase Inbound Order) → Qeasy Middle Layer → Kingdee (Purchase Inbound Order), where the middle layer is responsible for field cleansing, encoding mapping, and document status determination.
Key field mapping (desensitized examples):
| Business Meaning | WMS Source Field | Kingdee Target Field | Processing Logic |
|---|---|---|---|
| Document Number | inbound_no | FBillNo | Pass through as-is, prefix per enterprise rules |
| Supplier | supplier_code | FSupplierId | Convert to internal ID via encoding mapping table |
| Warehouse | warehouse_code | FStockId | Warehouse master data mapping |
| Item Code | sku_code | FItemID | Shared mapping with item strategy |
| Quantity | qty | FQty | Write after unit conversion |
| Price/Amount | price/amount | FPrice/FAmount | Tax-inclusive or not per Kingdee voucher rules |
| Batch Number | batch_no | FBatchNo | Strict 1:1, null values not written |
Stable practice: Manage mappings centrally in Qeasy's "Encoding Mapping" module. When adding new suppliers or warehouses later, only one place needs to be changed.
How to Configure on Qeasy
We typically configure four blocks at the customer site: 1) Data source registration: connect to WMS and Kingdee APIs/databases respectively, with credentials stored uniformly in Qeasy's credential vault. 2) Field mapping: Build mappings per the table above, with suppliers, warehouses, and items referencing master data rather than hard-coding. 3) Transformation rules: Handle unit conversion, tax-inclusive switching, and null value filtering in the middle layer. 4) Write strategy: Kingdee documents are typically written in two steps (header and body); Qeasy supports row-level splitting, with failed rows going to a separate error queue.
A common pitfall during implementation is WMS API pagination: some inbound orders have line items exceeding the single page size. Without cursor-based pagination, line items get truncated.
Implementation Steps
Phased scheduling is key to stable operation. Our standard approach is three-stage:
- Full sync starting point: Before the strategy goes live, use full sync to backfill historical inbound orders. After completion, record the "maximum inbound time" as the increment starting point.
- Incremental trigger: Default polling every 5 minutes, pulling increments where
update_time > starting_point, using cursor pagination to avoid missing orders. - Exception recovery: Qeasy has built-in retry and error queues. Orders that fail 3 consecutive times go to the error table for manual intervention by operations or to trigger compensation tasks.
In actual projects, many customers run high-frequency sync during the day (2-5 minutes) and lower frequency at night (15-30 minutes), balancing real-time performance with source system pressure.
Pitfall Retrospective
- Batch number loss: WMS writes back batches but the field is null during sync because the system still attempts to write null values. The stable approach is to have the middle layer perform null value validation first, not writing null batches to target fields.
- Unit inconsistency: WMS uses boxes, Kingdee uses pieces, with units not unified in the item strategy. The base unit must be agreed upon in the item sync stage, otherwise amounts will be wrong.
- Tax-inclusive/non-inclusive switching: Purchase order strategies are tax-inclusive while inbound order strategies are not. Without separating the standards, reconciliation differences will occur. It is recommended to configure separately by document type in Qeasy's "Business Rules".
- Concurrent writes: The same inbound order triggered multiple times, creating duplicates. The increment key should be a composite primary key of
inbound order number + line number, and Qeasy's deduplication mechanism can block most duplicates. - Dependency order: Inbound orders depend on item and supplier master data. If the item strategy is not stable when pushing inbound orders, encoding lookups will fail. Qeasy supports
depends_onconfiguration, hanging the inbound order strategy after the item strategy.
Applicable and Non-Applicable Scenarios
Applicable: Multi-organization, multi-warehouse retail and manufacturing enterprises where purchase inbound data needs to enter the financial general ledger and accounts payable. Not applicable: Organizations that have already unified systems internally, or scenarios requiring real-time second-level sync (this strategy defaults to minute-level; second-level sync requires additional evaluation).