# Recruit Your Best Customers as Affiliates

> Finds your highest-spending repeat customers who are not affiliates yet, writes the invite, and adds the ones who say yes to AffiliateWP. Needs StoreAgent 1.2.2 or later.

- 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: ~45 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/recruit-customers-as-affiliates/

## The prompt

```text
Find my 20 customers who spent the most in the last 12 months and placed at least 3 orders. Check AffiliateWP and remove anyone who is already an affiliate. Show me the rest with total spent, order count and last order date. Write a short, friendly email I can send to invite them to join my affiliate program. When I tell you who said yes, add each one as an active affiliate with my default rate and send the AffiliateWP welcome email.
```

## What happens when you paste it

You: Find my 20 customers who spent the most in the last 12 months and placed at least 3 orders…

Assistant: 18 customers spent over $600 across 3 or more orders in the last 12 months. 3 are already affiliates, so 15 are left. Mia Chen leads with $2,140 over 9 orders. Calling: `storeagent/find-customers`, `affiliatewp/list-affiliates`, `affiliatewp/add-affiliate`.

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

Assistant: Here is a 4-sentence invite you can send. Mia, Tom and Lena said yes, so they are now active affiliates and each got the welcome email with their referral link.

## Abilities this recipe calls

- **Find customers** (`storeagent/find-customers`, read only, from StoreAgent): Finds customers by name or email, or by how much they spent and how many orders they placed, highest spender first.
- **List affiliates** (`affiliatewp/list-affiliates`, read only, from AffiliateWP): Lists affiliates with status, rate, group, earnings and referral counts. Filters by status, name, email or date.
- **Add an affiliate** (`affiliatewp/add-affiliate`, asks first, from AffiliateWP): Registers a user as an affiliate, or creates the user from an email address first.

## Variations

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

- Only include customers who ordered in the last 90 days.
- Give them a 25% rate instead of my default.

## 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/
