Kingdee Cloud Cosmos → Xiaofengbee WMS Inventory/Document Sync Interface Field Handbook
What This Interface Solves
In multi-org, multi-warehouse supply chains, retailers commonly suffer from ERP-WMS fragmentation: Kingdee Cloud Cosmos owns purchasing, sales, and inventory accounting, while Xiaofengbee WMS runs physical warehouse operations, and both sides must stay in lockstep. This tutorial focuses on the one-way sync interface family from Kingdee Cloud Cosmos to Xiaofengbee WMS, covering 19 strategy types (materials, customers, purchase receipts, production receipts, sales out/delivery returns, miscellaneous issues, transfers), and consolidates hands-on experience from multiple projects into a reusable field handbook.
Interface Capabilities Overview
Authentication: Kingdee Cloud Cosmos uses OAuth2 + tenant authorization; Xiaofengbee WMS uses API Key in the request header. All credentials are stored in a secrets manager.
Request/Response: The source side uses Kingdee QueryForm/ExecuteBillQuery; the target side uses Xiaofengbee WMS REST endpoints: /goods/v4, /customers/v4, /inOrders/v4_1, /outOrders/v4_1. The source returns paginated results; the target returns a JSON {code, data} envelope for single/batch writes.
Pagination & Incremental: Kingdee supports FilterString + Limit/StartRow. Incremental fields are FModifyDate (master data) or FApproveDate (business documents), and LAST_SYNC_TIME is maintained per strategy. Full sync removes time filters and relies on target-side idempotency by inOrderNo/outOrderNo/FBillNo.
Typical Field Mappings
The table below shows representative mappings for Strategy 1 (Material) and Strategy 8 (Sales Outbound).
| Source Field (Kingdee) | Target Field (Xiaofengbee WMS) | Type | Meaning | Field Notes |
|---|---|---|---|---|
| FNumber | goodsCode | string | Material code | Unique cross-system identifier and idempotency key |
| FName | goodsName | string | Material name | Pass-through, watch Unicode length |
| FSpecification | specificationType | string | Spec/Model | Pass-through |
| FBARCODE | goodBarcodePS | string | Barcode | Falls back to FNumber when blank |
| FGROSSWEIGHT | grossWeight | decimal | Unit gross weight | Kingdee unit = gram, WMS expects kg — must divide by 1000 |
| FIsBatchManage | collectBatchNo | bool | Batch required | Controls whether WMS mandates batch number |
| FCategoryID | goodsCategoryId | int | Category Id | COLLECTION mapping, requires category crosswalk |
| FBillNo | inOrderNo/outOrderNo | string | Document number | Core idempotency key, pass-through |
| FDate | estimatedArrivalDate | date | ETA | Format conversion required |
| FSupplierId_FNumber | supplierCode | string | Supplier code | Mapping table required |
| FStockId_F_dps_wmsstock | houseCode | string | Warehouse code | COLLECTION mapping via custom field |
| FMaterialId_FNumber | goodsCode | string | Goods code | Detail row, COLLECTION |
| FRealQty | qty | decimal | Quantity | Pass-through |
| FLot_FNumber | lotNo | string | Lot number | Pass-through |
| FLinkMan | contactName | string | Contact | Pass-through, mask in storage |
| FLinkPhone | mobile | string | Contact phone | Pass-through, mask in storage |
| FHeadLocationId | provinceId/cityId/areaId | int | Region | COLLECTION mapping, address parsing |
How to Configure on Qeasy (Qingyiyun)
In the Qeasy Data Integration Platform, this interface family typically uses a Kingdee adapter plus a Xiaofengbee WMS adapter pair. The Kingdee adapter configures FormId (e.g. BD_MATERIAL, SAL_OUTSTOCK, STK_InStock) and FilterString; the WMS adapter selects endpoints such as /goods/v4, /inOrders/v4_1, /outOrders/v4_1. The Field Mapper auto-detects four mapping types: Direct / Collection / Transform / Constant. Fields requiring crosswalk tables (category, warehouse, customer) are wired to Qeasy's Mapping Component, where FCategoryID→goodsCategoryId and FNumber→goodsCode are auto-established inside the master-data strategies. At the orchestration layer, the platform maintains per-strategy LAST_SYNC_TIME, retry policy (exponential backoff 30s/60s/120s, max 3) and a dead-letter queue; failed records land in sync_failed_records and trigger alerts.
Cross-Strategy Field Notes
- Master data first: Materials and customers must sync before any business document; otherwise "master data missing" hard-fails occur and should not retry — fix mapping, then rerun.
- Idempotency design: Always use Kingdee
FBillNoas the WMSinOrderNo/outOrderNo, with a unique index on the target as a safety net. - Unit & precision traps:
FGROSSWEIGHTis in grams (Kingdee) but kg (WMS) — divide by 1000. Confirm decimal places and rounding rules for qty/amount. - outType/inType routing: A single sales outbound may flow as offline (2), online (1), OEM, transfer (6), purchase return (7), or miscellaneous (4). A safe rule combines customer code + custom fields + document type, not document type alone.
- Pick the right incremental field:
FModifyDatefor master data,FApproveDatefor business documents — never mix them, or you'll drop or duplicate records. - Mapping timing: Build
FNumber→WMS codeinside the master-data strategy by writing the mapping table before calling the target API. Business documents then read from the table to avoid cascading failures.
Pitfall Playbook
- Pitfall 1: Audit/Forbid filters missing. Material sync forgot to filter
FDocumentStatus='C'andFForbidStatus='A', so disabled materials hit WMS and caused duplicate putaways. Fix: Always include audit + forbid conditions in FilterString. - Pitfall 2: Default region fallback. Sales outbound address had no
FHeadLocationId→province/city/areamapping, defaulted everywhere, breaking pick paths. Fix: COLLECTION mappings must be real — failures go to DLQ, never to defaults. - Pitfall 3: Infinite retry on 5xx. Network blips sent everything to dead-letter and stalled the business. Fix: Exponential backoff 30s/60s/120s, max 3; treat 429 separately with 60s×5.
- Pitfall 4: Schedule too aggressive. Master-data sync every minute tripped WMS rate limits. Fix: Master data every 10–15 min, business docs every 5–10 min, full sync at night.
- Pitfall 5: Hard-coded shipper/warehouse config. ShipperId and warehouse codes were baked into mapping tables, breaking cross-org migration. Fix: Centralize into env vars or a secrets manager.
When to Use
Applicable to private-deployment supply chains where Kingdee Cloud Cosmos is the ERP and Xiaofengbee WMS is the warehouse execution system — especially multi-org, multi-warehouse enterprises with OEM/e-commerce/transfer flows. Not suitable for bidirectional sync (this family is B→A only), lightweight scenarios without document-level idempotency, or when the target is not Xiaofengbee WMS.