Qeasy Cloud
Get Started

Sales Order Sync from ERP to E-commerce Middle Platform: U8 Sales Outbound to Wangdiantong Original Order in Practice

· 陈洁琳· Integration Solutions· 19 views· 5 min read

What This Strategy Solves

In many retail and distribution enterprises, the ERP handles finance and inventory settlement, while the e-commerce middle platform handles store fulfillment and channel distribution. In one real project, a retail enterprise had hundreds to thousands of sales orders flowing into the ERP from offline channels every day. Finance needed to book by the U8 outbound ledger, but store shipment and online callbacks depended on the Wangdiantong original order. A seemingly simple "sales outbound order → original order" sync, if done poorly, causes mismatched numbers between systems, duplicate inventory deductions, and order-status writeback conflicts.

The core value of this strategy: let U8 act as the source of truth for sales outbound, push documents to Wangdiantong original orders by a defined convention, and keep document number, customer, product, quantity, and amount consistent on both sides. At the same time, it leaves a clean middle layer for subsequent shipment, writeback, and settlement.

Data Flow and Field Mapping

Data flow: Yonyou U8 (sales outbound order) → Qeasy Data Integration Platform (middle layer: standardization + mapping + validation) → Wangdiantong (original order).

Key field mapping (condensed):

MeaningU8 Sales OutboundMiddle Layer StandardWangdiantong Original Order
Document numberccode / djbhorder_noshop_order_no
Document dateddateorder_datetrade_time
Customer codeccuscodecustomer_codecustomer_id
Warehousecwhcodewarehouse_codewarehouse_no
Product codecinvcodesku_codegoods_no
Quantityiquantityqtynum
Tax-included unit priceiunitcosttax_priceprice
Tax-included amountisumtax_amounttotal_amount
Memocmemoremarkremark

Mapping is not character-by-character. A common Qeasy customer pattern is to centralize code mappings (customer, product, warehouse) in a "Mapping Center" and process header and body in separate stages, avoiding "change one place, break everywhere".

How to Configure on Qeasy

1. Source System Access (U8)

  • Choose the U8 business DB view as the data source, fetching sales outbound header and child tables via stored procedures or views.
  • Use "document date + document number" combined as the increment field to avoid missing or duplicate documents.
  • Do not set the fetch window too large; filter by "recent N hours change + document status = approved" to reduce source-DB pressure.

2. Middle Layer Processing

  • Create a strategy in Qeasy with a clear name, e.g., "Sales Management-Offline · U8 Sales Outbound → Wangdiantong Original Order".
  • Use a "Field Mapping" node for field comparison, and a "Data Validation" node for key checks: qty > 0, amount > 0, customer/product codes exist in the mapping table.
  • Customer, product, and warehouse codes go through the Mapping Center; new mappings require manual review to prevent rogue mappings.

3. Target System Write (Wangdiantong Original Order)

  • Call Wangdiantong·Enterprise Qimen's original order creation API, submitting header and body separately.
  • The idempotency key should be a unique value composed of "U8 document number + warehouse + line number" to avoid duplicate pushes.
  • After a successful write, write back a "sync flag" on U8; failures enter the retry queue and alert channel.

Implementation Steps

We recommend a three-stage rollout. The dual-track of increment and full sync is a common Qeasy customer pattern.

Stage 1: Master Data Preparation

  • Sort out the warehouse, customer, and product scope that needs to be synced in U8; confirm whether U8 and Wangdiantong coding systems can align directly.
  • Maintain the first batch of core codes in the Mapping Center and produce reconciliation samples.

Stage 2: Increment Start Point and Full Sync Trigger

  • Increment start point: pick a "clean" time point (e.g., month-start or 00:00 of a certain day) and pull increments from that point by change time.
  • Full sync trigger: configure a one-shot full backfill task on Qeasy, running historical data with "pagination + batch number"; close it once done and do not put it into daily scheduling.
  • Configure scheduled increments in Qeasy; every 10–15 minutes is recommended, aligned with U8 business low-peak windows.

Stage 3: Daily Scheduling and Monitoring

  • Schedule frequency: every 10–15 minutes normally; tighten to every 5 minutes during big promotions or month-end closing.
  • Monitoring dashboard: today's synced document count, failure count, average latency, source-DB slow queries.
  • Failure handling: auto-retry 3 times; persistent failures go to manual tickets with U8 source document number and error logs attached.

Lessons Learned

  1. Wrong increment start point causes mismatches 3 months later. A typical mistake is pulling increments by "last modified time", but U8's reverse-audit-then-audit reactivates old documents; the timestamp doesn't change, so documents are missed. A robust approach is to use a combination of "audit time + document status" and run a historical reconciliation script on Qeasy.

  2. Customer/product codes hardcoded in scripts; one new entry requires 5 changes. Extract all code mappings into the Mapping Center; the script only reads the mapping table and no longer hardcodes strings. This is the "centralized code mapping management" pattern common among Qeasy customers.

  3. Header and body processed together; partial success causes dirty data. Process header and body in two stages: submit the header first to get the Wangdiantong internal order number, then batch-submit the body using that internal order number; failure rollback is more controllable.

  4. Idempotency key too weak; duplicate pushes cause over-deductions of inventory. The idempotency key must include "U8 document number + warehouse + line number", and the Qeasy write node must enable "deduplicate by idempotency key".

  5. Downstream of U8 outbound still has shipment and writeback, but the sync strategy leaves no hooks for them. Reserve three fields in the middle layer: erp_sync_flag, erp_sync_time, and original_order_no, so subsequent shipment strategies and reconciliation queries can reuse them directly, avoiding duplicate intermediate tables.

Suitable and Unsuitable Scenarios

Suitable: ERP is the source of truth for sales outbound, e-commerce middle platform is the front-end fulfillment entry, both sides have standardized APIs, and multi-organization retail or distribution enterprises need warehouse/customer-level mapping and reconciliation. Unsuitable: source system is not U8, no stable product/customer master data, real-time sub-second sync required (millisecond scenarios should use message queues rather than timed pulling), or business scenarios where source documents are frequently reverse-audited and redone.

Original content. Please credit the source when reposting: https://www.qeasy.cloud/insights/solutions/strat-wdt-u8-8272-111-u8-33a6dc54

Comments