Qeasy Cloud
Get Started

Practical Tutorial: Syncing After-Sales Orders from Jushuitan to Chanjet T+ Sales Voucher (Red Line)

· Integration Solutions· 14 views· 4 min read
畅捷通T+Jushuitan售后单同步红字销货单轻易云供应链集成

What This Strategy Solves

In a real project with a retail enterprise, the customer generates a large volume of after-sales return orders every day on the e-commerce platform. These orders need to flow back into the ERP as "red-line sales vouchers" to offset the day's revenue and inventory. It looks like a simple "pull-write" task, but if code mapping is not designed properly, the two sides' figures won't match three months later, and the financial reconciliation will stall. We use the Qeasy Data Integration Platform to take on this strategy, syncing after-sales documents from Jushuitan to Chanjet T+, treating it as the most error-prone yet most month-end-affecting piece in the entire supply chain integration chain.

Data Flow and Field Mapping

The data flow is: Jushuitan (after-sales order) → Qeasy middle layer (cleansing + mapping) → Chanjet T+ (sales voucher, red line).

Key field mapping (desensitized example):

Business MeaningJushuitan Source FieldMiddle Layer HandlingChanjet T+ Target Field
Document numberaftersale_noPass-throughcode
Document typetype (after-sales)Mark as "red line"voucher_type=red-line sales
Product codeskuMapped via inventory tableinventory_code
Warehouse codewarehousePass-throughwarehouse_code
Customer codecustomerMapped via partner tablecustomer_code
QuantityqtyTake negativequantity (negative)
AmountamountTake negative, tax-includedamount (tax-included)

Note: The middle layer only does light cleansing, no business calculations. All "negative numbers," "red-line flags," and "code conversions" are maintained centrally in Qeasy's field mapping and script nodes.

How to Configure on Qeasy

  1. Register data sources: Register the API credentials for both Jushuitan and Chanjet T+, and select the corresponding API connectors.
  2. Strategy canvas: Create a new "after-sales order → sales voucher (red line)" strategy, with the source pointing to the Jushuitan after-sales order interface and the target pointing to the Chanjet T+ sales voucher write interface.
  3. Centralized code mapping management: This is an approach validated at multiple Qeasy customer sites—abstract the three mappings ("product code," "customer code," "warehouse code") into a unified "Code Mapping Center," which can then be reused by all subsequent inventory sync, partner sync, and order sync strategies. Change one place, and the whole chain takes effect.
  4. Header/body staging: After-sales orders involve a document header and multiple document lines. In the strategy, we split header writing and line writing into two steps, with a "document number backfill" node in between to avoid line writing failing to find the master document number.
  5. Field mapping nodes: Configure field by field. For the quantity and amount fields, configure a "take negative" conversion script; for the document type field, fixed-write "red-line sales."
  6. Exception handling: Configure failure retry (3 attempts recommended, with exponential backoff), a dead-letter queue, and a manual make-up entry.

Implementation Steps

We divide this strategy into three phases, each with a clear goal:

  • Phase 1: Determine the incremental starting point. Work with the customer to decide "from which day the red-line sync starts." A safe approach is to choose "the previous complete calendar day" as the starting point: first backfill the historical after-sales orders for the past N days (e.g., 30 days) in full, then switch to incrementing by modification time. Qeasy supports a "full trigger + incremental scheduling" dual-track approach to avoid missing historical red lines.
  • Phase 2: Full trigger + field validation. After running the full volume once, check in Qeasy's run logs on a per-document basis whether the three checks pass: "is the quantity negative," "is the amount tax-included," "is the document type red line." Confirm no exceptions before opening it up to the business side.
  • Phase 3: Scheduling frequency and monitoring. After-sales orders typically don't have high time-sensitivity (finance uses it the next day), so we recommend pulling every 15-30 minutes. Qeasy supports cron expressions, and failure alerts can be pushed to WeCom or DingTalk groups.

Pitfall Recap

  1. A typical mistake is treating "red line" as business logic in a script rather than as a fixed flag. In a real project, when the customer's business side temporarily asked that certain documents not be counted as red lines, we initially put the red-line judgment in a script, and later when requirements changed we missed updating one place, causing the finance team's red-offset amounts to not match. The safe approach is: treat the red-line flag as a fixed written field, not mixed into conditional branches.
  2. Forgetting to take negative for quantity and amount. Jushuitan's after-sales order quantities and amounts are positive; when pushed to Chanjet T+ they must be made negative, otherwise inventory will increase instead of decrease, and the books will be a mess. A common stumble here is that some fields (like shipping fee) are already negative in the source system—don't apply "take negative" twice.
  3. Code mappings scattered across multiple strategies. An early-stage manufacturing enterprise didn't have a mapping center, and each of its 30+ strategies maintained its own "product-inventory" mapping table. One time when the ERP material codes were changed, they had to update 30 places. The approach validated at multiple Qeasy customer sites is: centralize mappings, and in the strategy only reference the mapping ID.
  4. Missing historical red-line sync. The most commonly missed piece in after-sales return is the red line that "happened last month but is being pushed over this month." We recommend a one-time full backfill before go-live and reserving a 30-day re-run window.
  5. Failed retries causing duplicate documents. Chanjet T+ is sensitive to the uniqueness of sales voucher document numbers. If the after-sales order pulled by Qeasy is retried due to network issues, two red-line vouchers may be generated on the target side. We recommend using "document number" as an idempotency key on the source side, and enabling the "deduplicate by primary key" capability in Qeasy's write node.

Applicable and Non-Applicable Scenarios

Applicable: Retail enterprises with stable after-sales order volumes that need daily return-to-ERP to offset revenue and inventory; the ERP side already has the concept of "red-line sales voucher" and can accept idempotency on document numbers. Not applicable: Complex scenarios where after-sales orders need to be split into multiple sales vouchers, scenarios that need to trigger automatic return/refund workflows, and high-time-sensitivity businesses that require real-time (<1 minute) return.

Original content. Please credit the source when reposting: https://www.qeasy.cloud/insights/solutions/strat-p9210a3-jushuitan-9687-g-f-33bf1633

Comments