OKKICRM Sales Order to ERP Sync: A Single-Strategy Implementation Guide
What This Strategy Solves
In many distribution and e-commerce companies, sales orders are first created, reviewed, and confirmed in the CRM, then the supply chain system needs to receive those orders to reserve stock and trigger shipments. When the two sides disconnect, you see "customer already placed the order but the warehouse never ships" or "duplicate pushes cause overselling." This article zooms in on the smallest but most error-prone piece: pushing newly created sales orders from the CRM downstream as new records, without duplicates and without loss.
Data Flow and Field Mapping
The flow is unidirectional: System A (upstream CRM) → integration layer → System B (downstream supply chain). We use the Qeasy data integration platform as the integration layer, which only handles movement and transformation, never holding business data.
| Dimension | Upstream CRM (order header) | Integration layer | Downstream system (order header) |
|---|---|---|---|
| Order number | Business-side order ID | Passed through as the idempotency key | External order number field |
| Customer code | CRM customer ID | Converted via mapping table to downstream customer ID | Customer code |
| Product code | CRM SKU | Converted via mapping table to downstream material code | Product code |
| Quantity | Sales quantity | Type conversion (float → decimal) | Quantity |
| Unit price | Tax-inclusive unit price | Truncated to target precision | Unit price |
| Order date | CRM creation time | Formatted to target date format | Order date |
| Shipping address | Full address string | Split into province/city/detail | Structured address |
Headers first, then line items. A common pattern we see on customer sites is to centralize code mapping inside Qeasy's mapping tables. CRM customer IDs, downstream customer IDs, CRM SKUs, and downstream material codes all live in one mapping table. New customers or SKUs are added in one place, avoiding scattered edits across multiple strategies.
How to Configure It on Qeasy
The core configuration idea is "source extraction → transformation → target write," with visual nodes at each step. You can get it running without writing complex scripts. Here are the key configuration points.
1. Source extraction node
- Pick the connector that corresponds to System A;
- Choose the "new document" trigger, and add a filter on "order status = confirmed" to avoid pushing drafts;
- Paginate by a timestamp field in descending order; on first run, pull a full historical baseline.
2. Transformation node
- Use the visual mapping panel for field mapping, supporting constants, expressions, and lookups;
- Code fields should uniformly use "lookup mapping table" actions. If the lookup fails, route the record to an exception queue instead of writing dirty data;
- Headers and line items are best handled in two phases: process the header first, then process line items only after the header has landed successfully. This gives finer-grained failure rollback.
3. Target write node
- Pick the connector for System B, with the action set to "create";
- Fill in the target system field requirements and watch precision on dates and amounts;
- Failed writes enter a retry queue. Qeasy retries with exponential backoff by default, and after the cap is reached the record falls into an error table for manual investigation.
4. Monitoring and alerts
- Watch key indicators such as "today's synced order count / failed order count / average latency";
- Failure alerts can be wired into enterprise messaging tools so encoding gaps are caught immediately.
Implementation Steps
We recommend a three-phase rollout. Don't go straight to production.
Phase 1: Full baseline (1-2 days before go-live)
- Manually trigger a full sync to pull historical confirmed orders from the CRM to the downstream;
- The focus here is verifying that the mapping table is complete; missing one customer ID blocks one order;
- After the full sync, the order counts on both sides must match. Any discrepancy must be resolved before moving on.
Phase 2: Incremental start (go-live day)
- Set the incremental watermark to the timestamp where the full sync finished, only pushing orders created after that;
- The key point is idempotency: the downstream system uses the external order number as a unique index, so duplicate pushes get rejected by the target without creating dirty data;
- In Qeasy, also set "external order number" as a deduplication key as a second layer of protection.
Phase 3: Steady-state scheduling (after go-live)
- Pick the schedule frequency based on volume: high-volume businesses can run every 5-10 minutes; low-volume setups work fine at 30 minutes to 1 hour;
- Qeasy supports both cron-style scheduling and event-driven triggers. Pick based on business tolerance;
- After two weeks of stable operation, the failure rate on the dashboard should approach zero, at which point operations can take over day-to-day alerting.
Pitfalls We Have Seen
These are real issues from customer projects. Note them and save yourself trouble.
-
Mapping table not centralized. This is the most common pitfall. Customer and product codes are initially hardcoded inside the strategy. Three months later, business adds a new customer, and the orders fail because no such customer exists downstream. The safer approach is to maintain a centralized mapping table inside Qeasy, editable online by the business team, with changes taking effect immediately.
-
Pushing header and line items together, making rollback hard. A classic mistake: the header lands, but one line item fails due to a missing code, leaving the downstream with "a sales order without details," which is hard to clean up. Splitting header and line items into phases is the more stable pattern and is the most widely used mode among Qeasy customers.
-
Incremental watermark miscalculated, producing duplicate orders. If the timestamp seam between the full sync and the incremental is wrong, a batch of orders gets pushed twice. The prevention is to make sure the downstream system enforces a unique constraint on the external order number, and Qeasy also sets a deduplication key, double insurance.
-
Amount and date precision truncated. The upstream uses floats, the downstream uses two decimal places, and direct passing produces accumulated errors down to 0.01. Explicitly truncate to the target precision in the transformation node rather than relying on defaults.
-
Retry without an upper bound, looping and consuming resources. Qeasy retries by default, but the business sometimes asks for "retry forever on failure," which lets one bad record hog the thread. The safer approach is to set a maximum retry count plus an error table for manual handling, rather than retrying indefinitely.
When It Fits and When It Doesn't
Fits: CRM and supply chain systems are separated, and sales orders need to flow from the CRM downstream to reserve stock and ship; volumes from dozens to tens of thousands per day all work, as long as mapping and idempotency are properly designed.
Doesn't fit: orders need two-way sync where both sides can edit; or the downstream system is itself the order entry point and the CRM only mirrors. Such scenarios cannot be solved by a single unidirectional sync strategy and require a bidirectional collaboration design instead.