Refund Anomaly Detector
Spots the refund patterns that smell wrong — repeat refunders, refund-after-usage, policy violations — scored with real numbers, delivered as staged investigation notes.
This recipe pulls the Stripe refund ledger plus original payments for the window, enriches each with order/fulfillment context (Shopify when connected) and customer history (tenure, prior refunds, support contacts), and scores each refund and refunding customer against named pattern rules: repeat-refunder with counts and dollar totals vs your own baseline, refund-after-heavy-usage — the classic consumed-then-refunded pattern, amount-vs-policy for refunds exceeding stated limits, and ratio-spike for per-customer or per-period refund rates against the trailing baseline. Sentiment analysis separates abuse suspects from customers repeating a legitimate grievance — mislabeling a frustrated good customer as a fraudster is treated as a serious defect. Findings rank into investigate-first / watch / informational tiers with coverage gaps named, and each material finding becomes a drafted investigation note with a suggested next step. Slack alerts are staged with channel and message shown; nothing posts, and no refund action is ever executable.
How it runs
Multi-agent orchestration — here's the flow, step by step.
Pull the refund ledger plus original payments for the window: amounts, timestamps, reasons, dispute flags, and per-customer history. Reads the read-only Stripe ledger via stripe_list_charges and stripe_get_customer only — payment mutation tools are never in scope for this phase.
payment scannerPull order and fulfillment context when Shopify is connected — delivery status, return windows, time since delivery; name the gap when absent.
ecommerce scannerPull customer tenure, order history, and prior support contacts for pattern context.
crm scannerCompute the baselines from the account's own history with the reference population and window stated.
data analystScore each refund and customer against the named pattern rules with real numbers — counts, dollar totals, ratios, and the rule that fired.
revenue analystRead refund reasons and support notes to separate abuse-suspect patterns from legitimate repeated grievances.
sentiment analystRank findings into investigate-first / watch / informational tiers by dollar impact and abuse likelihood, with confidence labels on thin baselines.
workflow orchestratorDraft an investigation note per material finding: rule and score, evidence table, legitimacy read, and a suggested next step — staged, never executable.
document writerStage the optional Slack alert for investigate-first findings with channel and message shown, posted only on approval.
slack channel operations agentAssemble the detection summary, findings, staged alerts, and coverage-gap footer; upsert findings per window for idempotency.
report formatterRequired Agents
10- payment-scanner
- ecommerce-scanner
- crm-scanner
- revenue-analyst
- data-analyst
- sentiment-analyst
- workflow-orchestrator
- document-writer
- slack-channel-operations-agent
- report-formatter
Connections
Required
Optional
What it does
- Named pattern rules: repeat-refunder, refund-after-heavy-usage, amount-vs-policy, ratio-spike
- Scores computed from your own history with the reference baseline and window stated
- Sentiment separation of abuse suspects from legitimate repeat complaints
- Evidence per finding: exact transactions, amounts, dates, refund reasons, history
- Tiered ranking by dollar impact and abuse likelihood with confidence labels
- Coverage gaps named when Shopify or usage context is unavailable
- Staged investigation notes and Slack alerts — detection is strictly read-only
- Idempotent per window: reruns upsert findings, never re-raise duplicates
Example prompt
Look at last month's refunds and tell me if anything looks abusive — repeat refunders or refunds right after heavy usage — and draft investigation notes for the worst ones.
Ready to deploy Refund Anomaly Detector?
Start free. One click, full agent orchestration.
Get Started Free →