Qeasy Cloud
Get Started

Purchase Receipt Sync in Practice: One Strategy from Weaver OA to Kingdee Cloud

· 冯潇· Integration Solutions· 7 views· 4 min read
泛微OA-E9HttpKingdee Cloud供应链集成采购入库单泛微 OA轻易云私有化

What This Strategy Solves

A manufacturing client had a long-standing pain point in procurement: once a supplier's process was approved in Weaver OA, the purchase order returned to the buyer, but the warehouse still had to record the receipt, post inventory, and generate payables in Kingdee Cloud. The two systems did not talk to each other, and manual re-entry was costly and error-prone. In one real engagement, we used the Qeasy data integration platform to automatically push "purchase receipt Excel documents from Weaver OA-E9Http" into "purchase receipt documents in Kingdee Cloud." It is just one strategy, but it carries the entire supply chain loop.

Data Flow and Field Mapping

The end-to-end flow is Weaver OA (source) → Qeasy middleware → Kingdee Cloud (target). The source side does not call OA APIs directly; instead, the upstream process lands receipt data into a structured Excel template (such as the UCD finished-goods PM3003 template). The middleware parses, validates, and enriches the data, while the target side calls Kingdee Cloud's purchase receipt save API.

Key field mapping (source → target):

Business MeaningWeaver OA Source ColumnMiddleware HandlingKingdee Cloud Target Field
Document numberDoc NoKeep original, add prefix to prevent collisionFBillNo
SupplierSupplier nameTranslate via mapping tableFSupplierId (FNumber)
Material codeMaterial numberAlign with material masterFMaterialId (FNumber)
QuantityReceipt qtyCast to decimal, 4 decimalsFQty
WarehouseReceiving warehouseCode mapping, centrally managedFStockId (FNumber)
Business dateReceipt dateStandardize to yyyy-MM-ddFDate

Code mappings (supplier, material, warehouse) are the most error-prone part of projects like this. In Qeasy we usually maintain a centralized mapping table; the source name comes in, the table translates it, and unmapped rows are routed to the exception queue.

How to Configure It in Qeasy

The strategy itself is a SYNC type, direction B→A (A is the target-side data source on the Weaver side; in this case the actual write target is Kingdee, so the concrete landing follows the project plan). It does not depend on other strategies and has no crontab — triggering is driven by the upstream process.

Configuration points:

  1. Data source connection: The source adapter is "Excel File," with the path pointing to a fixed directory where the UCD finished-goods PM3003 template is uploaded. The target adapter is the Kingdee Cloud adapter, with organization code and ledger identifier (deployment is on-premise, so the network must be opened up).
  2. Field mapping: In Qeasy's visual mapping UI, drag source columns onto target fields. Apply explicit type conversion for numeric and date fields; do not fall into the "string vs. string" trap.
  3. Centralized mapping management: Suppliers, materials, and warehouses all go through a shared mapping table rather than being hard-coded into strategy scripts. When new materials come online, only the mapping table changes.
  4. Write mode: For Kingdee Cloud purchase receipts, use "check by document number — update if exists, create if not," to avoid duplicate pushes.
  5. Exception handling: Missing mappings, blank required fields, and over-receipts all go to the exception queue for manual handling rather than blocking the main pipeline.

Implementation Steps

A phased rollout is the safe approach:

  1. Phase 1 — incremental start: From the go-live date, sync only newly created receipts. The source Excel uses "doc no + date" as the incremental watermark, and Qeasy records the last synced maximum doc number or timestamp.
  2. Phase 2 — full backfill: During pilot, manually trigger a one-time full backfill to push historical receipts into Kingdee; once full backfill is done, switch back to incremental. This must run during a business off-peak window.
  3. Phase 3 — scheduling frequency: Because the upstream is process-triggered (approval completion writes the Excel), no high-frequency crontab polling is required. In Qeasy you can attach a "file-arrival trigger" so the strategy runs as soon as the file lands; add a low-frequency safety-net polling job in case a file event is missed.
  4. Phase 4 — reconciliation and rollback: For the first week after go-live, run a daily "source doc no vs. target doc no" reconciliation. The reconciliation script outputs a discrepancy list, which warehouse and IT confirm together.

Lessons Learned

  1. Mappings written into scripts: One client initially put supplier translation directly into the strategy. Six months later, 50 new suppliers had been added and 50 strategies had to be modified. The safe pattern is centralized mapping management so that new suppliers only touch one table.
  2. Pushing header and lines together: Excel has a header plus multiple material rows. If you push the whole sheet at once, a single failed row rolls back the entire document. The right approach is staged: push the header first, then loop through the lines; a failed line does not block other lines.
  3. Quantity type drift: In Excel, quantities sometimes arrive as text and sometimes as numbers, and pushing them straight into Kingdee raises type errors. The middleware must explicitly call toDecimal and intercept negative or zero values.
  4. Duplicate document numbers: OA approval allows resubmission, which can produce two Excel files for the same business event. Before pushing to Kingdee, enforce idempotency on the document number; "query first, then write" is the simplest and most effective method.
  5. On-premise network instability: Kingdee Cloud is deployed on-premise and the API occasionally times out. Qeasy must be configured with retries and circuit breakers so that a single failure does not send the document into a black hole.

When to Use and When Not

Use when: The upstream is approval-flow driven, the source lands as Excel/CSV, structure is high, and document volume is moderate (thousands to tens of thousands per month); the target is Kingdee Cloud on-premise and needs strong consistency for inventory and finance data.

Do not use when: The source already exposes mature APIs and requires second-level real-time sync; the target is a heterogeneous ERP with large field-model differences; or document volume exceeds hundreds of thousands and a streaming rather than file-landing approach is required.

Original content. Please credit the source when reposting: https://www.qeasy.cloud/insights/solutions/strat-oa-e9http-kingdee-cloud-5216-excel-ucd-pm3003-1b7a8921

Comments