Authoritative Tutorial: Field Mapping Handbook of WTD & Kingdee Cloud Supply Chain Integration
What This Interface Solves
In retail and distribution supply chains, the front-end e-commerce system (such as WTD) and the back-end finance/supply chain system (Kingdee Cloud) usually need two-way synchronization: basic data must stay consistent, sales outbound/returns flow from e-commerce back to finance, and purchase orders/receipts/returns are written from ERP to e-commerce. This tutorial consolidates multiple real-world projects into a single field handbook covering 14 sync strategies, key field mappings, and dependencies.
Interface Capability Overview
Authentication: Both systems use OAuth 2.0 + AppKey/AppSecret to exchange access tokens on the public cloud; token lifecycle and refresh are handled by the platform.
Request/Response: All requests are JSON over HTTPS. Source pulls use pagination (page_no/page_size), and responses uniformly wrap code/data/total or a page cursor.
Pagination & Incremental Modes:
- Basic data supports full pagination sync;
- Materials, sales orders, and purchase orders widely use
modify_start_time/modify_end_timeincremental windows; - Source-side status filtering (e.g., WTD
status=55/95/110audited/shipped/completed; Kingdeebill_status=Caudited).
Dependencies: Basic data (warehouse, customer, supplier, material) must complete initial full sync or mapping before business documents; business documents also have precedence among themselves (e.g., purchase receipts depend on purchase orders).
Typical Field Mappings
| Field | Type | Meaning | Practical Notes |
|---|---|---|---|
warehouse_no ↔ number | string | Warehouse code, unique across systems | Only sync where is_disabled=0; outsource warehouse type must be configured separately |
shop_no ↔ customer_number | string | Shop code as customer code | Direct mapping for shop-version sales; distributor version needs _findCollection lookup by nickname |
provider_no ↔ supplierid_number | string | Supplier code | Used by purchase orders and purchase returns |
goods_no/spec_no ↔ material_number | string | Goods/SKU code | Same for single-SKU items; split rows for multi-SKU |
order_no ↔ bill_no | string | Document number | Direct transfer for sales; recommended to also write outer_no/api_outer_no on the purchase side for reconciliation |
consign_time/check_time ↔ billdate/bill_date | datetime→date | Outbound/return date | Must truncate to yyyy-MM-dd, otherwise Kingdee will reject the time portion |
num/qty/amount/tax_amount | number | Quantity, tax-exclusive / tax-inclusive amount | Keep 4 decimal places; both cannot be 0 at the same time |
batch_no/producedate/validdate | string/date | Batch no., production date, expiry | Required when batch is enabled; expiry cannot be earlier than production date |
billsource/order_type/is_check | constant | Doc source, type, auto-approve | Sales outbound fixed APP, outsource inbound fixed order_type=2, all purchase docs is_check=1 |
How to Configure on Qeasy
In the Qeasy Data Integration platform, this kind of cross-system supply chain project is usually packaged as follows:
- Adapters: The platform provides built-in official adapters for WTD Enterprise Qimen and Kingdee Cloud V2, with built-in OAuth 2.0 authorization, token refresh, pagination, and error-code retries.
- Field Mapper: Visual configuration for the five mapping types (
direct/transform/collection/constant/array);_findCollectionlookup is supported across strategies by keys likename, useful for distributor customers. - Strategy Orchestration: The 14 strategies can be arranged into a dependency graph of basic data → sales → purchase → returns → queries; downstream strategies are auto-blocked if upstream ones fail.
- Scheduling: Full sync strategies run weekly; incremental strategies poll every 5-15 minutes; abnormal documents are automatically queued for retry.
Cross-Project Best Practices
- Basic data first: The four basic data strategies (warehouse, customer, supplier, material) must run first, otherwise downstream documents will fail due to missing mapping codes.
- Mappings as the hub: Extract
shop_no↔customer_number,spec_no↔material_number, andsupplierid_number↔provider_noas reusable dictionaries so all strategies reference them. - Separate shop vs distributor: For the same sales outbound/return documents, the shop version maps
shop_nodirectly, while the distributor version must usefenxiao_nickto look up the customer ID; do not mix strategies. - Always carry
outer_noon purchases: For Kingdee → WTD purchase orders/receipts/returns, also writeouter_noorapi_outer_nofor easier reverse lookup and reconciliation. - Strict outsource warehouse constraint: Strategy 12 requires the target warehouse to be of outsource type (JD warehouse, Keje, Best Logistics, etc.); normal warehouses will be rejected.
- Incremental window + status filter: Combine time-window filtering and document-status filtering to reduce noise and avoid dirty data flowing back.
Pitfall Review
- Date not truncated: Source
consign_timeorcheck_timecarries time-of-day; writing it directly into Kingdeebilldatetriggers an invalid date error. UseTRANSFORMto keep onlyyyyy-MM-dd. - Distributor customer lookup fails: If
fenxiao_nickis not yet synced or the names differ in Kingdee, the lookup returns empty and the whole document fails. Run the customer query strategy first, then trigger downstream. - Purchase receipt cannot locate purchase order: Strategy 11's
purchase_nodepends on_findCollectionfrom the purchase order strategy byapi_outer_no=src_bill_no; if purchase orders are not synced first orouter_nois missing, the link breaks. - Incremental window misses data: If a material is updated multiple times within the same second, the
modify_start_time/modify_end_timewindow may miss records; overlap the window by 5-10 minutes for safety. - Auto-approve side effects: Setting
is_check=1removes manual intervention, but it also auto-approves documents with wrong codes or amounts; consider disabling auto-approve for one verification cycle before enabling it.
When to Use
This integration fits two-way supply chain sync between an e-commerce front-end (WTD) and an ERP back-end (Kingdee Cloud), especially for retail/distribution companies that need to sync basic data, bidirectional sales/purchase flows, and a multi-distributor customer model. It is not suited for pure one-way sync, cross-entity financial accounting, or scenarios requiring strongly consistent distributed transactions.