Qeasy Cloud
Get Started

Practical Guide: Synchronizing Offline Sales Outbound Documents to JKY Sales Orders

· 系统管理员· Integration Solutions· 63 views· 4 min read
吉客云Kingdee Cloud销售订单同步销售出库Supply Chain私有化部署Data Integration

What This Strategy Solves

Offline transactions from stores, direct sales, and wholesale operations remain in the financial and supply-chain system, while the target business platform cannot see the corresponding orders and therefore cannot continue warehouse fulfillment and logistics tracking. In one project, we used the Qeasy Data Integration Platform to handle this flow: retrieve offline sales outbound documents by approval time, group them by document number, and then create target sales orders. This preserves the source document number as the business key and prevents a document with multiple lines from being split into multiple orders.

Data Flow and Field Mapping

The overall flow is: Kingdee Cloud → Qeasy Data Integration Platform → JKY. The source returns flattened records, so header fields are repeated for every line belonging to the same document. The intermediate layer must group the records by FBillNo and form one header document with one detail array. Qeasy provides centralized code mapping for maintaining relationships among customers, materials, warehouses, and other master data.

ObjectKey FieldTarget FieldProcessing Rule
HeaderFBillNotradeNoDirect mapping; the source number is the business key
HeaderFDateconsignTime/orderTimeDirect mapping
HeaderFCustomerID_FNumbercustomerCode/shopCodeMap the customer code
HeaderFCustomerID_FNamereceiverNameUse the customer name as a default
HeaderF_recipientreceiverNameRecipient contact takes priority
HeaderF_Receiving_phone_numberreceiverPhoneDirect mapping
HeaderProvince/city/district/detail addressreceiverProvince and related fieldsPrefer separate fields; concatenate when required
HeaderFStockID_FNumberwarehouseCodeMap the warehouse code
HeaderFSalesManID_FNumber/NamesellerCode/sellerNameMap salesperson data
HeaderFSaleOrgId_FNumberorgCodeMap the organization code
ConstanttradeTypeSet to “offline” or the agreed code
ConstantsourceSet to OPEN
Detaildetails_listgoodsDetailGenerate one target line for each grouped line
DetailFMaterialID_FNumbergoodsNoMap the material code
DetailBarcode fieldbarcodeUse as an auxiliary identifier
DetailFRealQtysellCountUse the actual outbound quantity
DetailFPrice/FTaxPricesellPrice/taxPriceMap unit prices
DetailFAmountsellTotalMap the amount
DetailFEntrynotegoodsMemoMap the line note
DetailEntry identifierrecId/idOptional; used to locate a detail line

How to Configure It in Qeasy

Configure the source query object as SAL_OUTSTOCK, retrieving the document number, entry identifier, date, customer, salesperson, material, quantity, price, warehouse, and receiving information. The filter must constrain the offline document type, approval time, and the required business exclusions. Use Limit and StartRow for pagination, and disable automatic filling of missing values so that nonexistent relationships are not fabricated.

The intermediate layer should group records by document. The source configuration currently has buildModel disabled, while the target interface requires an object. Therefore, explicitly aggregate the records into details_list using FBillNo; do not treat each flattened row as a separate sales-order request.

On the target side, set tradeOrder as an object and expand its child fields. Reference details_list for goodsDetail. Perform duplicate checking with tradeNo=FBillNo, and send failures to a retry or exception queue. Qeasy is suitable for centrally managing header mappings, detail mappings, constants, and filters. If customer or material master data has not been standardized, establish the mappings first instead of converting codes while processing a document.

Implementation Steps

  1. Prepare master data: Standardize customer, material, and warehouse codes first, and confirm which fields may be empty as well as the accepted date format.
  2. Set the incremental start point: Initialize the platform’s LAST_SYNC_TIME to the first full-sync boundary and retrieve data using the approval-date condition. Run the initial full load during a low-business period.
  3. Trigger the full load: Retrieve offline outbound documents in the defined range, group them by document number, and write them to the target. Record the source, target response, and processing status for every document.
  4. Run incremental jobs: Offset the source and target schedules and run them every five minutes. Advance the incremental cursor only after the previous batch succeeds, preventing data loss.
  5. Perform compensation checks: Retry documents that fail, time out, or return an abnormal response manually or automatically. Reconcile quantities by date and document number rather than judging success by the total number of rows.
  6. Observe the cutover: Monitor creation, warehouse fulfillment, and logistics status for new documents. Close the project only after confirming that duplicate orders are not being created.

Lessons Learned

  1. A typical mistake is pushing flattened rows directly. The source can return multiple lines for one document. Without grouping by FBillNo, the target receives multiple orders. Aggregate first, then use details_list to generate goodsDetail.
  2. Using only the update time for incremental sync can cause omissions. Use the approval date as the synchronization condition and update the cursor only after successful processing. If master data changes, compensate the affected documents.
  3. Matching field names is not enough. Identical names do not mean identical codes. A common Qeasy customer practice is to centralize customer, material, and warehouse code mappings and block processing when a required mapping is missing.
  4. The wrong quantity basis causes inconsistencies. This strategy prioritizes the actual outbound quantity FRealQty. Using the planned quantity instead would make the order inconsistent with the outbound fact and affect warehouse operations.
  5. Incremental and full synchronization should not be mutually exclusive. Use a dual-track model: incremental processing by approval date for daily operations, and a clearly bounded full load for initialization or master-data repair. The full-load range must not conflict with the incremental cursor. Another common rollout pattern is to implement headers and details in phases: first enforce required header and product-detail fields, then add tax rates, expiration dates, and other extended fields.

Suitable and Unsuitable Scenarios

This strategy is suitable for private deployments that need to bring offline outbound transactions from stores, direct sales, or wholesale into a target platform for warehouse fulfillment and logistics tracking. It is not suitable when real-time outbound processing is mandatory, source documents are frequently reversed and changed, or online and offline orders must be merged or split. Those cases require explicit change-capture and order-aggregation rules.

Original content. Please credit the source when reposting: https://www.qeasy.cloud/insights/solutions/strat-p2ea595-kingdee-cloud-3711-n63dc0c7e-0cbbca40

Comments