Qeasy Cloud
Get Started

Wangdiantong Miscellaneous Stock-In to Kingdee Cloud Cosmic: A Single-Strategy Integration Tutorial

· 高金凤· Integration Solutions· 16 views· 4 min read
WDTKingdee CloudInventory Sync轻易云供应链集成单据同步

What This Strategy Solves

In a real retail supply chain integration project, the e-commerce mid-platform used Wangdiantong Qimen for warehouse operations, while financial and inventory ledgers lived in Kingdee Cloud Cosmic. The client required that miscellaneous stock-in orders from Wangdiantong — such as inventory surpluses, adjustments, and form conversions — be synced to Kingdee in near real-time based on the business occurrence date, serving as the source document for cost accounting and inventory bookkeeping.

It looks like a simple document push, but in practice it is easy to fail: document type filtering is not strict enough, so purchase stock-ins leak in; encoding mappings are not centrally managed, and after three months the numbers on both sides do not match; the incremental start point is chosen incorrectly, and on day one the entire history gets re-pushed.

Data Flow and Field Mapping

Data flow: Wangdiantong Qimen → Qeasy Data Integration Platform → Kingdee Cloud Cosmic.

The source side calls the wdt.stockin.order.query interface, with the query condition order_type=6 strictly limiting the result to "miscellaneous stock-in" type, preventing purchase stock-ins and transfer stock-ins from being mixed in.

Key field mapping (header):

Source FieldTarget FieldMapping TypeDescription
stockin_noFBillNoDirectStock-in number as document number
stockin_timeFDateDirectStock-in time as business date
remarkFNOTEDirectRemark passed as-is
-FBillTypeIDConstant QTRKD01_SYSStandard miscellaneous stock-in type
-FStockOrgIdConstant 106Inventory organization
-FDEPTIDConstant BM000002Business department
-FSUPPLIERIDConstant nullMiscellaneous stock-in does not involve a supplier
details_listFEntityCollection referenceDetail line array

Detail line mapping: spec_no (preferred) or goods_no in details_list maps to FMaterialId; goods_count maps to FQty; price/tax_price/total_amount map to FPrice/FTaxPrice/FAmount; batch_no maps to FLot; unit_name maps to FUnitID.

How to Configure on Qeasy

In the Qeasy Data Integration Platform, one strategy corresponds to one integration scenario. During configuration, connections must be established on both the source and target platforms, then field mappings and target control parameters are assembled.

Source side (Wangdiantong Qimen) configuration: select API wdt.stockin.order.query, method POST; in the request parameters, set start_time to {{LAST_SYNC_TIME|datetime}}, end_time to {{CURRENT_TIME|datetime}}, and order_type to a fixed value 6; the primary key field is configured as stockin_id, and the number field as order_no.

Target side (Kingdee Cloud Cosmic) configuration: select API batchSave, set FormId to STK_MISCELLANEOUS; control parameters IsVerifyBaseDataField=true (validate base data validity), Operation=Save, IsAutoSubmitAndAudit=true (auto-submit and audit after save).

In the field mapping area, configure header fields one by one according to the mapping table, and set FEntity's value directly to details_list — the integration platform handles row-level looping in the data processing layer, with no scripting required.

Implementation Steps

We split the implementation of this strategy into three phases:

  1. Baseline preparation phase: First maintain inventory organizations, departments, materials, warehouses, and unit-of-measure base data in Kingdee Cloud Cosmic, with codes consistent with the constants; then configure the source and target connections on Qeasy, and perform a smoke test with a full sync to confirm documents land correctly.

  2. Incremental start point phase: Set LAST_SYNC_TIME to a clear historical point in time (e.g., 23:59:59 the day before go-live), then run a "full trigger" once to sync all existing miscellaneous stock-in orders; immediately afterwards, update LAST_SYNC_TIME to the completion time of this run, and enter incremental mode.

  3. Scheduled run phase: source crontab is set to 5-59/15 * * * * (every 15 minutes, with minute staggering), target crontab is set to 5-59/18 * * * *, with both ends offset by a few minutes to avoid simultaneous-write conflicts; under normal conditions no manual intervention is needed.

Pitfall Review

Pitfall 1: order_type not filtered strictly enough. The most typical mistake is to omit order_type=6 and pull all stock-in orders. The reliable approach is to pass 6 explicitly and pin it into the request parameters in the conditional branch.

Pitfall 2: Material code misalignment. goods_no and spec_no are two different encoding systems. A common pattern we have seen with Qeasy customers is "centralized encoding mapping management" — maintain a SKU-to-Kingdee material code mapping table in the integration platform, handle it uniformly in the transformation layer, and avoid duplicate configuration per strategy.

Pitfall 3: Detail lines collapsed into one. FEntity's value must be the array identifier details_list; if a field name is mistakenly filled in, the entire document will have only one line.

Pitfall 4: Auto-audit causes traceability issues. IsAutoSubmitAndAudit=true is suitable for batch stock-in scenarios, but if the client requires offline audit workflows, this parameter must be turned off — otherwise once saved, it cannot be reversed.

Pitfall 5: Wrong start_time causes full re-push on day one. On the first day of go-live, manually verify the LAST_SYNC_TIME starting point. It is better to push less than to push more — over-pushing will trigger target-side deduplication logic and downstream cost settlement anomalies.

Suitable and Unsuitable Scenarios

Suitable scenarios: Retail e-commerce and chain retail enterprises that use Wangdiantong as a warehouse mid-platform and Kingdee Cloud Cosmic as a financial inventory ledger; scenarios where miscellaneous stock-ins such as surpluses, adjustments, and form conversions need to be pushed to Kingdee in near real-time as the source for cost accounting.

Unsuitable scenarios: When the enterprise needs other types such as purchase stock-in, transfer stock-in, or sales return stock-in, the corresponding order_type and target FormId should be configured; when material or warehouse base data has not yet been created on the Kingdee side, basic data sync (e.g., material and warehouse mapping strategies) should be done first before running this strategy.

Original content. Please credit the source when reposting: https://www.qeasy.cloud/insights/solutions/strat-wdt-kingdee-cloud-2585-nb495bd2c-a515991a

Comments