# Take Back Points From Cancelled Orders

> RewardsWP takes points back on refunds, not on cancellations. This finds cancelled orders that kept their points and reverses them.

- Job: [Orders & fulfilment](https://storeagent.ai/mcp-recipes/job/orders/)
- What it does: Asks first: changes your store, only after you say yes
- Time saved: ~30 min vs doing it by hand
- Requires: StoreAgent (free plugin, MCP on every plan) + RewardsWP
- Works in: Claude, ChatGPT, Cursor and any MCP client connected to the store through StoreAgent MCP
- Web page: https://storeagent.ai/mcp-recipes/rewardswp-cancelled-order-points/

## The prompt

```text
Find orders cancelled in the last 90 days. For each one, check whether it still has RewardsWP purchase points that were not taken back. Show me a table with the order, the customer, the points and the date. Do a dry run of taking those points back and show me each member's new balance. Take them back only after I say yes, with the reason Order cancelled.
```

## What happens when you paste it

You: Find orders cancelled in the last 90 days…

Assistant: 9 cancelled orders still have their points: 3,140 points across 7 members. The biggest is order #4182 with 860 points. Calling: `woocommerce/orders-query`, `rewardswp/get-order-rewards`, `rewardswp/revoke-points-entry`.

Assistant: This will make changes in WooCommerce. Do you want me to go ahead?

Assistant: Took back 3,140 points. Each member's history shows a reversal with the reason Order cancelled.

## Abilities this recipe calls

- **Find orders** (`woocommerce/orders-query`, read only, from WooCommerce): Finds orders by status, customer, email or date, with the items in each order.
- **Explain an order's points** (`rewardswp/get-order-rewards`, read only, from RewardsWP): Shows the points, referral and rewards linked to an order, and why it did or did not earn points.
- **Take back a points entry** (`rewardswp/revoke-points-entry`, asks first, from RewardsWP): Reverses one points entry with a reason and updates the member's balance.

## Variations

Add one of these to the end of the prompt. Swap anything in [brackets] for your own details.

- Also check failed orders.
- Look back 12 months instead of 90 days.

## Related recipes

- [Are Stuck Tasks Holding Up My Orders?](https://storeagent.ai/mcp-recipes/booster-stuck-orders.md): Line up overdue Booster tasks with orders sitting in Pending or On hold, so you know where to look before customers ask.
- [Check Which Order Alerts Are Switched On](https://storeagent.ai/mcp-recipes/pushengage-order-alert-audit.md): Lists every PushEngage push and WhatsApp alert for WooCommerce order events, shows which are off, and matches them to your real order volume.
- [Set Up Order Status Pushes for Customers](https://storeagent.ai/mcp-recipes/pushengage-turn-on-order-pushes.md): Writes friendly push messages for your WooCommerce order events and switches the campaigns on, after you approve each message.

---

Part of the StoreAgent WooCommerce MCP Recipes directory: https://storeagent.ai/mcp-recipes/ (index for LLMs: https://storeagent.ai/mcp-recipes/llms.txt). Get StoreAgent free: https://app.storeagent.ai/sign-up/
