Sales Outbound Cleanup Strategy: Reconciling Data from Cloud Cosmos to Downstream Systems
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:
| Role | Field | Type | Description |
|---|---|---|---|
| Source – query input | target_1 | object | Target strategy object to be cleared |
| Source – query output | datetime | string | Auto-filled request timestamp |
| Source – query output | params | string | Auto-filled input snapshot |
| Target – execute input | id | string | Placeholder 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":
- Source strategy (DELETE_QUERY): choose API
DeleteStrategyData, methodPOST, setnumber=datetimeas the primary key, enableidCheck=trueandautoFillResponse=true. The request body only needs onetarget_1object; for multiple targets, addtarget_2. - Target strategy (EXECUTE): use API
写入空操作, methodPOST, primary keyid,idCheck=true. Leave request/response empty since cleanup does not need business fields. - Dependencies: in the Qeasy strategy orchestration, set the source strategy sequence to
Aand the target strategy toB, configuredepends_onso that A is triggered before B. - 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 uses23 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 keepidandidCheck=truein 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 target23 2 * * *are intentionally staggered; off-peak execution avoids cleanup storms. - autoFillResponse must be enabled: without it, the source's
datetimeandparamsreturn 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_2explicitly 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.