Syncing LingXing After-sales Manual Orders to Kingdee Other-Outbound Documents: A Single-Strategy Tutorial
What This Strategy Solves
In cross-border e-commerce or omnichannel retail scenarios, after-sales manual orders often fall outside the standard outbound flow—manual re-shipments, exchanges, and shrinkage all land in this category. If they are only recorded in LingXing ERP, Kingdee Cloud Xincheng's physical inventory will gradually drift out of sync: books show stock, but the warehouse has none, and the numbers stop matching at month-end close.
What we did on-site was to pull LingXing's after-sales manual orders incrementally by delivery time, convert them into Kingdee Other-Outbound documents inside the Qeasy data integration platform, and trigger audit directly so both inventory views converge within the same day.
Data Flow and Field Mapping
The data flow is straightforward: LingXing ERP → Qeasy Integration Platform → Kingdee Cloud Xincheng. The middle layer carries no business logic—it only renames fields, applies code mappings, and controls the time window.
Key field mapping (extracted from the request bodies in the source material):
| Business meaning | LingXing source field | Qeasy middle field | Kingdee target field | Notes |
|---|---|---|---|---|
| Document number | global_order_no | global_order_no | bill_no | Unique key for after-sales manual order |
| Outbound date | global_delivery_time | global_delivery_time | bill_date | Cast to datetime |
| Transaction type | — | Fixed value | trans_type_id | 13 for Other-Outbound |
| Operation type | — | Fixed value | operation_key | audit for direct approval |
| Remarks | remark | Template string | remark | `LingXing multi-platform order: after-sales manual order shop |
| Material lines | material_entity | After code mapping | material_entity | LingXing SKU → Kingdee material code |
The header and lines are processed in two stages in Qeasy: the header is written to Kingdee first, then the material lines are batch-inserted, and finally the audit is triggered.
How to Configure in Qeasy
In the Qeasy data integration platform, this strategy corresponds to a standard "source executor + target executor" combination.
Source side (LingXing)
- API:
/pb/mp/order/v2/list, POST. - Time window:
date_type=global_delivery_time,start_timeuses{{DAYS_AGO_s10}},end_timeuses{{CURRENT_TIME}}, to avoid missed orders. - Pagination:
offset=0,length=100; LingXing's cap is 10000, adjust as needed. - Idempotency key:
idCheckenabled onglobal_order_no; duplicate documents are skipped directly.
Target side (Kingdee)
- API:
/jdy/v2/scm/inv_other_out, POST. - Fixed values:
trans_type_id=13,operation_key=audit. - Material codes on the lines go through a centralized code mapping table that translates LingXing SKUs into Kingdee material codes, avoiding hard-coding in each strategy.
- Document remarks are concatenated via a unified template string for easier after-sales reconciliation.
Common Qeasy patterns we used
- Centralized code mapping management: all SKU / warehouse / customer mappings live in one shared table, reused across strategies.
- Header and lines in separate stages: header first, then lines—failures are retryable without leaving a "half-document".
- Dual-track incremental + full sync: daily runs use incremental mode (by
global_delivery_time); first go-live or break-point recovery runs a one-off full sync.
Implementation Steps
Phase 1: Initialization (first go-live)
- Create connections to both LingXing and Kingdee in Qeasy and validate the token-fetching strategy.
- Run a one-off full sync of historical after-sales manual orders by
global_delivery_timeinto Kingdee withaudit. - Take a sample document and verify that
bill_no,bill_date, andmaterial_entityline up correctly.
Phase 2: Confirm the incremental starting point
- Use the full-sync end time as the incremental
start_timeto avoid duplicates or gaps. - Set
end_timeto the execution moment of the schedule, auto-filled by the Qeasy template variable{{CURRENT_TIME}}.
Phase 3: Scheduling cadence
- LingXing source:
20 3-5 * * *(hourly starting 03:20, covering cross-day orders). - Kingdee target:
59 1-4 * * *(audit completes before 02:00, ahead of the daily close). - Qeasy triggers them serially based on the "source-writes-first, target-writes-after" dependency.
Phase 4: Post-go-live monitoring
- For the first week, reconcile both inventory views daily; switch to sampling once stable.
- Watch the failure counts in Qeasy run logs, with focus on
idCheckhits and mapping failures.
Lessons Learned
-
Too narrow a time window drops orders. LingXing's
global_delivery_timecan update across days. We initially only fetched the current day and found a batch of shipments missing the next day. The safe pattern is to rollstart_timeback 10 days (DAYS_AGO_s10) so the window covers delayed updates. -
The side effects of direct
audit. Withoperation_key=audit, Kingdee approves the document immediately—if the material code on a line is wrong, inventory is incorrectly deducted. We later changed to a two-step pattern:submitfirst for self-check, thenaudit, split into two executors inside Qeasy. -
Hard-coding material codes in strategies. Early versions embedded SKU mappings directly in field transforms, so adding a new warehouse meant editing N strategies. We later extracted everything into a centralized mapping table in Qeasy, and strategies only reference the table name.
-
Duplicate
global_order_no. The same after-sales order may be edited multiple times in LingXing;idCheckmust be enabled, otherwise Kingdee will generate multiple duplicate outbound documents. -
Negative inventory does not raise errors. Kingdee Other-Outbound documents allow negative stock by default, which can hide problems. We recommend adding a pre-check on the Qeasy side: if LingXing's available quantity is less than the outbound quantity, intercept and require manual confirmation before allowing the document through.
Applicable and Non-applicable Scenarios
Applicable: cross-border e-commerce and omnichannel retail where after-sales manual orders from a third-party ERP must be synchronized to the finance/inventory system by delivery time, with inventory views converging within the same day.
Not applicable: LingXing and Kingdee belonging to the same organization as multiple sets of books; complex scenarios that require multi-state linkage across the order lifecycle (a middle table plus a state machine is a better fit there).