Practical Guide to Qeasy Integration Error Alert Strategy: Get Integration Failures Notified Instantly
What This Strategy Solves
In retail and manufacturing supply chain integration, a single enterprise usually runs more than a dozen synchronization strategies covering items, transfers, purchasing, sales, and inventory. Any one of them getting stuck can break downstream business. The most common feedback from customer sites is not "the link fails" but "nobody told me it went wrong." The Qeasy Integration Error Alert Strategy is designed exactly for this pain point. Instead of moving business data, it actively pulls error and skipped statuses from all enabled strategies within a recent window, then pushes them to a WeCom robot so that on-call staff see issues the same day.
Data Flow and Field Mapping
This strategy is a typical query-execute two-step chain. Both source and target sit inside the Qeasy platform.
Source (Qeasy StrategyErrorDetail, WebAPI, POST, QUERY): queries exception details within a recent time window for a specific set of strategy IDs. Key inputs are listed below.
| Field | Meaning | Notes |
|---|---|---|
| recentSeconds | Look-back window in seconds | Default 3600, i.e. last one hour |
| ids | Strategy ID list | Comma-separated; only enabled strategies return data |
| status | Status filter | 3 = error, 6 = skipped; multiple values comma-separated |
The response is filled in automatically by autoFillResponse, mainly exposing strategy_name, strategy_id, number, response_at, and problem for downstream use.
No intermediate persistence is required. Variables such as {{strategy_name}}, {{strategy_id}}, {{number}}, {{response_at}}, {{problem}}, and {{lessee.name}} carry the data between the two strategies.
Target (Qeasy WeChatRobotDetail, WebAPI, POST, EXECUTE): formats the error detail into a WeCom robot message. Key mappings are listed below.
| WeCom Field | Source | Notes |
|---|---|---|
| access_token | Credential variable | Managed centrally by Qeasy, never hard-coded |
| name | {{strategy_name}} | Message title, identifies the strategy |
| lessee_name | {{lessee.name}} | Current tenant name for multi-tenant clarity |
| number | {{number}} | Document or sequence number of the failed record |
| response_at | {{response_at}} | Trigger timestamp, anchors the time window |
| problem | {{problem}} | Error description, first-hand info for on-call staff |
How to Configure It in Qeasy
Sign in to the Qeasy Data Integration Platform and create two chained WebAPI strategies. The first uses StrategyErrorDetail with effect QUERY. Configure the three inputs (ids, recentSeconds, status) and enable autoFillResponse so the response is written back to the strategy context automatically. The second uses WeChatRobotDetail with effect EXECUTE, mapping each WeCom field per the table above. The access_token must reference Qeasy's credential vault, not be embedded in scripts. Place both strategies in the same package and wire the source-to-target relationship.
Implementation Steps
- Collect strategy IDs: export all enabled integration strategy IDs from the platform, group them by domain (items, inventory, documents) as candidates for the ids parameter.
- Full reconciliation first: temporarily set status to "3" only and run for one day to confirm that the strategy name, document number, and problem description flow back correctly. Then validate status=6 skipped samples separately.
- Configure incremental scheduling: run the source at
15 7-22 * * *every 15 minutes, keeping the look-back within recentSeconds=3600. Run the target at30 7-22 * * *, 15 minutes behind the source, ensuring the context is filled before consumption. - Multi-tenant handling: use
{{lessee.name}}to distinguish senders and avoid confusion when multiple tenants share one robot. - On-call and escalation: configure a primary duty group and an escalation group on the WeCom robot side; auto-mention the secondary line after N consecutive errors.
Pitfalls We Have Seen
- A classic mistake is hard-coding ids. Early on, customers only watch a few strategies. Months later, new ones are added but the list is forgotten, so their errors never trigger an alert. The safe approach is to use Qeasy strategy-id variables or refresh the list through a scheduled script.
- Mixing status codes 0, 1, 2 floods the alert channel with completed, waiting, and duplicate entries. Keeping only 3 and 6 is enough.
- Embedding credentials in scripts is high risk. Move them to Qeasy's credential management to avoid leaks when staff changes happen.
- Mismatched scheduling between source and target means the target reads an empty context. Offset them by 10–15 minutes.
- Mismatched recentSeconds vs cron: if recentSeconds is 1800 but the cron runs every 60 minutes, errors in the 30–60 minute band are missed. The window must be slightly larger than the cycle.
When It Fits and When It Does Not
It fits multi-strategy supply chain integration where 7×12 or 7×24 real-time awareness of failures is required, especially in retail and manufacturing enterprises pursuing "no overnight surprises." It does not fit scenarios with only one or two strategies where occasional manual checks are sufficient, nor scenarios that require fine-grained archiving of every record rather than instant alerting.