Qeasy Cloud
Get Started

Authoritative Tutorial: Field Mapping Handbook of WTD & Kingdee Cloud Supply Chain Integration

· 许创贵· Engineering Best Practices· 10 views· 4 min read
WDT金蝶云星辰供应链集成接口字段手册轻易云教程

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_time incremental windows;
  • Source-side status filtering (e.g., WTD status=55/95/110 audited/shipped/completed; Kingdee bill_status=C audited).

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

FieldTypeMeaningPractical Notes
warehouse_no ↔ numberstringWarehouse code, unique across systemsOnly sync where is_disabled=0; outsource warehouse type must be configured separately
shop_no ↔ customer_numberstringShop code as customer codeDirect mapping for shop-version sales; distributor version needs _findCollection lookup by nickname
provider_no ↔ supplierid_numberstringSupplier codeUsed by purchase orders and purchase returns
goods_no/spec_no ↔ material_numberstringGoods/SKU codeSame for single-SKU items; split rows for multi-SKU
order_no ↔ bill_nostringDocument numberDirect transfer for sales; recommended to also write outer_no/api_outer_no on the purchase side for reconciliation
consign_time/check_time ↔ billdate/bill_datedatetime→dateOutbound/return dateMust truncate to yyyy-MM-dd, otherwise Kingdee will reject the time portion
num/qty/amount/tax_amountnumberQuantity, tax-exclusive / tax-inclusive amountKeep 4 decimal places; both cannot be 0 at the same time
batch_no/producedate/validdatestring/dateBatch no., production date, expiryRequired when batch is enabled; expiry cannot be earlier than production date
billsource/order_type/is_checkconstantDoc source, type, auto-approveSales 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); _findCollection lookup is supported across strategies by keys like name, 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

  1. 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.
  2. Mappings as the hub: Extract shop_no↔customer_number, spec_no↔material_number, and supplierid_number↔provider_no as reusable dictionaries so all strategies reference them.
  3. Separate shop vs distributor: For the same sales outbound/return documents, the shop version maps shop_no directly, while the distributor version must use fenxiao_nick to look up the customer ID; do not mix strategies.
  4. Always carry outer_no on purchases: For Kingdee → WTD purchase orders/receipts/returns, also write outer_no or api_outer_no for easier reverse lookup and reconciliation.
  5. 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.
  6. Incremental window + status filter: Combine time-window filtering and document-status filtering to reduce noise and avoid dirty data flowing back.

Pitfall Review

  1. Date not truncated: Source consign_time or check_time carries time-of-day; writing it directly into Kingdee billdate triggers an invalid date error. Use TRANSFORM to keep only yyyy-MM-dd.
  2. Distributor customer lookup fails: If fenxiao_nick is 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.
  3. Purchase receipt cannot locate purchase order: Strategy 11's purchase_no depends on _findCollection from the purchase order strategy by api_outer_no=src_bill_no; if purchase orders are not synced first or outer_no is missing, the link breaks.
  4. Incremental window misses data: If a material is updated multiple times within the same second, the modify_start_time/modify_end_time window may miss records; overlap the window by 5-10 minutes for safety.
  5. Auto-approve side effects: Setting is_check=1 removes 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.

Original content. Please credit the source when reposting: https://www.qeasy.cloud/insights/engineering/hb-p6-150-5121-ea8e

Comments