Cross-border E-commerce ERP and Finance ERP Supply Chain Integration Overview: 29 Strategies for LingXing and Kingdee Cloud Xingchen
Scenario and Value
During cross-border e-commerce promotion seasons, inventory deduction and purchase reconciliation are often only discovered by the business team on the third day after the event. Orders have already been placed on the storefront, and the upstream ERP has already reserved inventory, but the finance ledger in Kingdee Cloud Xingchen cannot confirm inbound and outbound amounts until reports are manually exported. The problem is not with either system recording data; it is the absence of an automated closed loop that sequences sales outbound, purchase inbound, adjustment orders, and FBA cost flows in time order.
In one real project, we faced exactly this scenario: a cross-border e-commerce seller used LingXing ERP to manage multi-platform storefronts and overseas warehouses, while using Kingdee Cloud Xingchen for domestic finance and supply chain accounting. Master data was scattered across the two systems, with inconsistent coding conventions for products, suppliers, customers, and warehouses. Sales orders, purchase documents, and adjustment documents required cross-system reconciliation. We used the Qeasy Data Integration Platform (轻易云数据集成平台) as the bridging layer, breaking the chain into 29 schedulable synchronization strategies running in a public cloud environment, achieving near-real-time sync during the day and full reconciliation at night.
Integration Architecture and Data Flow
The overall architecture follows a typical "two endpoint systems + central integration platform" pattern: LingXing ERP and Kingdee Cloud Xingchen serve as the business endpoints, while Qeasy handles code mapping, field transformation, dependency orchestration, and exception retry. The platform itself does not store business documents; it only performs "scheduling + transformation + write-back."
Data flows in three directions:
- LingXing → Kingdee (22 strategies): covers products, suppliers, storefronts, customer master data, as well as sales outbound orders, sales return orders, purchase inbound orders, purchase return orders, adjustment orders (goods/defective inbound and outbound), FBA cost valuation flows, transfer orders, and profit statement to other income/refunds.
- Kingdee → LingXing (1 strategy): Kingdee subcontracting inbound orders are written back as LingXing purchase orders, used to feed back the subcontracting processing chain.
- Both endpoints → Integration Platform (6 strategies): token acquisition, Kingdee unit of measure queries, Kingdee material queries, Kingdee transfer outbound queries, Amazon listing fetches, and data cleanup routines. These "query-only" strategies are used for lookup enrichment in business documents.
In terms of dependencies, Strategy 1 ("Get Token") is the prerequisite for all strategies that call Kingdee APIs. Strategies 2, 4, 5, and 6 (master data synchronization) must complete first so that materials, customers, and suppliers in business documents can be looked up. Strategies 3 and 17 are query-type strategies used by other strategies to look up units of measure and materials.
Interface Inventory
| Strategy ID | Data Object | Sync Direction | Notes |
|---|---|---|---|
| 1 | Get Token | Kingdee → Platform | Prerequisite for all Kingdee API calls |
| 2 | LingXing Products → Kingdee Materials | LingXing → Kingdee | Master data, sku→number |
| 3 | Kingdee Unit of Measure (query) | Kingdee → Platform | Lookup enrichment |
| 4 | LingXing Suppliers → Kingdee Suppliers | LingXing → Kingdee | Master data |
| 5 | LingXing Amazon Storefronts → Kingdee Customers | LingXing → Kingdee | Master data |
| 6 | LingXing Multi-platform Storefronts → Kingdee Customers | LingXing → Kingdee | Master data |
| 7 | Sales Order (Amazon) → Sales Outbound | LingXing → Kingdee | Depends on 2, 5, 6 |
| 8 | Sales Order (Amazon Multi-channel) → Sales Outbound | LingXing → Kingdee | Depends on 2, 5, 6 |
| 9 | After-sales Order → Sales Return | LingXing → Kingdee | Depends on 2, 5, 6 |
| 10 | Purchase Inbound → Purchase Inbound | LingXing → Kingdee | Depends on 2, 4 |
| 11 | Kingdee Subcontract Inbound → LingXing Purchase Order | Kingdee → LingXing | Depends on 2 |
| 12/13 | Adjustment Order (goods inbound/outbound) → Other Inbound/Outbound | LingXing → Kingdee | Depends on 2, 17 |
| 14/15 | FBA Cost Flow (inventory outbound/inbound, removal) → Other Inbound/Outbound | LingXing → Kingdee | Depends on 2, 17 |
| 16 | Amazon Listing (query) | LingXing → Platform | Lookup enrichment |
| 17 | Kingdee Material (query) | Kingdee → Platform | Lookup enrichment |
| 18 | Kingdee Transfer Outbound (query) | Kingdee → Platform | Lookup enrichment |
| 19 | Data Cleanup Routine | Platform internal | System maintenance |
| 20/21 | Transfer Order → Transfer Outbound/Inbound | LingXing → Kingdee | Depends on 2, 17 |
| 22 | Purchase Return → Purchase Return | LingXing → Kingdee | Depends on 2, 4 |
| 23/24 | Adjustment Order (defective inbound/outbound) → Other Inbound/Outbound | LingXing → Kingdee | Depends on 2, 17 |
| 25/26/27 | FBA Shipment-Cost Flow → Transfer Inbound / Other Inbound / Other Outbound | LingXing → Kingdee | Depends on 2, 17 |
| 28/29 | Profit Statement → Other Income Refund / Other Income | LingXing → Kingdee | Depends on 5, 6 |
Implementation Essentials
Phased Scheduling. Master data (Strategies 2, 4, 5, 6) must be run in full before business documents on first launch, then switched to incremental. Business documents are triggered serially in the order "Sales → Purchase → Inventory → Finance" to avoid writing business documents before downstream materials are created.
Incremental Fields and Full Reconciliation. Incremental sync typically pulls a time window based on update_time or document date. However, in cross-border chains, FBA cost flows and write-back documents may experience "delayed return." The reliable approach is to perform a fixed-window full reconciliation weekly to recover any missed documents outside the incremental window.
Centralized Code Mapping. The four mapping types—sku→number, supplier_id→number, sid→customer_number, wid→warehouse_id—are the lifeblood of the entire solution. They are placed in a unified mapping table on the platform, and any missing entry will cause downstream documents to fail directly.
Exception Retry. Network timeouts are retried three times with exponential backoff (5s/15s/45s). On receiving HTTP 429 rate limiting, the system waits 60 seconds before retrying, up to twice. Token expiration triggers automatic re-fetch on the platform, after which the current request is retried. Single-record failures do not block the entire batch; failed records are written to a failure table for manual or scheduled reprocessing.
Privacy Handling. Solution documents, mapping tables, and logs never contain real customer names, storefront names, SKU details, or token fields. Any field involving personal or commercial sensitivity is uniformly masked or left blank on the platform side.
Best Practices and Pitfall Retrospectives
Pitfall One: Master Data Not Run First, Business Documents All Fail. During the first launch, we started all strategies in parallel, and as a result, all sales outbound orders failed because material codes could not be found. The reliable approach here is to explicitly mark master data strategies as "prerequisites" that block downstream strategies on failure, rather than sending them to the failure table.
Pitfall Two: Field Aggregation from Profit Statement to Other Income. The LingXing profit statement has fine-grained fields (totalSalesAmount, shippingCredits, promotionalRebates, etc.) that cannot be mapped 1:1 directly. An AfterSourceInvoke script is required to aggregate non-zero fields into an entry array. Moreover, "income" and "refund" must be split into two documents; otherwise, reconciliation on the finance side breaks down.
Pitfall Three: Direction Determination for FBA Cost Flows. FBA cost flows include multiple types such as inventory inbound, inventory outbound, FBA removal, and FBA shipment, each corresponding to different Kingdee documents (other inbound, other outbound, transfer inbound). A common mistake here is writing the "outbound" quantity as the original value; in practice, the absolute value should be taken, otherwise negative values will be rejected by Kingdee directly.
Best Practice: Dual-Channel Split for Qimen/Non-Qimen. When integrating multi-platform storefronts, Amazon goes through the mws/orders channel, while Amazon multi-channel goes through another set of APIs. These two types are separated in Strategy 7 and Strategy 8, and document numbers are concatenated using amazon_order_id + sid to ensure uniqueness and avoid duplicate writes.
Best Practice: Two-Phase Write for Header and Line Items. Business documents first write the header to obtain the Kingdee-returned internal ID, which is then written back to the associated field on the line items for two-phase writes. This way, if the material code lookup on the line items fails, no half-finished documents remain to contaminate the finance ledger.
When to Use Qeasy
When business operations span two or more heterogeneous systems with inconsistent coding conventions, where documents need to be orchestrated by dependency relationships, and where there are clear requirements for incremental/full switching, exception retry, and audit traceability, the Qeasy Data Integration Platform (轻易云数据集成平台) can serve as the central integration layer. It turns data movement between Kingdee Cloud Xingchen, LingXing ERP, and other ERP/CRM/WMS systems into visual strategy orchestration. The 29 strategies are automatically scheduled according to the dependency graph, compressing the typical implementation timeline from weeks to days.