Qeasy Cloud
Get Started

Sales Outbound Cleanup Strategy: Reconciling Data from Cloud Cosmos to Downstream Systems

· 尹春锐· Integration Solutions· 47 views· 3 min read
SQL ServerKingdee Cloud销售出库清理策略轻易云供应链集成私有化

What This Strategy Solves

In a supply-chain integration project for a retail enterprise, sales outbound documents from Cloud Cosmos need to be echoed back with document numbers to form purchase-order vouchers in the downstream system. Over time, temp data, dirty data, and write-back residues accumulate in the middle layer, causing the downstream purchase-order numbers to drift. This kind of cleanup strategy does not perform forward synchronization; instead, it periodically clears suspicious data so that the downstream can realign. It is the "street sweeper" of the entire chain.

Data Flow and Field Mapping

The cleanup chain is short: the source is Cloud Cosmos (sales outbound documents), the middle layer is the strategy container on the Qeasy data integration platform, and the target is the downstream business system (purchase-order table).

Key field mapping table:

RoleFieldTypeDescription
Source – query inputtarget_1objectTarget strategy object to be cleared
Source – query outputdatetimestringAuto-filled request timestamp
Source – query outputparamsstringAuto-filled input snapshot
Target – execute inputidstringPlaceholder field for no-op
Target – execute output——No response body

Note: the cleanup strategy's metadata.api on the source side is DeleteStrategyData (POST), and on the target side it is 写入空操作 (POST). The one-query, one-write combination makes the cleanup loop complete.

How to Configure It on Qeasy

When configuring this strategy on the Qeasy platform, follow the common customer pattern of "centralized encoding mapping management":

  1. Source strategy (DELETE_QUERY): choose API DeleteStrategyData, method POST, set number=datetime as the primary key, enable idCheck=true and autoFillResponse=true. The request body only needs one target_1 object; for multiple targets, add target_2.
  2. Target strategy (EXECUTE): use API 写入空操作, method POST, primary key id, idCheck=true. Leave request/response empty since cleanup does not need business fields.
  3. Dependencies: in the Qeasy strategy orchestration, set the source strategy sequence to A and the target strategy to B, configure depends_on so that A is triggered before B.
  4. Schedule: the source uses crontab 0 0 1-30/3 * * (every 3 days from the 1st to the 30th of each month), and the target uses 23 2 * * * (02:23 every day). Stagger them to avoid spikes.

Implementation Steps

We split the rollout into three phases so that the customer's ops team can accept the delivery at each milestone.

Phase 1: Incremental starting point confirmation Run DeleteStrategyData in the test environment first and confirm that the datetime field returns stably. A safe approach is to trigger it manually once in a test tenant and observe whether the returned params snapshot matches expectations.

Phase 2: Full-volume triggering drill Bring in the target-side 写入空操作 and run the full chain once. A typical mistake is mixing production and test tenant configurations—be sure to separate tenant_id and platform_id into different environment variables in advance.

Phase 3: Schedule frequency rollout The source runs automatically every 3 days, while the target runs daily as a fallback. The ops team needs to mirror the crontab expressions into monitoring and alerting so that the cleanup window does not drift.

Lessons Learned

  • The no-op is not truly "empty": even though the target 写入空操作 looks field-less, if you do not keep id and idCheck=true in the metadata, Qeasy will judge the strategy meaningless and refuse to schedule it.
  • Do not stack crontabs on the same minute: source 0 0 1-30/3 * * and target 23 2 * * * are intentionally staggered; off-peak execution avoids cleanup storms.
  • autoFillResponse must be enabled: without it, the source's datetime and params return empty and the downstream cleanup basis is lost.
  • Do not copy-paste target_1 to rename it: when cleaning multiple strategies, copying the object directly will cause internal ID conflicts. Declare target_2 explicitly as the documentation suggests.
  • Tenant isolation in private deployments: the tenant_id and platform_id shown in the configuration must be saved per environment, and this is especially important for private deployments.

Applicable and Non-applicable Scenarios

Applicable: scenarios in cross-system chains where middle-layer temporary data exists and periodic cleanup of dirty data and write-back residues is needed, where a low-risk way to realign downstream is desired. Not applicable: business with strict real-time requirements that needs per-document precise tracing, or master-data synchronization chains that cannot tolerate short-term data absence.

Original content. Please credit the source when reposting: https://www.qeasy.cloud/insights/solutions/strat-sql-server-kingdee-cloud-7886-03-4ba42ecf

Comments