Catch ThriveCart refund spikes before they hurt your product

By General Input

Every ThriveCart refund posts to Slack, and when refunds cluster on the same product the agent files a Linear issue with a diagnostic brief.

Integrations

  • ThriveCart
  • Slack
  • Linear

Type

Agentic Task

Categories

  • Product
  • Operations

Build an agent workflow that treats every ThriveCart refund as a possible product-quality signal, not just an accounting event. The value of the agent is in the diagnostic write-up and the conditional escalation, so use the agent workflow type.

Trigger: a ThriveCart webhook on order.refund events. On install, use ThriveCart Create Event Subscription to subscribe the workflow's webhook URL to order.refund so the workflow fires whenever a refund happens.

Configurable inputs the user should set when they install the workflow:

- Slack channel for the per-refund ops summary (default: an ops or revenue channel).

- Linear team that owns product quality, plus an optional default assignee, priority, and project.

- Refund spike threshold: a count threshold (default 3 refunds in 14 days on the same product) and a rate threshold (default refund rate above 5 percent of recent transactions for that product). Either crossing fires an escalation.

- Lookback window in days (default 14).

- Linear label to apply (default refund-spike).

Steps the agent should take when an order.refund webhook arrives:

1. Read the refund payload. Capture the product id and name, order id, refund amount, customer email, and any customer-supplied refund note or reason.

2. Call ThriveCart Get Customer using the customer email to pull their purchase and refund history with us, so the brief can say whether this is a first-time buyer or a repeat customer.

3. Call ThriveCart List Transactions filtered to the configured lookback window (default last 14 days). Scan the results for other refunded transactions on the same product. Count them, and compute the refund rate as refunds divided by total transactions for that product in the window.

4. Always post a Slack Send a Message to the configured ops channel summarizing the single refund: product, customer (masked email if appropriate), amount, and one line on whether the threshold was crossed ("1 of 3 in 14 days" or "spike: 4 refunds, 7 percent refund rate").

5. If the threshold is crossed, write a short diagnostic brief in plain English: what's happening (refund count, refund rate, window), what the product is, the customer notes or refund reasons collected from the payload and recent transactions, and one or two suggested next steps for the product owner. Then call Linear Create Issue in the configured product team with the brief as the description, a clear title like "Refund spike: <product name> (<count> refunds in <window>)", and the refund-spike label so the product team can filter on it.

6. If the threshold is not crossed, do not file a Linear issue. The Slack message is enough.

Guardrails: do not file duplicate Linear issues for the same product within the lookback window. If an open refund-spike issue for that product already exists in the team, add a comment with the new refund instead of opening a new one. Mask or trim PII in Slack as needed. Use ThriveCart amounts in dollars even though the API returns cents.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentWin back LiveChat visitors whose chats went unansweredChat quality review board for LiveChat support leadsWin back no-show and cancelled appointments every morningLive Loop returns analytics with product-level drill-downNewsletter pre-flight and approval board for Mailjet sendsTurn a prospect spreadsheet into personalized sequence enrollmentsMailjet email delivery lookup console for support teamsCatch feature flags that never got switched on in productionKajabi customer support console for member access fixes