Qeasy Cloud
Get Started

Querying Assembly/Disassembly Processing Fees: A Single-Strategy Sync Walkthrough

· 卢剑航· Integration Solutions· 9 views· 4 min read

What This Strategy Solves

In one of our manufacturing engagements, the business team needed to reconcile the assembly/disassembly processing-fee ledger on a monthly basis: the source system handled booking, while the cost/ledger side handled voucher creation. It looks like a simple query, but production rollout involves how to pass the month parameter, how to align returned fields, and how to feed the result into downstream vouchers. We used the Qeasy data-integration platform to wrap "query assembly/disassembly processing fees" into a schedulable, reusable, observable sync unit, so the business team no longer has to hit the API by hand.

Data Flow and Field Mapping

Data flows from the source system, through the Qeasy middleware, into the target system. The source side is a RESTful GET (/getBalance), and the target side is a KingDee Cloud Galaxy WebAPI call (configured as a "write no-op" placeholder, ready for extension).

Business MeaningSource FieldTypeMiddleware (Qeasy)Target Field
Document numbersourceBillNostringPassed through, used as idempotency keyDocument number
Fee countcountstringConverted to numericAuxiliary accounting field
Fee amountamountstringConverted to numeric (two decimals)Main amount field
Period monthmonthstringRegex-validated YYYYMMAccounting period

Mapping principle: keep all code-like fields in a centralized Qeasy mapping table, do string → decimal cleaning at the middleware layer, and add a regex check on the month field so values like 2024-06 never leak downstream.

How to Configure It in Qeasy

We use the Qeasy strategy canvas for this. Configuration highlights:

  1. Source connector: pick the source RESTful connector, fill in /getBalance, method GET, and enable "auto-fill response" for field preview.
  2. Request parameter: put month into otherRequest and read it from the Qeasy scheduling context as a runtime variable; never hardcode 202406.
  3. Target connector: pick the KingDee Cloud Galaxy WebAPI connector, use "write no-op" as a placeholder, and prepare the document number, amount, and period as the request skeleton until the downstream voucher model stabilizes.
  4. Field mapping: use "same-name pass-through + type conversion"; add a cleaning script for the amount field to strip thousands separators and spaces.
  5. Idempotency: turn idCheck on and use sourceBillNo as the idempotency key so re-running the same month will not create duplicates.
  6. Exception handling: an empty source response means "no data this month," not failure; deserialization errors on the amount field should raise a single alert, not block the whole batch.

Implementation Steps

Our on-site rollout usually follows four steps:

  • Step 1: Define the incremental start point. During initialization, treat historical months (e.g. 202401–202405) as the init parameter list and run them once in full to make sure the target ledger matches the source.
  • Step 2: Configure the full trigger. Use a two-stage approach in Qeasy—Stage A initializes, Stage B maps fields—then turn off the initialization switch after one successful run.
  • Step 3: Switch to incremental scheduling. In steady state, schedule monthly: source crontab 3 2 * * * triggers the source query; target crontab 23 2 * * * triggers the KingDee side landing. The 20-minute gap leaves a comfortable window for middleware processing.
  • Step 4: Observe and reconcile. Qeasy provides run logs and field-level tracing so the business team can trace any month's count and amount and trigger a re-run if needed.

The dual-track incremental/full pattern is the most common approach among Qeasy customers: a full baseline at go-live, then stable incremental runs afterward, with no interference.

Pitfalls We Have Seen

  1. Hardcoded month parameter. Writing 202406 directly into otherRequest means every subsequent run still queries June. Use a scheduling context variable that automatically picks the previous month at the start of each cycle.
  2. Inconsistent amount types. The source amount is a string and may include thousands separators; the target expects a decimal. Passing it through directly causes deserialization errors. Cleaning must happen up front.
  3. Idempotency key disabled. idCheck is on by default yet sometimes accidentally turned off, which creates duplicates. Always run a test month twice before going live.
  4. Empty responses treated as failures. If the source returns an empty set for a month, the target raises a "no data" alert. Treat empty responses as a normal empty batch.
  5. Target fires before source. The two crons are reversed, so the target lands before the source query completes. Put the source at 02:03 and the target at 02:23 to keep a 20-minute buffer.

Where It Fits and Where It Doesn't

This pattern fits monthly ledger reconciliation, monthly assembly/service-fee aggregation into the general ledger, and lightweight idempotent rerunnable syncs. It does not fit minute-level real-time requirements, scenarios that need complex reverse-write or cancel/recheck logic, or cases where the source interface is itself a transactional write rather than a query—those should use event-driven sync instead of query-driven sync.

Original content. Please credit the source when reposting: https://www.qeasy.cloud/insights/solutions/strat-p10a95e-kingdee-cloud-1847-n9158d962-cb16cd8a

Comments