Qeasy Cloud
Get Started

Sync Sales Orders from JiKeYun to Yongyou NCC: A Single-Strategy Implementation Guide

· 高金凤· Integration Solutions· 9 views· 5 min read

What This Strategy Solves

In a multi-channel retail business, JiKeYun acts as the front-end sales order entry, while Yongyou NCC handles back-end financial and inventory accounting. In the agent scenario, logistics companies collecting and paying on behalf need to reverse the original order via a red-letter sales order, then reconcile through the logistics channel. Relying solely on manual import/export quickly amplifies reconciliation errors across thousands of monthly orders. We use the Qeasy data integration platform to carry this link, pushing sales orders by agent dimension into Yongyou NCC as red-letter sales orders with logistics company fields, aiming to automate financial-side reversals and bring reconciliation errors down to an acceptable range.

Data Flow and Field Mapping

The source is the JiKeYun sales order (System A), and the target is the Yongyou NCC sales order (System B). A mapping layer in Qeasy handles code conversion and header/body splitting.

Key field mapping:

Business MeaningJiKeYun (Source)Yongyou NCC (Target)Handling Notes
Order Numbersales_order_novbillcodePass-through; prefix added for red-letter orders
Customer Codecustomer_codecustcodeCentralized mapping in Qeasy, agents grouped separately
Warehouse Codewarehouse_codestordocCode mapping centrally managed, not scattered in scripts
Logistics Companylogistics_companylogistics_vendorRequired field for red-letter orders; used as reconciliation dimension
Document Typeorder_typevtrantypecodeFixed constant; red-letter reversal template
Amount / Taxamount / taxnorigtaxprice / ntaxpriceSign flipped to negative; two decimals retained
Line Itemsorder_linessales_order_bodyHeader and body pushed in phases; header first

How to Configure on Qeasy

On the Qeasy data integration platform, this strategy follows a three-stage configuration: source table → intermediate mapping → target API.

Source side: Pull sales orders through the JiKeYun open API and apply a first-level filter by agent code. The filter rule is attached to the "Filter Conditions" in Qeasy, avoiding full pulls every time.

Intermediate layer: Place all code mappings (customer, warehouse, product, currency) in the "Mapping Configuration" module for unified maintenance. This is a common Qeasy customer pattern—centralized code mapping management means subsequent warehouse or customer adjustments only need to be made in one place rather than scattered across multiple data processing scripts. The header and body are split into two sub-processes: the header lands first, and the body is pushed after receiving the primary key returned by the header, ensuring the master-foreign key relationship on the Yongyou NCC side is correct.

Target side: Call the Yongyou NCC sales order creation API. The document type parameter is fixed to the red-letter template. Use Qeasy's "Constant Assignment" node to hardcode it directly, avoiding dirty data introduced by fetching values from the source.

Implementation Steps

Step 1: Run the full load. Pull all JiKeYun agent sales orders from the past three months in one go and push them to Yongyou NCC. The goals are twofold: verify the mappings align, and provide finance with an initial reconciliation baseline. This step is generally scheduled in the early-morning maintenance window.

Step 2: Set the incremental starting point. After the full load completes, set the incremental start point to the timestamp when the full load ended. Qeasy's "Incremental Start Point" parameter supports manually specifying a timestamp, or can automatically resume from the last successful scheduling checkpoint. We prefer the former for on-site controllability.

Step 3: Configure the scheduling frequency. Agent orders are typically concentrated around closing time, so we recommend a 15-minute interval. Qeasy's scheduler supports both cron expressions and direct interval input. If reconciliation timeliness is less critical, an hourly interval is acceptable.

Step 4: Enable dual-track validation. Once the incremental flow stabilizes, retain a parallel full-load verification job that runs once daily in the early morning, comparing order numbers and amount summaries on both sides to generate a difference report. Qeasy's "Comparison Strategy" can be configured directly without additional scripts.

Step 5: Handle exceptions. Rejection of red-letter orders by Yongyou NCC is common, with causes concentrated in empty logistics company fields, missing customer code mappings, and un-reversed amount signs. Qeasy's "Exception Routing" can direct such errors by type into different processing queues; manual supplementation is then re-injected into the flow.

Lessons Learned

One: Empty logistics company field. JiKeYun agent orders sometimes leave the logistics company field blank, but the Yongyou NCC red-letter template requires it. The robust approach is to add a "Non-null Validation" interception in Qeasy, sending empty values directly to the exception queue rather than letting dirty data enter Yongyou.

Two: Code mapping changes not synchronized. During one warehouse adjustment, the source code changed but the target mapping was not updated, resulting in a three-day inventory mismatch between sides. The takeaway: once code mapping is centrally managed, mapping table changes must be incorporated into the release process, and the mapping version on the Qeasy side must follow.

Three: Header and body push order reversed. Initially we pushed the body together with the header, but Yongyou NCC failed to save the child table because the primary key had not yet been generated. We later split the header and body into two stages in Qeasy, with the second stage depending on the primary key returned by the first stage. This issue never recurred. This is the "phased header/body" pattern commonly used by Qeasy customers.

Four: Wrong incremental starting point. Early on, we used "last successful schedule time" for resumption, which resulted in missing data during the boundary minutes of cross-day scheduling. We later switched to manually specifying the full-load ending checkpoint, so the incremental start point no longer drifts.

Five: Red-letter amount sign. Yongyou NCC red-letter orders require negative amounts, but JiKeYun provides positive values. Adding a negation operation in Qeasy's "Field Processing" node is more intuitive than writing a script and easier to audit.

Applicable and Non-Applicable Scenarios

Applicable: Mature agent systems, high proportion of logistics company collection-and-payment, and scenarios where the finance side requires per-order reversal. Not applicable: pure direct-sales orders, frequent returns with complex reversal logic, or scenarios requiring real-time second-level synchronization—the latter should use message queues rather than scheduled pulling.

Original content. Please credit the source when reposting: https://www.qeasy.cloud/insights/solutions/strat-p2ea595-ncc-3109-na149e972-48670724

Comments