Qeasy Cloud
Get Started

Syncing Inventory Surplus from Kingdee to Wangdiantong: A Qeasy Field Tutorial

· 谢锴斌· Integration Solutions· 13 views· 4 min read

What This Strategy Solves

After a stock count, when books show less than physical inventory, the warehouse records a surplus document. That surplus must leave traces in two systems: an approved surplus document in Kingdee, and a corresponding miscellaneous inbound order in Wangdiantong so stock numbers come back up. Manual double-entry is inefficient and error-prone. We use the Qeasy Data Integration Platform to automate this link, so surplus results flow between the two systems without manual effort.

Data Flow and Field Mapping

The overall flow is one-way: Kingdee Cosmic (source) → Qeasy middle layer → Wangdiantong Enterprise (target). Qeasy handles three jobs: pull the source document, apply code mapping, write to the target.

Key field mapping:

Business MeaningKingdee Cosmic (Source)Wangdiantong Enterprise (Target)
Document NumberDocument No.External Order No.
Document TypeSurplus DocumentMiscellaneous Inbound
WarehouseWarehouse CodeWarehouse ID
ProductProduct CodeSKU No.
QuantitySurplus QtyInbound Qty
Unit PriceUnit PriceInbound Price
AmountAmountInbound Amount
OperatorCreatorOperator
RemarksRemarksRemarks

Centralized code mapping is the most common pattern among Qeasy customers. Storing warehouse and product master data mapping tables in Qeasy's Mapping Table component lets later material and customer integrations reuse the same mappings instead of duplicating them per strategy.

How to Configure on Qeasy

Enter the Qeasy Data Integration Platform → New Integration Strategy → Choose source system "Kingdee Cosmic" and target system "Wangdiantong Enterprise."

Typical configuration points:

  • Data Source: Use Qeasy's Kingdee connector and configure account/tenant info (desensitized; fill in per customer's actual environment).
  • Trigger Mode: Incremental trigger, fetching records where document status = approved AND modification time > last sync time, to avoid duplicates.
  • Field Mapping: Use Qeasy's Field Mapping component for the header; look up warehouse and product codes via the mapping table.
  • Line Items: Surplus documents usually have single-product lines. Use Qeasy's Loop Write component to split multiple material rows and call Wangdiantong's "Save Miscellaneous Inbound" API line by line.
  • Write-back: After a successful write, write the target system's document number back to the source document for easier reconciliation.
  • Failure Handling: Enable Qeasy's Exception Alert component and push notifications to enterprise messaging tools.

Implementation Steps

In customer deployments we generally run in three phases:

Phase 1: Incremental Start Point. First pick a historical time point (e.g., 30 days ago) as the incremental start, so the initial sync only handles the last month of data instead of dumping the full history at once.

Phase 2: Full Trigger. After validating the incremental logic, switch to full trigger to backfill historical surplus documents. At customer sites this typically runs in the early morning hours to avoid daytime business peaks.

Phase 3: Daily Scheduling. After the full backfill completes, switch to incremental + scheduled runs. Frequency depends on the customer's surplus volume — high volume runs hourly, lower volume runs twice a day. Qeasy's scheduler supports crontab expressions and runs automatically once configured.

The header-then-line phased approach is another common pattern: get the header working for one or two days first, then add the loop write and code mapping for line items. Configuring header and lines at once makes troubleshooting harder.

Pitfalls and Lessons Learned

Pitfall 1: Writing warehouse codes without mapping. Kingdee's warehouse codes are alphanumeric; Wangdiantong's are pure numeric. Passing them through directly causes Wangdiantong to auto-create new warehouse records, and within a few months the two warehouse masters no longer match. The safe approach is to maintain a lookup table in Qeasy's mapping component.

Pitfall 2: Not filtering on the surplus document status. A classic mistake is syncing surplus documents in every status, including drafts. The result: the warehouse sees a bunch of unapproved documents generating inbound records and stock gets over-counted. Always add status = approved to Qeasy's pull conditions.

Pitfall 3: Duplicate triggers on document number. Both Kingdee and Wangdiantong have an "external order number" field. If the source system's workflow reverts status after a modification, even a remark-only edit could re-trigger. The safe approach is to deduplicate on "document number + last modified time + status," which Qeasy's Deduplication component supports out of the box.

Pitfall 4: Inconsistent amount precision. Kingdee uses 4 decimal places; Wangdiantong uses 2. Passing amounts through directly triggers rounding. Add a "numeric precision conversion" step in the configuration to keep unit price and amount at 2 decimal places.

Pitfall 5: No retry enabled. Wangdiantong's API occasionally returns 429 due to rate limiting. In one real project, missing retry caused 12 surplus documents to fail syncing overnight, only noticed the next morning. Setting retry count to 3 with a 30-second interval in Qeasy's Call Target component resolves this.

When It Fits and When It Doesn't

Fits: low-volume, audit-sensitive documents like inventory surplus/loss; retail or distribution enterprises running multiple ERP and retail systems side by side; teams that already use Qeasy as a middle layer for master data sync and want to extend to transaction documents. Does not fit: very high volume scenarios (thousands of documents per day) requiring second-level real-time sync — those are better served by database-level CDC rather than API polling; nor cases where surplus document fields differ so much from the target inbound order that almost a second full entry is needed.

Original content. Please credit the source when reposting: https://www.qeasy.cloud/insights/solutions/strat-wdt-kingdee-cloud-5259-naeaa84d1-13cfc38a

Comments