Qeasy Cloud
Get Started

Practical Tutorial: Syncing Wangdiantong Sales Outbound Orders to Kingdee Cloud (Store Dimension)

· 陈洁琳· Integration Solutions· 15 views· 3 min read
WDTKingdee Cloud销售订单同步轻易云供应链集成Incremental Sync

What This Strategy Solves

In one retail scenario, e-commerce orders are fulfilled in Wangdiantong, but finance and supply-chain analytics rely on Kingdee Cloud's sales outbound documents. We need to push Wangdiantong outbound orders into Kingdee on a store dimension, where they become the source documents for downstream accounting and inventory. The strategy looks like simple document transport, but the real pain is that outbound orders carry a header plus line items, and org/customer/item codes are completely different across the two systems. If mapping isn't designed well, you end up three months later wondering why the numbers don't match.

Data Flow and Field Mapping

The end-to-end flow is: Wangdiantong (source) → Qeasy intermediate layer → Kingdee Cloud (target).

The source calls wdt.stockout.order.query.trade (POST, QUERY), using start_time / end_time as the incremental window and order_no as the idempotency key. The target calls Kingdee's batchSave (POST, EXECUTE), using id as the idempotency key.

Key field mapping (typical):

Business meaningWangdiantong (source)IntermediateKingdee Cloud (target)
Document numberorder_noPass throughFBillNo
Outbound timeconsign_timeFormat to yyyy-MM-dd HH:mm:ssFDate
Store nameshop_nameLookup in org mapFSaleOrgId (reverse lookup by FName)
Customershop_nameReuse store as customerFCustomerID
Document type—ConstantFBillTypeID (XSCKD01_SYS)

Note FSaleOrgId uses _findCollection — a reverse lookup of store name → sales org code. This lookup is centrally maintained in Qeasy, so adding or removing stores later only requires a change in one place.

How to Configure on Qeasy

In the Qeasy data integration platform, create a new strategy: source = Wangdiantong·Qimen, target = Kingdee Cloud, business module = Sales Order Sync.

  1. Source configuration: Fill in the API and request fields. Set start_time to {{HOURE_AGO_3|datetime}} and end_time to {{CURRENT_TIME|datetime}}. Enable idCheck=true and use order_no for deduplication.
  2. Intermediate mapping: Use the visual mapper to map source fields to target fields. Org and customer go through lookup tables, dates through format conversion, and constant fields are written directly.
  3. Target configuration: Choose batchSave as the target API, enable idCheck=true for idempotency to avoid duplicate writes.
  4. Runtime mode: For the source, recommend buildModel=false so fields are read dynamically from the source schema, reducing configuration churn when the source system adds new fields.

Implementation Steps

A three-phase rollout works well in practice:

  • Phase 1 · Full initialization: Run a one-time script to push all outbound orders from the recent N days with status 95 / 110 (shipped / completed), validating mappings and code lookups.
  • Phase 2 · Incremental start: Use the full-load cut-off time as start_time. Poll increments every 15 minutes (*/15 * * * *) on the source and write every 20 minutes (*/20 * * * *) on the target. Source runs faster than target, leaving a processing buffer.
  • Phase 3 · Steady state: Monitor daily sync counts, failed retries, and idempotency hits. Gradually widen the status filter (e.g., include abnormal shipment status 113).

Recommended schedules: source */15, target */20. The offset avoids hammering both ends at the same second.

Pitfalls and Lessons Learned

  • Store as customer: In Kingdee, the customer master is usually not the same as a store. Some projects maintain a separate "store customer" profile, with org and customer kept in two different lookup tables rather than collapsed into a single shop_name.
  • Time zone and time format: It is easy to miss records near the second boundary. The safe approach is to add a 1-minute overlap on end_time and rely on intermediate-layer deduplication as a safety net.
  • Status filtering: When the source status is empty, the API returns everything. On the first run, always limit to 95 / 110; otherwise cancelled orders slip through too.
  • Idempotency key collisions: Kingdee's FBillNo is unique, so source order_no must be guaranteed non-duplicating. If the source system supports editing-then-repushing, use a composite key such as order_no + consign_time for deduplication.
  • Org mapping changes: When stores are opened, closed, or renamed, keep the lookup table centrally managed in Qeasy. Don't scatter it across multiple tables; otherwise three months later the numbers won't match and root-causing becomes extremely time-consuming.

When This Fits and When It Doesn't

Fits: Multi-store retail where e-commerce orders must enter financial accounting, and org / customer / item code mappings already exist on the Kingdee side.

Doesn't fit: Scenarios where Kingdee does not need a sales outbound document, or where Kingdee uses a different document type (e.g., transfer order) to receive the data. Also not yet suitable for complex multi-legal-entity, multi-book organizational structures.

Original content. Please credit the source when reposting: https://www.qeasy.cloud/insights/solutions/strat-wdt-kingdee-cloud-2008-n0ed1326d-e6557a3c

Comments