Syncing Sales Outbound from Baison ME3 to Kingdee Cloud: A Single-Strategy Playbook
What This Strategy Solves (Scenario and Value)
A retail enterprise runs Baison ME3 for store fulfillment and Kingdee Cloud for finance and supply-chain accounting. Every day, over a thousand outbound documents must be reconciled between the two systems—Baison only cares about fulfillment status, while Kingdee needs to book documents and produce reports. Manual export/import quickly drifts out of sync within three months. We used the Qeasy (轻易云) data integration platform to own this sync: every 10 minutes, Baison orders that have reached "outbound" status are pushed as SAL_OUTSTOCK into Kingdee, auto-submitted and audited, so the finance side sees results immediately.
Data Flow and Field Mapping
The data flow is: Baison ME3 (source) → Qeasy intermediate layer → Kingdee Cloud SAL_OUTSTOCK (target). The source uses orm.order.detail_get to pull orders; the target uses batchSave to persist in bulk.
Header key-field mapping:
| Target Field | Source / Rule | Business Meaning |
|---|---|---|
| FBillTypeID | Constant XSCKD01_SYS | Standard sales outbound doc type |
| FBillNo | Empty, auto-generated by Kingdee | Bill number produced by Kingdee's coding rule |
| FDate | orderListGet.last_update | Posting date |
| FStockOrgId | Constant 102.01 | Shipping organization |
| FSaleOrgId | _mongoQuery lookup | Look up customer master by sd_code, return e-commerce org |
| FCustomerID | _mongoQuery lookup | Look up customer master by sd_code, return customer code |
| F_OrderID | order_sn | Source order number, used for tracing |
| FOwnerTypeIdHead / FOwnerIdHead | Constant BD_OwnerOrg / 102.01 | Owner type and owner |
Line key-field mapping:
| Target Field | Source / Rule | Business Meaning |
|---|---|---|
| FMaterialId | Line SKU code; mapping table if codes differ | Material code |
| FRealQty | Line actual shipped qty | Actual outbound qty |
| FStockId | Warehouse code mapping | Shipping warehouse |
| FOwnerTypeId / FOwnerId | Constant | Line owner, same as header |
The core of the code mapping is the shop→customer/organization lookup. Baison's shop code sd_code is bridged to Kingdee customer master through the custom field F_SVSH_ME3ID. _mongoQuery matches on sd_code, then returns FNumber as customer code and F_BelongORG_FNumber as sales organization code.
How to Configure on Qeasy (轻易云)
In Qeasy's strategy canvas, this strategy is a three-stage pipeline: Source QUERY → intermediate mapping → Target EXECUTE.
- Source: Pick the
orm.order.detail_getAPI, QUERY type, GET method; markorder_snas the primary key with idCheck enabled. - Filter conditions: In request parameters, set
shipping_time_fh_startto{{LAST_SYNC_TIME}}andshipping_time_fh_endto{{CURRENT_TIME}}, then layer business filters (covered in the next section). - Intermediate layer: Configure header per the mapping table; bind the line array with
orderDetailGets→FEntity.value; line fields use direct value or code mapping. The two shop-related columns use_mongoQueryagainst the customer-query strategy's result set. - Target: Pick
batchSave; set FormId toSAL_OUTSTOCK, Operation toSave, setIsAutoSubmitAndAudittotrue,IsVerifyBaseDataFieldtotrue, SubSystemId to21. - Scheduling: Source cron
*/10 8-22 * * *, target cron8-59/10 8-22 * * *—both sides aligned on 10-minute slots.
Implementation Steps
- Validate prerequisites: The dependent customer-query strategy must be live first, and the
F_SVSH_ME3IDcustom field must be maintained on Kingdee customer master data. Without this, every shop field comes back empty. - Initialize the incremental baseline: On first go-live, explicitly set
LAST_SYNC_TIMEto an acceptable historical point to avoid pulling the full history at once. - Business status filtering: Sync only
shipping_status = 7(outbound), excludeorder_status = 3(voided) andis_hh = 1(exchange orders). A common Qeasy pattern is to centralize filter conditions inside the source configuration so the business side can change them in one place. - Full-volume trigger: For backfill scenarios, temporarily switch the source cron to manual trigger with a widened time window, then restore incremental cadence once the backfill completes.
- Scheduling frequency: Both source and target run every 10 minutes between 08:00 and 22:00; off-hours pause to save resources. Make sure the source runs one slot before the target, otherwise the target can fire on an empty result set.
- Target operation: With
IsAutoSubmitAndAudit=true, Kingdee documents land directly in audited status and finance can book immediately.
Pitfall Postmortem
_mongoQuerysource not ready before go-live—the lookup returns empty, FSaleOrgId and FCustomerID come back as empty strings, andIsVerifyBaseDataFieldrejects them. The safe approach is to model the lookup dependency as a hard prerequisite and start the source schedule ahead of downstream.- Missing
shipping_statusfilter—initial-status orders also get pushed, accumulating junk documents in Kingdee. The typical mistake is treating "suggested sync strategy" as default config; before go-live,shipping_status = 7must be explicitly selected. order_snre-imports—when Baison'slast_updatechanges for the same order, the source returns it again. A common Qeasy pattern is to enable idCheck on both source and target, forming a dual-track deduplication.- Hard-coded
FStockOrgIdblows up in multi-org scenarios—once multiple business units are involved, the constant must be replaced with asd_code-driven lookup. This project is single-org, so102.01works; multi-org projects must replace this step. IsAutoSubmitAndAudit=truebypasses the approval flow—some Kingdee workflows require mandatory manual review; in that case disable auto-audit, keep only Save, and let a follow-up strategy handle approval.
Applicable vs. Non-applicable Scenarios
Applicable: Single-org retail enterprises with stable order volume that need to land Baison fulfillment data into Kingdee for financial accounting, with the lookup dependency ready. Not applicable: Multi-sales-org scenarios requiring per-document dynamic determination, retail models that need complex order edits/merges, or business lines where Baison does not maintain a stable ship-time field.