Field Manual for the Strategy Execution Error Detail API: Closing the Loop from Execution Records to the Weighing System
What This API Solves
In the "payment application → U8 payment voucher" synchronization chain, business systems care about one thing: did this payment voucher actually sync successfully? The StrategyErrorDetail API was built for exactly this question. It aggregates every strategy execution outcome—success, error, root cause, and resolution—so downstream weighing systems can write back the status and close the loop.
API Capability Overview
- Authentication: An internal platform API. Callers use credentials issued by the integration platform; in Qeasy (QingYiYun), it is typically invoked through built-in connectors in the scheduler or aggregation component, with no manual auth handling.
- Request Structure: Supports combined filtering by time window (
recentSeconds), strategy ID list (ids), and status (status: 3 = error, 6 = skipped, 2 = completed). - Response Structure: Returns an array of execution records; each record contains strategy info, business document number, timestamp, response summary, problem description, cause analysis, and resolution.
- Pagination / Incremental Mode: The typical pattern is incremental polling with a "last N seconds" window, where N is usually 60–300 seconds. This balances timeliness and avoids missed records.
- Status Convention:
status= 2 means successfully completed, 3 means error, 6 means skipped by the scheduler.
Typical Field Mappings
| Field | Type | Meaning | Practical Notes |
|---|---|---|---|
strategy_id | string | Unique strategy identifier | Corresponds to the ids query parameter; the primary key for cross-strategy tracking |
strategy_name | string | Strategy name | Readable label, useful for logs and troubleshooting |
number | string | Business document number (payment application number) | Core key for writing back to the weighing system; must be unique on the weighing side |
response_at | string | Response timestamp | Used for incremental window calculation; normalize to UTC or local time |
text | string | Response summary | Empty or "response data is empty" → success (S); otherwise → error (E) |
problem | string | Problem description | Written back directly as ErrorMsg; watch the length limit |
cause_analysis | string | Root cause analysis | Used for human troubleshooting and knowledge base accumulation |
solution | string | Suggested resolution | Can integrate with ticket systems to reduce repetitive questions |
lessee | object | Tenant information | Required in multi-tenant scenarios to avoid writing to the wrong book |
In Qeasy, this API is typically used in an "aggregation query + time window filter" pattern: Qeasy's field mapper automatically derives S/E status from text, passes problem through to ErrorMsg, and writes back to the target table USP_edu_PaidAmountBill_Status_Save.
How to Configure on Qeasy
- Data Source Connector: Register StrategyErrorDetail as a query-type connector in the Qeasy Data Integration Platform, with credentials and a default time window configured.
- Strategy Orchestration: Create a new strategy "4-Query Execution Results, Write Back to Weighing System"; the upstream has no source-system dependency and consumes the platform API directly.
- Field Mapper: In the mapping canvas, drag and connect source field
number→PaidAmountBillNo,text→Status(with a decision function),problem→ErrorMsg. - Execution Schedule: Schedule every 1–3 minutes; set
recentSecondsslightly larger than the interval to avoid boundary misses. - Exception Handling: Enable built-in retry and alerting; also alert on N consecutive empty responses to prevent silent failures.
Cross-Scenario Practical Points
- Leave Headroom in the Time Window:
recentSecondsshould not equal the schedule cycle exactly; leaving 20%–50% headroom significantly reduces boundary misses. - Status Logic Should Be a Function, Not Hardcoded: Encode the
text→ S/E mapping as configurable rules so new business lines only require rule changes, not code changes. numberIs the Lifeline of Writeback: Deduplicate and validate non-empty values before cross-system transfer;PaidAmountBillNoon the weighing side usually has a unique constraint.- Never Drop
lessee: In multi-tenant or multi-subsidiary scenarios, tenant info is the only way to route to the correct ledger. - Empty
text≠ Full Success: Combine withstatus; in some scenariosstatus=2buttextis non-empty and still needs to be logged. - Truncate Error Messages: The weighing system's remark field is length-limited; long
problemvalues get truncated or fail to write. Substring truncation in the Qeasy mapper is the engineering standard.
Pitfall Retrospective
- Pitfall 1: Schedule Cycle and Time Window Mismatch. A common pattern is 60-second scheduling with a 60-second window, which misses half of the boundary records. The reliable approach is 60-second scheduling with a 120-second window, and recording the first-seen timestamp.
- Pitfall 2: Treating Empty
textas Success. Some strategies leavetextempty even when data validation fails, even though nothing was actually written to the target. Always combine withstatus, or add a fallback on whetherresponse_atexists in the mapper. - Pitfall 3: Cross-Tenant Data Bleed. When multiple subsidiaries share one integration, writebacks without
lesseeend up routing Company A's payment status into Company B's ledger. Always include the tenant field in the mapping and use it for routing. - Pitfall 4: Oversized Error Messages Cause Write Failures. The weighing remark field is typically varchar(500);
problemoften exceeds a thousand characters. Truncating with substring in the Qeasy mapper is standard practice. - Pitfall 5: No Idempotency Considered. When the same payment application is written back multiple times, the weighing system either errors out or gets overwritten. Use
number + response_atas a unique key for deduplication before writing.
When to Use
When business needs to "feed integration platform execution results back to the business system," this API is the go-to choice: typical use cases include payment vouchers, purchase inbound orders, and receipt writeback loops. If you only need internal logging or alerting inside Qeasy, this API is unnecessary. If you need to aggregate results across multiple strategies across platforms, this API also supports batch queries via the ids parameter and scales well.