Triage billing failures with operational context
Which failed payments coincide with API errors, unresolved jobs, or incomplete activation?
Start from failed billing outcomes, then add reduced operational signals so a review queue explains why each account needs attention.
Published expected result
Operational review signals for failed payments
| account_id | plan | failed_payment_usd | api_errors | unresolved_jobs | activated | review_signals |
|---|---|---|---|---|---|---|
| acct_ember | starter | 199 | 1 | 1 | 0 | 4 |
| acct_cinder | starter | 299 | 0 | 1 | 0 | 3 |
How to read the query
- The failed payment is the review-queue grain; API and job tables are reduced before joining.
- Activation is a visible context field, not an assertion that onboarding caused payment failure.
- The signal count prioritizes investigation but deliberately avoids an opaque health score.
Decisions the SQL cannot make
- 1Define the support workflow and access boundary for billing context.
- 2Choose incident windows so unrelated historical failures do not inflate current risk.
- 3Keep payment recovery, product recovery, and account retention as separate outcomes.