/
/
Find out why money is going back in WooCommerce
For finance and ecommerce teams who want WooCommerce refunds for a period analyzed by reason, product and customer by their AI assistant.
On this page
Connector
Connect WooCommerce, pick your AI tool and paste the prompt.
The problem
Refunds nobody looks at until margins slip
WooCommerce refunds carry reasons, products, customers and staff, but nobody looks at them together until margins slip. Spotting the odd one, like an order refunded for more than its total, means reading every refund.
Without PopdockAI
- Export refunds for the period
- Group reasons and products by hand
- Look for repeat refunders
- Miss an over-refund until the margin report
With PopdockAI
- Refunds, refunded lines and orders are read
- Reasons are grouped and top refunded products listed
- Repeat refunders and gateway versus manual refunds are shown
- Anomalies such as over-refunds are flagged, and nothing is changed
The prompt
Use this prompt
Copy it into any AI tool connected to PopdockAI. Swap the values in braces for your own.
**Objective:** Explain the refunds made from `{date-from}` to `{date-to}` (default today): how much, why, on which products, for which customers, and whether any look wrong.
**Step 1: Pull the refunds**
* `woocommerce-get-refund` with `created-date.from` = `{date-from}` and `created-date.to` = `{date-to}`. Use the absolute value of `amount`.
* `woocommerce-get-refund-line` with the same range, for the products refunded.
* `woocommerce-get-order` with the same range, for the refund rate. Treat orders with status `completed`, `processing`, `on-hold` and `refunded` as sales. Exclude `pending`, `failed`, `cancelled` and `trash` orders from every total.
**Step 2: Analyze**
* Totals: refund count, amount, and refund rate = refunded amount / gross sales for the period. The rate is approximate, because a refund can relate to an order placed before the period.
* Reasons: group `reason`, treating blank as "No reason given". Merge obvious duplicates only when the wording is the same apart from case and punctuation.
* Products: group refund lines by `line-item-sku` (fall back to `line-item-name`): units, amount, number of refunds.
* Customers: any `customer-email` with 2 or more refunds in the period.
* Method: split by `refunded-payment` (true = returned through the gateway, false = manual) and by `refunded-by-username`.
* Anomalies: an order refunded more than once; refunds whose sum exceeds `order-total`; refunds over 100 with no reason; manual refunds on orders whose status is not `refunded` or `completed`.
**Step 3: Report**
1. Headline: refund amount, count and rate.
2. Reasons table: reason, count, amount.
3. Top 10 refunded products: name, SKU, units, amount.
4. Repeat refunders: email, refunds, amount.
5. Gateway vs manual, and by staff user.
6. Anomalies, each with the refund id and order number, or "None found".
**Rules & Guidelines:**
* This prompt is read-only. Do not call any write tool: `woocommerce-add-order`, `woocommerce-update-order`, `woocommerce-add-order-note`, `woocommerce-send-order-details`, `woocommerce-add-refund`, `woocommerce-add-customer`, `woocommerce-update-customer`, `woocommerce-add-product`, `woocommerce-update-product`, `woocommerce-update-product-variation`, `woocommerce-add-coupon`, `woocommerce-update-coupon`.
* Pass `max-records` explicitly (500 unless stated otherwise). If a read returns exactly that many rows, say the result may be truncated and that totals are a lower bound.
* If the rows carry more than one `currency`, report each currency separately. Never add amounts across currencies.
**Validation:**
* If `{date-from}` is not a valid date, ask for one and stop. If `{date-to}` is empty, use today.
* If there are no refunds in the range, say so and give the order count for context.Who it's for
One answer, three teams that use it
Finance managers
Catch refund mistakes early
Over-refunds and large refunds with no reason are flagged before they add up.
Review WooCommerce refunds for October and flag anything that looks wrong.
Product managers
See which products come back
The top ten refunded products and grouped reasons point to quality or listing problems.
Which WooCommerce products were refunded most last quarter, and why?
Store managers
Review staff refunds
Gateway and manual refunds by staff user show who is issuing what.
Break down this month's WooCommerce refunds by staff user and gateway versus manual.
How it works
What PopdockAI does when you ask
You give a date range, and your AI assistant analyses every refund in it. It is read-only, keeps currencies separate and warns when results may be truncated.
01
Ask
You give a date range.
02
Read
It reads refunds, refunded lines and orders in the range.
03
Analyze
It groups reasons and finds top products, repeat refunders and anomalies.
04
Report
You get the totals, breakdowns and anything that looks wrong.
What PopdockAI provides
The tools behind the answer
Ready made tools for WooCommerce and one secure connection to your AI tool. No code, no exports.
woocommerce-get-refund
woocommerce-get-refund-line
woocommerce-get-order
This report is built from Get data tools only. PopdockAI applies the row, field and parameter rules your admin sets, and every query is written to the audit trail.
The outcome
Know why money is going back
Related use cases
More ways to put this data to work
One prompt template with infinite possibilities.
Your AI assistant adapts its approach, tone, and capabilities to match each unique context while you maintain a single, manageable workflow.
Join forward-thinking companies that are transforming their operations with intelligent, secure AI automation.

.webp)
