Sales Order to Outbound Order Sync: Marketing Cloud to Kingdee Cloud Xingchen Tutorial
What this strategy solves
When channel orders flow from a front-end marketing cloud to the ERP, there is often a gap: deals are signed but the warehouse does not know whether to stock, when to ship, or which document to issue. This strategy pushes the "new-version order / agreement header" from the marketing cloud into Kingdee Cloud Xingchen on a fixed cadence and generates an outbound order directly, so warehouse, finance, and channel teams all work from the same source of truth. We run this link on the Qeasy data integration platform, where code mapping, incremental cursors, and scheduling cadence are all managed centrally, avoiding drift caused by two systems maintaining things in parallel.
Data flow and field mapping
The source is the marketing cloud agreement-header endpoint; the target is the Kingdee Cloud Xingchen sales outbound endpoint. On Qeasy the chain runs as "source query → middle mapping → target execute".
Key field mapping (source-driven):
| Source (Marketing Cloud) | Middle layer | Target (Kingdee Outbound) | Note |
|---|---|---|---|
orgId | Pass-through | Tenant context | Org identifier |
no (order number) | Pass-through | bill_no | Document code |
approveDt | {{approveDt|date}} formatted | bill_date | Outbound date as YYYY-MM-DD |
partnerName | _findCollection lookup by name | customer_id | Centralised customer mapping |
remark | Pass-through | remark | Document remark |
| Order line items | Split by line, map SKU to material id | Outbound entries | Header and body staged separately |
How to configure on Qeasy
Step 1. Register the marketing cloud and Kingdee Cloud Xingchen as two connectors on Qeasy. Inject tenant and org id as global variables so other strategies can reuse them.
Step 2. Configure the source endpoint order/honour/agreement/header, method POST. Hard-code orgId, default page=1, and leave id, applyerId, supplierId for the incremental cursor. Enable idCheck so Qeasy uses the source primary key for idempotency.
Step 3. Configure the target endpoint scm/sal_out_bound, method POST. Set bill_source=ISV to mark origin. Format bill_date via the template variable. Resolve customer_id through _findCollection against the customer archive—this is a typical Qeasy pattern: centralised code mapping. Keep buildModel=false and autoFillResponse=true so response filling and field hints stay on the platform.
Step 4. Build a source-target id map in Qeasy between the source id and target id so downstream checks and writes can rely on it.
Implementation steps
1. Incremental start
On go-live, run one full backfill with a cutoff timestamp so any back-logged agreements are caught up. Then switch to incremental: each run reads the last successful max id or updateDt and only pulls new or changed rows. Qeasy handles this through a "last successful cursor" variable, so there is no manual entry per run.
2. Full re-run trigger Keep a manual full re-run entry, used only at period cut-over, org change, or after major customer-archive changes, so daily schedules never accidentally trigger it.
3. Scheduling cadence
Source crontab is */4 8-21 * * *, every 4 minutes during business hours. Target write is */3 7-23 * * *, every 3 minutes, slightly faster than the pull so the target stays empty most of the time. The two ends are deliberately staggered so Qeasy worker threads do not collide on the minute.
4. Monitoring and alerting On Qeasy set thresholds for success rate, empty responses, and idCheck hit rate. If two consecutive runs fail, pause automatically and notify the on-call engineer to stop dirty data from flowing downstream.
Pitfall review
1. Customer archive arrives after the order
The order's customer_id is resolved via _findCollection, so if the customer archive has not been pulled first, the order lands in a void. The safe approach is to set the customer-sync strategy's sequence before the order-sync strategy—depends_on in Qeasy exists for exactly this.
2. Date format drift
The source approveDt may come as 2019-01-01 10:00:00 while the target only accepts 2019-01-01. This is a common pitfall: a typical mistake is to pass the raw string through and trigger Kingdee-side validation errors. The safe approach is to format via the {{approveDt\|date}} template.
3. Incremental cursor polluted by full runs If a full re-run and the incremental run write to the same cursor variable, the cursor can be pulled back to the historical minimum after the full run finishes. The safe approach is to give full and incremental their own cursor variables, isolated from each other.
4. Missing line items
Syncing only the header leaves the outbound order with zero amount or a single line. A common Qeasy response is "header and body staged separately": land the header first, then run a separate entry strategy that shares the same bill_no.
5. Schedule collision
Setting both ends to */1 * * * * saturates Qeasy worker threads. The safe approach is staggered scheduling with the source slower than the target, plus a retry window.
When this applies and when it does not
This applies to retail or distribution scenarios where channel agreements are settled in the marketing cloud and then pushed to the ERP as outbound orders. It does not apply when order structures change frequently, when field semantics differ between the two sides, or when there is no customer or material archive foundation—in those cases master data has to be cleaned up before document sync makes sense.