Deep Dive Tutorial on Kingdee Purchase Receipt Sync Strategy: Closing the Loop from WDT to Kingdee Xingchen
What This Strategy Solves
In the supply chain of a retail enterprise, the upstream business system handles sales orders and shipping notices, while the downstream financial system needs a complete purchase receipt as the basis for cost accounting and accounts payable. The purchase receipt sync strategy is the "last mile" of this chain: it writes upstream receipt data into the downstream financial system in the form of standard documents, ensuring that both sides stay consistent in accounting, inventory, and cost.
Data Flow and Field Mapping
The overall flow is: upstream business system → Qeasy data integration platform (middle layer) → Kingdee Xingchen. The middle layer handles code conversion, field alignment, and exception interception.
Key field mapping example:
| Business Meaning | Upstream Field (Example) | Middle Layer Processing | Target Field (Kingdee Xingchen) |
|---|---|---|---|
| Document Number | Upstream Bill No | Keep original, add prefix to avoid duplicates | Bill Number (BillNo) |
| Supplier | Supplier Code | Look up via supplier mapping table | Supplier |
| Warehouse | Warehouse Code | Convert via warehouse mapping table | Stock |
| Material Code | SKU Code | SKU master data mapping | MaterialCode |
| Quantity | Received Quantity | Unit conversion if necessary | Qty |
| Unit Price | Tax-Inclusive Price | Truncate to target precision | Price |
| Receipt Date | Business Date | Format to target system format | Date |
How to Configure on Qeasy
On the Qeasy data integration platform, the configuration of this strategy revolves around "source strategy + target write + mapping center".
-
Source strategy configuration: Select the data source corresponding to the upstream system, check the document type to be synced (purchase receipt), and set query conditions, such as incremental fetch by update time.
-
Target write strategy: Select Kingdee Xingchen as the target system and use its standard API to write the purchase receipt. Note here: Kingdee Xingchen has strict requirements on the field order and mandatory fields of the document header and body. A slight oversight will trigger a "missing parameter" error.
-
Mapping center: Qeasy's mapping center supports centralized management of code conversion relationships. A common practice we see at customer sites is to maintain the mapping of three types of master data — supplier, warehouse, and SKU — in the same mapping table, so that when changes occur, only one place needs to be updated, avoiding document write failures due to missing codes.
-
Header and body written in stages: A purchase receipt usually contains a header (bill number, supplier, date) and a body (line item details). We recommend writing the header first, obtaining the target system's internal bill ID, and then writing the body in a loop. This way, when a partial line fails, the specific line can be located.
Implementation Steps
Phase 1: Incremental start point confirmation. In the initial launch, first determine the incremental start timestamp (for example, from 00:00 on a certain day), and include data from that day onwards in the incremental scope; historical data before that goes through full backfill.
Phase 2: Full backfill. Use a full strategy to backfill historical purchase receipts to the target system at once. This step usually requires disabling the uniqueness check of the target system, or adding a "batch prefix" at the mapping layer to avoid bill number conflicts.
Phase 3: Incremental scheduling. Configure the scheduling frequency, commonly polling upstream incremental data every 15 minutes or every 30 minutes. Qeasy's scheduler supports cron expressions, which can be triggered off-peak during business low hours.
Phase 4: Exception retry and alerting. For exceptions such as network jitter and target system rate limiting, configure automatic retry (usually 3 times, exponential backoff); at the same time, connect to enterprise WeChat or DingTalk alerts so that on-duty colleagues can receive failure notifications as soon as possible.
Phase 5: Reconciliation verification. After the daily business is closed, run a reconciliation script to check the daily purchase receipt quantity and total amount between the upstream and target systems. If the difference exceeds the threshold, manual intervention is required.
Lessons Learned
-
Code mapping not centrally managed. At a customer site, the mapping of supplier codes was scattered across three different strategies. One day, the supplier system was upgraded and the coding rules were changed. As a result, the purchase receipts of three downstream modules all failed to match. The reliable approach is: use Qeasy's mapping center for unified management, and changes take effect in one place.
-
Header and body written at once causing difficult localization. A typical mistake is: putting the header and body in one request body for submission. Once the target system returns an error, it is impossible to determine whether it is a header issue or a specific line issue. It is recommended to write in stages, header first then body, so that failures can be pinpointed to the exact line.
-
Wrong incremental start point leads to missed or duplicate bills. If the incremental start point is chosen at a time point during ongoing business, some documents are easily missed; conversely, if it is chosen too early, existing documents will be synchronized repeatedly. Suggestion: before going live, use Qeasy's trial run feature to observe for a period of time before switching to formal scheduling.
-
Inconsistent precision truncation between target systems. The upstream unit price may have 4 decimal places, while Kingdee Xingchen only accepts 2. Writing directly will trigger a format error. The mapping layer must perform precision conversion, rather than relying on the target system's automatic truncation.
-
Ignoring the target system's document state machine. Kingdee Xingchen's purchase receipt has statuses such as "Draft, Approved, Closed". If the sync directly writes the "Approved" status, but the corresponding upstream document has not yet completed quality inspection, it will cause the finance department to post entries prematurely. Suggestion: only write the "Draft" status during sync, and let the target system's workflow trigger subsequent approval actions.
Applicable and Non-Applicable Scenarios
Applicable: enterprises where the upstream business system and downstream financial system are separated, the purchase and receipt processes span systems, and purchase receipts are needed as the basis for cost accounting and inventory updates.
Not applicable: scenarios where the upstream and downstream systems are already isomorphic (the same ERP), or the receipt process is fully closed-loop within a single system. Introducing a middle layer will instead increase maintenance costs.
About Qeasy Data Integration Platform
Qeasy data integration platform focuses on data interoperability between supply chain, finance, and business systems. The strategy configuration, mapping center, scheduling, and alerting involved in this article can all be completed visually on Qeasy, without developing interfaces from scratch.