Qeasy Cloud
Get Started

Sales Return Sync from Jushuitan to Kingdee Xingchen: A Single-Strategy Integration Tutorial

· 高金凤· Integration Solutions· 11 views· 4 min read
Jushuitan金蝶云星辰销售退货轻易云Data IntegrationSupply Chain

What This Strategy Solves

A retail enterprise runs e-commerce orders on Jushuitan while finance and inventory accounting run on Kingdee Xingchen. When a sales return occurs, the common problem is this: the refund and inventory rollback already happened in Jushuitan, but Xingchen has no visibility into the return document. The result is inflated inventory and unbalanced reconciliation.

What we need is to synchronize sales return documents from Jushuitan to Kingdee Xingchen as sales return entries, following a defined coding and document convention. On the Qeasy data integration platform, a single strategy carries the entire chain: fetching source documents, transforming fields, writing to the target system, and supporting both incremental and full-volume dual-track operation.

Data Flow and Field Mapping

The overall direction is unidirectional: Jushuitan (source) → Qeasy middleware layer (transform and mapping) → Kingdee Xingchen V2 (target).

The middleware layer is the core of the strategy. All cleansing, mapping, and default-value completion happens here, to avoid pushing dirty data directly into Xingchen.

Business MeaningJushuitan Source FieldMiddleware HandlingKingdee Xingchen V2 Target Field
Document numberso_id / refund_noPass through, add prefix if neededFBillNo
Return daterefund_timeConvert to yyyy-MM-ddFDate
Customer codecustomer_idLook up coding mapping table, alert if missingFCustId
Warehouse codewarehouse_codeLook up mapping, fall back to default warehouseFStockId
Item codesku_idLook up item mapping, depends on "item sync" strategyFItemId
Return quantityqtyDirect mapping, validate signFQty
Return amountamountNormalize to two decimal placesFAmount
Document statusstatusOnly sync "completed" statusFStatus

Note: the customer, warehouse, and item coding mapping tables must depend on prerequisite strategies (item sync, customer sync). This is the typical "centralized coding mapping management" pattern on Qeasy—one table governs all cross-system codes, avoiding scattering across multiple scripts.

How to Configure on Qeasy

Step 1, register connectors for the source and target systems. For the source, choose Jushuitan's standard interface (sales return document query). For the target, choose Kingdee Xingchen V2's sales return document save interface. Connection parameters live in Qeasy's connection management, never hardcoded into the strategy.

Step 2, create a new strategy of type SYNC, direction A_TO_B. Configure dual trigger channels: scheduled polling plus event trigger. Scheduled polling handles full-volume reconciliation; events drive near-real-time incremental sync.

Step 3, arrange the data processing nodes in the strategy canvas: fetch → field mapping → coding mapping lookup → write to Xingchen. For the mapping lookup step, we recommend directly invoking Qeasy's "Mapping Center" to centrally maintain customer, warehouse, and item mappings. This way, when a new store or warehouse is added later, only the mapping table changes, not the strategy.

Step 4, configure error handling. The trouble usually comes not from normal documents but from edge cases: return documents with abnormal status, test documents with zero amount, and merged documents across stores. We recommend adding a "pre-validation node" in the strategy. Documents that fail validation go directly into the exception queue, rather than pushing dirty data into Xingchen.

Implementation Steps

We recommend a three-phase rollout instead of a hard cutover.

Phase 1: Full-volume backfill (Day 1). Synchronize all historical return documents at once. This step verifies the totals on both sides and validates the completeness of coding mappings. Scheduling approach: in Qeasy, manually trigger a full-volume pull, with the time window set to the last 30 or 90 days, depending on the customer's actual data volume.

Phase 2: Incremental anchor confirmation (T+1). Determine the timestamp or document number as the incremental anchor. In Qeasy, write this anchor into the strategy's "incremental cursor" configuration. Each subsequent run advances from this cursor. A typical mistake here is choosing the wrong anchor, leading to missed or duplicate documents. The safe approach is to have the customer's business team pick a clearly-stated return document in the source system as the reference point.

Phase 3: Stable scheduling (routine operation). We recommend a polling interval of every 15 or 30 minutes, depending on return volume. Qeasy's scheduler supports cron expressions; once configured, the system runs automatically. The header and line items can be processed in stages: first sync the header successfully, then attach the line items, to avoid a single document failing as a whole.

Pitfalls and Lessons Learned

Pitfall 1: Inconsistent status semantics. "Return completed" in Jushuitan is not the same as "approved" in Xingchen. Without explicit status mapping, the target system will accumulate many pending documents. The safe approach is to explicitly convert status enums in the middleware layer, rather than relying on defaults.

Pitfall 2: Loss of precision in amount fields. Some source systems store amounts as strings, others as floats. The middleware layer must normalize everything to fixed-point decimals with two places, otherwise reconciliation will show discrepancies of a few cents.

Pitfall 3: Mapping table gaps causing batch failures. When a customer code in a document cannot be found in the mapping table, the common reaction is to roll back the entire batch—which is unacceptable in production. We recommend configuring "single-document failure does not affect the whole batch". Failed documents go into the exception queue, and a human operator adds the missing mapping and reruns.

Pitfall 4: Running return sync before its dependencies. A return document depends on item and customer master data. If item sync or customer sync has not yet completed, the return sync will encounter missing item codes. We recommend explicitly declaring depends_on in the strategy, so Qeasy executes in the correct order.

Pitfall 5: Ignoring idempotency. The same return document may be pushed multiple times. The target system must deduplicate by document number, or the Qeasy write node should enable "overwrite by primary key".

When This Applies and When It Doesn't

Applies: sales return document sync between Jushuitan and Kingdee Xingchen; near-real-time reflection of return status; finance using Xingchen as the unified accounting source.

Does not apply: returns merged across legal entities or accounting books; scenarios requiring workflow approval before booking; dual-write transition periods during source or target system migration.

Original content. Please credit the source when reposting: https://www.qeasy.cloud/insights/solutions/strat-jushuitan-kingdee-cloud-6235-ndb5660ab-80d8740c

Comments