# Give Your Best Affiliates a Raise

> Ranks affiliates by what they earned over 90 days and moves the top performers to a higher rate or group.

- Job: [Affiliates & loyalty](https://storeagent.ai/mcp-recipes/job/affiliates/)
- 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) + AffiliateWP
- Works in: Claude, ChatGPT, Cursor and any MCP client connected to the store through StoreAgent MCP
- Web page: https://storeagent.ai/mcp-recipes/reward-top-affiliates/

## The prompt

```text
Show me my default commission rate and my affiliate groups. Rank my top 20 affiliates by earnings over the last 90 days, with their referrals, visits, current rate and how many of their referrals were rejected. Suggest who deserves a higher rate and what it should be, and tell me what it would cost me per month at their current pace. Wait for my OK, then update their rates and add a note with the date and reason.
```

## What happens when you paste it

You: Show me my default commission rate and my affiliate groups…

Assistant: Your default rate is 20%. Your top 5 earned $7,720 in 90 days and converted above 5%. None have a personal rate, and you have no groups yet. Calling: `affiliatewp/get-program-settings`, `affiliatewp/list-affiliate-groups`, `affiliatewp/list-top-affiliates`, `affiliatewp/list-referrals`, `affiliatewp/update-affiliate`.

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

Assistant: Moved 5 affiliates to 25%. At their current pace that costs about $640 more per month. Each one has a note with the reason.

## Abilities this recipe calls

- **Get affiliate program settings** (`affiliatewp/get-program-settings`, read only, from AffiliateWP): Reads the default rate and type, cookie length, currency, approval setting and enabled integrations. No secrets or API keys.
- **List affiliate groups** (`affiliatewp/list-affiliate-groups`, read only, from AffiliateWP): Lists affiliate groups, any group rate, and how many affiliates are in each.
- **Rank top affiliates** (`affiliatewp/list-top-affiliates`, read only, from AffiliateWP): Ranks affiliates by earnings for a date range, with their referrals and visits.
- **List referrals** (`affiliatewp/list-referrals`, read only, from AffiliateWP): Lists commissions with amount, status, affiliate, customer and campaign. Filters by affiliate, status or date.
- **Edit an affiliate** (`affiliatewp/update-affiliate`, asks first, from AffiliateWP): Edits an affiliate's name, rate, rate type, payment email, admin notes or group.

## Variations

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

- Move them into the [group] group instead of changing their rates one by one.
- Rank by number of referrals instead of earnings.

## Related recipes

- [Loyalty Program Health Check](https://storeagent.ai/mcp-recipes/loyalty-health-check.md): Tells you if your points program is working: how many points are redeemed, what it costs you and where points come from. Needs Advanced Loyalty Program.
- [Save Loyalty Points Before They Expire](https://storeagent.ai/mcp-recipes/save-expiring-points.md): Finds customers about to lose their points and gives them a small bonus that keeps their account active. Needs Advanced Loyalty Program.
- [Reward Your Top Loyalty Members](https://storeagent.ai/mcp-recipes/reward-top-loyalty-members.md): Ranks your most loyal customers by points earned and gives them a bonus as a thank you. Needs Advanced Loyalty Program.

---

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/
