Diagnosing Slow, Costly Support Complaints from Three Tables
Statistics & ExperimentsModel answerLast updated
Use complaint, resolution and rating tables to find insights, propose and prioritize fixes, design a rollout test, and discuss bias and confounding.
An online home-goods retailer wants to improve how it handles customer complaints while keeping support and refund spend under control. You have three tables.
complaints
complaint_id(string)customer_id(string)order_id(string)product_category(string)issue_type(string)complaint_channel(string)complaint_created_at(timestamp)region(string)
resolutions
complaint_id(string)resolution_type(string)first_response_at(timestamp)resolved_at(timestamp)agent_id(string)escalated_flag(boolean)refund_amount(decimal)replacement_sent_flag(boolean)
service_ratings
complaint_id(string)customer_service_rating(integer, 1 to 10, where 10 is best)rating_submitted_at(timestamp)
Each complaint_id is one complaint. A complaint may have no rating. There is no full orders table, so you must be careful not to confuse complaint volume with complaint rate.
Answer the following:
- Describe three data-driven insights you would look for.
- Give three recommendations, each tied to one of those insights.
- Pick one recommendation to ship first and justify the choice.
- Explain how you would measure success after launch: primary metric, guardrail metrics, and whether you would use an A/B test, a phased rollout, or a quasi-experimental design.
- Discuss confounding, selection bias in the ratings, and the main implementation risks.
Hints
Hint 1
Start from complaints and left join the other two tables. Which metric would silently be biased if you inner joined to ratings?
Hint 2
Without order counts you can describe the mix of issues and each category's share of complaints, but not how likely an order is to generate a complaint.
Hint 3
If treated and control complaints are handled by the same agents, prioritizing one group slows the other. Think about randomizing at the team, region or time-block level instead of per complaint.
Model answer
Medium Try it yourself first — then compare your approach, complexity and edge cases.
Framing
A strong answer shows clean metric definitions, business judgment (experience versus cost), experimental rigor, and honesty about what the data cannot say.
Setup
Start from complaints and LEFT JOIN resolutions and service_ratings. An inner join to ratings would drop all unrated complaints and bake in selection bias. Validate first: one row per complaint_id in each table, unresolved complaints retained (resolved_at IS NULL), consistent time zones.
Per-complaint metrics:
- First response time (FRT):
first_response_at - complaint_created_at - Time to resolution (TTR):
resolved_at - complaint_created_at(treat unresolved as censored, not zero) - Escalation rate: mean of
escalated_flag - Cost proxy:
refund_amountplus an assumed unit cost for each replacement - Rating coverage: share of complaints with a rating
- CSAT: mean rating or share rated 9 to 10, always reported next to coverage
- Repeat complaints: more than one complaint per
order_id
SELECT c.issue_type, c.complaint_channel,
COUNT(*) AS complaints,
AVG(TIMESTAMP_DIFF(r.first_response_at, c.complaint_created_at, HOUR)) AS avg_frt_h,
AVG(CAST(r.escalated_flag AS INT64)) AS escalation_rate,
AVG(COALESCE(r.refund_amount, 0)) AS refund_per_complaint,
COUNT(s.complaint_id) / COUNT(*) AS rating_coverage,
AVG(s.customer_service_rating) AS avg_rating
FROM complaints c
LEFT JOIN resolutions r USING (complaint_id)
LEFT JOIN service_ratings s USING (complaint_id)
GROUP BY 1, 2;
Volume versus rate: a category with the most complaints may simply sell the most. Without orders you can report share and issue mix, not a rate. Say so, and ask for order counts if rates matter.
1. Insights to look for
- Speed and satisfaction. Bucket FRT and TTR (for example under 4h, 4 to 24h, 1 to 3 days, over 3 days) and plot average rating and rating coverage per bucket. Look for a threshold or cliff rather than a smooth slope. Repeat within each
issue_typeso that severity mix is not the real driver. - Resolution type versus value. For each issue type by resolution type, compare rating, net cost and repeat-complaint rate. For example, replacements for damaged goods might score like full refunds at lower cost, while partial refunds might cause repeat contacts.
- Escalation and channel hot spots. Compare escalation rate, TTR and rating across channel, region and agent (with a minimum volume per agent). Escalated cases likely cost more and score lower, and some channels or agents may be outliers that point to training or routing gaps.
2. Recommendations
- Severity-based triage and routing with FRT targets that sit inside the threshold found in insight 1.
- A resolution playbook per issue type that defaults to the best rating-per-dollar option (such as replacement first for damage), with clear refund authority limits.
- Cut avoidable escalations through coaching for outlier agents, more first-contact authority and shifting slow channels toward chat or self-service.
3. What to ship first
Triage routing, because:
- It likely has the largest and most consistent effect, since delay touches every complaint.
- It reallocates existing capacity instead of spending more on refunds, matching the cost-control goal.
- It is a routing rule, so it is fast to build and easy to reverse.
- Its outcomes (FRT, TTR) exist for every complaint, so evaluation does not depend on ratings.
- It tends to reduce escalations, supporting recommendation 3.
4. Measuring success
Primary metric: median TTR (or share resolved within X hours) for targeted issue types. It is observed for all complaints and free of rating bias.
Secondary: CSAT (share of 9 to 10) reported with coverage, and repeat-complaint rate.
Guardrails:
- FRT and CSAT for non-prioritized issue types (starvation)
- Refund and replacement cost per complaint
- Escalation and reopen rates
- Agent handle time, occupancy and cost per complaint
- Rating response rate (a shift here biases CSAT comparisons)
Design: a complaint-level A/B test is flawed because treated and control tickets share agents and queues. Prioritizing one slows the other, which inflates the measured effect (a SUTVA violation). Better options:
- Cluster randomization by team or region when queues are separate.
- Switchback tests, alternating routing on and off by time block within a site, which balances day-of-week effects. Analyze at the block level.
- Phased regional rollout with difference-in-differences if operations require it. Verify parallel pre-trends and use not-yet-treated regions as controls.
Run a power analysis on the number of clusters or blocks, not complaints. Run for at least 2 to 4 weeks to cover weekly cycles and rating lag, and avoid peak sale periods or compare against the same period last year.
5. Confounding, bias and risks
Confounding. Slow cases are often the hard ones (large furniture, multi-item orders, high value), so the raw FRT-to-rating link overstates causality. Control for issue type, category, channel, region, order value and season, and prefer the experiment over observational regression. Agent quality and routing interact: strong agents may get the hard cases.
Selection bias in ratings. Ratings are self-selected, usually from the very happy or very angry, and response may depend on resolution speed or outcome. Compare coverage across groups, use the all-complaint metrics (TTR, repeat rate) as primary, and run sensitivity checks such as inverse-probability weighting on observable traits or bounding for missing ratings. Also note that ratings arrive after resolution, so recent complaints are underrepresented.
Other data issues. Unresolved complaints censor TTR, so use survival-style methods or "resolved within X hours" with a fixed window. Agents with few cases give noisy rates, so shrink toward the mean. Multiple comparisons across slices call for pre-registered cuts.
Implementation risks.
- Misclassification in auto-triage sends urgent cases to the wrong queue. Monitor precision and recall and keep a manual override.
- Gaming: agents or customers may select the "priority" label. Audit.
- Starvation of low-priority tickets with SLA breaches. Cap wait time.
- Cost creep if faster handling raises refunds. Track cost guardrails weekly.
- Staffing changes or promotions during the test contaminate results.
Common mistakes
- Inner joining to ratings and reporting CSAT without coverage.
- Calling a high complaint count a high complaint rate.
- Randomizing at the complaint level with shared agents.
- Choosing CSAT as the only primary metric, then buying a win with larger refunds.
- Claiming causation from correlations between speed and rating.