Qeasy Cloud
Get Started

Syncing LingXing After-sales Manual Orders to Kingdee Other-Outbound Documents: A Single-Strategy Tutorial

· 冯潇· Integration Solutions· 24 views· 4 min read
金蝶云星辰ERP销售订单同步售后手工单轻易云集成平台供应链集成

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 meaningLingXing source fieldQeasy middle fieldKingdee target fieldNotes
Document numberglobal_order_noglobal_order_nobill_noUnique key for after-sales manual order
Outbound dateglobal_delivery_timeglobal_delivery_timebill_dateCast to datetime
Transaction type—Fixed valuetrans_type_id13 for Other-Outbound
Operation type—Fixed valueoperation_keyaudit for direct approval
RemarksremarkTemplate stringremark`LingXing multi-platform order: after-sales manual order shop
Material linesmaterial_entityAfter code mappingmaterial_entityLingXing 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_time uses {{DAYS_AGO_s10}}, end_time uses {{CURRENT_TIME}}, to avoid missed orders.
  • Pagination: offset=0, length=100; LingXing's cap is 10000, adjust as needed.
  • Idempotency key: idCheck enabled on global_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)

  1. Create connections to both LingXing and Kingdee in Qeasy and validate the token-fetching strategy.
  2. Run a one-off full sync of historical after-sales manual orders by global_delivery_time into Kingdee with audit.
  3. Take a sample document and verify that bill_no, bill_date, and material_entity line up correctly.

Phase 2: Confirm the incremental starting point

  • Use the full-sync end time as the incremental start_time to avoid duplicates or gaps.
  • Set end_time to 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 idCheck hits and mapping failures.

Lessons Learned

  1. Too narrow a time window drops orders. LingXing's global_delivery_time can 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 roll start_time back 10 days (DAYS_AGO_s10) so the window covers delayed updates.

  2. The side effects of direct audit. With operation_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: submit first for self-check, then audit, split into two executors inside Qeasy.

  3. 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.

  4. Duplicate global_order_no. The same after-sales order may be edited multiple times in LingXing; idCheck must be enabled, otherwise Kingdee will generate multiple duplicate outbound documents.

  5. 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).

Original content. Please credit the source when reposting: https://www.qeasy.cloud/insights/solutions/strat-kingdee-cloud-erp-1792-ok-96d02b8b

Comments