Qeasy Cloud
Get Started

Sales Return Order Sync in Practice: Landing a Single Strategy from Kingdee Cloud to Fenxsi

· 许创贵· Integration Solutions· 12 views· 4 min read

What This Strategy Solves

On a retail supply-chain integration project, we ran into a very specific need: offline stores submit sales return requests in Fenxsi, but the review and financial settlement must follow the standard process in Kingdee Cloud. Each system maintains its own return documents. Once the status falls out of sync, finance reconciliation produces "returns received, inventory not yet returned" ghost cases.

This strategy has a tight focus: take sales return documents generated in Kingdee Cloud and write them back to Fenxsi in incremental mode, serving as the business-side status record. It does not handle master-data sync, nor does it create documents in the reverse direction. It only ensures the consistency of "document status and key fields" flowing back.

Data Flow and Field Mapping

The overall flow is Kingdee Cloud (B) → Qeasy middle layer → Fenxsi (A), with the strategy direction marked as B_TO_A.

In Qeasy, the typical middle-layer table structure flattens the source system's raw documents and adds a few governance fields (integration batch number, last update time, source-system document internal id). This way, the downstream write can both precisely update the status and reverse-reconcile.

Business MeaningKingdee Source Field (example)Middle-Layer FieldFenxsi Target Field (example)
Return order numberFBillNoreturn_noreturn_order_no
Document statusFDocumentStatusdoc_statusapproval_status
Customer codeFCustId.FNumbercustomer_codeaccount_code
Return reasonFReturnReasonreason_codereason
Refund amountFReturnAmountrefund_amountrefund_money
Related original sales orderFSourceBillNosrc_sale_nosource_order_no
Approval timeFApproveDateapprove_timeapproved_at

Field names should follow the actual metadata of the source and target systems. The table above only illustrates the logical mapping.

How to Configure on Qeasy

In the Qeasy data integration platform, a strategy consists of three segments: "source extraction → transformation → target write".

1. Source extraction Use the query interface of Kingdee Cloud, use FApproveDate as the incremental cursor, and fetch return orders approved since the last successful batch. We recommend storing the incremental key in a dedicated "water-level table" rather than mixing it with the business table—otherwise, reruns easily miscalculate the starting point.

2. Transformation layer In Qeasy's transformation canvas, centralize code mapping—customer codes, organization codes, and return-reason dictionaries should all go into one mapping table. One of the most common patterns among Qeasy customers is "centralized code mapping management": all cross-system code translations go through a single table, so a change applies across the whole chain. This avoids having every strategy maintain its own dictionary, which becomes untouchable three months later.

3. Target write On the Fenxsi side, use its standard return-order update interface, performing idempotent upsert based on return_order_no. Failed rows should go to an exception queue—do not retry directly in the main pipeline, otherwise successfully processed batches will be sent back repeatedly.

Implementation Steps

We usually roll out a "status write-back" strategy in three phases:

Phase 1: Align the incremental starting point Run a full sync first, bringing over all historically approved return orders as a baseline. Subsequent schedules only fetch within the incremental window; full sync is used only on manual triggers or exception recovery. This is the "incremental and full dual-track" mode common among Qeasy customers.

Phase 2: Scheduling frequency Return requests in retail usually have a review delay, so we typically schedule every 15 minutes. If the customer requires higher real-time performance, it can be compressed to 5 minutes, but you must monitor the source system's query pressure and avoid exhausting Kingdee Cloud's interface.

Phase 3: Exception and reconciliation Run a daily discrepancy check: middle layer vs. source system to verify document status consistency; middle layer vs. target system to verify successful write. If the discrepancy exceeds the threshold, trigger an alert rather than waiting until the month-end reconciliation.

Lessons Learned

  1. Inconsistent semantics of the status field: "Approved" in Kingdee Cloud may map to "Pending finance review" in Fenxsi; it cannot be a one-to-one move. The safe approach is to add a status dictionary in the transformation layer that explicitly documents the business meaning of each value.

  2. Refund amount precision: The two systems handle decimals differently—when the source uses two digits and the target uses four, rounding tails of 0.01 are easy to appear. We recommend keeping four digits uniformly in the middle layer, then truncating per the target system's rule on write.

  3. Broken links to the original sales order: Sales return documents often reference the original sales order number. If that original document has not been synced, the target shows "no related order". The typical mistake is syncing only the return document itself, forgetting to verify that upstream data is ready.

  4. Idempotency key design: Using only the document number as the idempotency key is not enough, because the approval time gets updated. We recommend combining document number + last modification timestamp to avoid pushing the same version repeatedly.

  5. Unclassified exception queue: When failure causes are mixed together, troubleshooting has no entry point. We recommend separating at least three categories in Qeasy's exception handling—"interface timeout / field validation failure / business validation failure"—each routed to retry, manual review, or upstream correction respectively.

Suitable and Unsuitable Scenarios

Suitable: Status write-back of sales returns in retail and FMCG; dual-system architectures where finance settlement and business records are separated; customers using Kingdee Cloud as the back-end ERP and Fenxsi as the front-end business system.

Not suitable: Scenarios that need to create return documents on the Fenxsi side (that is a reverse strategy); initialization of return-document master data such as codes and customer profiles (this should be handled by a master-data sync strategy); complex cross-legal-entity or cross-organization return processes (these require a split-document strategy rather than a single write-back).

Original content. Please credit the source when reposting: https://www.qeasy.cloud/insights/solutions/strat-p2d57ef-kingdee-cloud-2909-n43fd152f-8eac2203

Comments