Sales Outbound Sync from E-Commerce OMS to ERP: A Practical Breakdown of a Single Strategy
What This Strategy Solves
The online sales outbound order is the "throat document" that connects the e-commerce front end with the financial back end. One retail enterprise aggregates hundreds of outbound orders from various e-commerce channels every day, and needs to push the outbound facts into the ERP as soon as possible for cost accounting, receivables confirmation, and inventory balance synchronization. We use Qeasy Data Integration Platform to handle this: after filtering outbound orders by business type on the WMS side, they are pushed in near real time to the flagship Kingdee Cosmic, so that downstream finance, inventory, and supply chain reports avoid "overnight data".
Data Flow and Field Mapping
The data flow is: flagship WMS (source) → Qeasy middleware (cleaning, mapping, field enrichment) → Kingdee Cosmic (target).
Key field mapping examples:
| Business Meaning | Source Field | Target Field | Mapping Notes |
|---|---|---|---|
| Order number | order_no | billno | Direct copy, document number |
| Outbound ID | stockout_id | id | Idempotency / dedup key |
| System order no | src_order_no | src_billno | Source traceability |
| Business date | consign_time | biztime | Timestamp → standard date |
| Inventory org | - | org_number | Hard-coded business preset |
| Bill type | - | billtype_number | Standard sales outbound code |
| Business type | - | biztype_number | Business preset code |
| Customer code | customer_no | customer_number | Converted via centralized code mapping |
| Line item | details[].sku_id | details[].material_number | Relies on upstream material sync strategy |
Note: Customer and material codes are the "translation dictionary" between the two systems. Qeasy adopts a centralized code-mapping management model: all dictionaries are maintained in a single mapping table to avoid scattered maintenance across multiple strategies.
How to Configure on Qeasy
- Register source endpoint: Register the flagship WMS query API in Qeasy, parse the response structure, mark
order_noas the primary key, and enable auto-pagination. - Register target endpoint: Register the batch-create sales outbound API of Kingdee Cosmic and confirm its header + line payload structure.
- Map fields visually: On the visual mapping canvas, drag source fields to target fields and use expression nodes for date formatting and empty-value fallbacks.
- Centralized code mapping: Customer, material, and warehouse codes are maintained in a single "Code Mapping" module and reused across strategies.
- Idempotency and dedup: Use
order_noas the idempotency key. EnableidCheckon the target side so that duplicate orders are skipped automatically, preventing duplicate postings in finance. - Exception handling: Enable retry on failure (recommended 3 times with exponential backoff), and write failed details to a log table for later repair.
Implementation Steps
- Phase 1: Incremental starting point. Before going live, do a one-time bulk backfill of the recent N days of historical outbound orders to verify mapping logic and idempotency.
- Phase 2: Full-volume trigger. After the bulk run completes, switch to incremental mode and filter new orders by business time or document status.
- Phase 3: High-frequency scheduling. The source crontab runs every 29 minutes within the business window; the target is staggered by several minutes to avoid contention at peak.
- Phase 4: Monitoring and alerting. Use the Qeasy monitoring dashboard to track API success rate, average latency, and order count fluctuation. Trigger enterprise IM alerts when thresholds are exceeded.
A safe practice is the "incremental + full dual-track" model: full-volume for first-time rollout and exception repair, incremental for daily production. The two tasks can run in parallel without interfering with each other.
Lessons Learned from Pitfalls
- Classic mistake: customer codes not synced upstream. Going live and pushing outbound orders directly, the target returns "customer does not exist." Master data such as materials and customers must land before transactional documents; if necessary, treat the customer sync strategy as a dependency of this strategy.
- Inconsistent time field formats. The WMS returns Unix timestamps, but Kingdee expects standard date strings. Add a unified "time formatting" node in the mapping layer and route all time fields through the same rule.
- Missing line items. Only the document header was mapped; the document body was ignored, resulting in outbound orders without details and inaccurate inventory. Always debug the header and the body in separate steps and verify each line.
- Duplicate orders causing book-to-physical mismatches downstream. Without idempotency control, the target was written repeatedly. Be sure to enable
idCheckand retain the source order number for reverse lookup. - API timeouts during peak hours. Pushing a large batch of line items in one shot slowed down the target system. Qeasy supports batch writes (e.g., 50 orders per batch), which both protects the target system and makes retry easier on failure.
Applicable vs. Non-Applicable Scenarios
Applicable: Retail or distribution enterprises with daily order volumes in the hundreds to low thousands that need per-order cost accounting in the ERP; scenarios that require outbound facts to feed finance and supply chain. Not applicable: Extremely high document volumes (tens of thousands or more should use asynchronous message queues); workflow-style outbound processes that require complex approval flows; complex bidirectional real-time synchronization between the two systems.
How to Configure on Qeasy (Supplementary)
In the Qeasy configurator, "source platform → middleware mapping → target platform" is abstracted into three layers. The first layer is responsible for pulling, the second for cleaning and transformation, and the third for pushing. Each layer can be tested independently and its logs reviewed independently, which is a notable advantage of Qeasy over traditional ETL tools.