Measure returns and exchange outcomes

Follow returns from request to refund or exchange so ecommerce teams can reduce avoidable churn and protect revenue.

Published

difficulty intermediate · time to value 5 minutes

Start from this

Measure the returns and exchange funnel by reason, SKU, customer segment, refund amount, and whether the customer bought again.

Why this matters

Returns are not one metric. A size-exchange flow, a defective SKU, and a buyer-remorse refund have different fixes. The agent needs the full path to recommend the right response.

What you get

  • Return request volume by SKU and reason
  • Exchange completion versus refund completion
  • Refund dollars by segment
  • Whether returners buy again

Walk through it

You

Are returns becoming a retention problem?

Agent

I’ll group return requests by reason and compare refunds, exchanges, and repeat purchase behavior.

POST /v1/projects/:project_id/analytics/query {
  project_id: "default",
  hogql: "SELECT properties.return_reason AS reason, properties.sku AS sku, countIf(event = 'return_requested') AS requested, countIf(event = 'exchange_completed') AS exchanged, countIf(event = 'refund_completed') AS refunded, sumIf(toFloat(properties.refund_amount), event = 'refund_completed') AS refund_amount FROM events WHERE event IN ('return_requested','exchange_completed','refund_completed') AND timestamp > now() - INTERVAL 60 DAY GROUP BY reason, sku ORDER BY refund_amount DESC LIMIT 25"
}

The output

The agent returns return reasons, SKUs, exchange rates, and refund impact. It should suggest merchandising, support, fulfillment, or product-page fixes based on the dominant pattern.

Setting it up

Emit events from your returns flow and payment system with a shared order id. Include return reason and SKU as normalized fields.

Variations

  • “Which SKUs drive the most refunds?”
  • “Show exchanges versus refunds by size issue.”
  • “Find return reasons that predict churn.”

Try this recipe in your own agent.

Ask your agent to adapt the starter prompt to your saved signal map and live events, then run it against your data.

Install agentry.sh/install.md for me
Agent will onboard itself and then your app