# Audit Affiliate Coupon Codes

> Checks which affiliate coupons bring in sales, which are never used and which look like they leaked onto coupon sites.

- Job: [Affiliates & loyalty](https://storeagent.ai/mcp-recipes/job/affiliates/)
- What it does: Read only: looks, never changes anything
- Time saved: ~35 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/affiliate-coupon-audit/

## The prompt

```text
Go through all my affiliates and list the coupon codes that credit each one, with the discount each code gives. For each affiliate with a coupon, show their referrals and visits from the last 90 days, and how many referrals came in with no visit, which usually means the coupon was used. Flag codes that belong to paused or rejected affiliates, codes with no referrals, and affiliates whose coupon referrals are far higher than their link visits. Suggest what to do with each code, but do not change anything.
```

## What happens when you paste it

You: Go through all my affiliates and list the coupon codes that credit each one, with the discount each code gives…

Assistant: 41 affiliates have coupon codes. 12 codes had no referrals in 90 days. SAM20 brought 118 referrals with only 9 link visits. Calling: `affiliatewp/list-affiliates`, `affiliatewp/list-affiliate-coupons`, `affiliatewp/list-referrals`, `affiliatewp/list-visits`.

Assistant: SAM20 looks like it is on a coupon site. 2 codes belong to paused affiliates. My suggestion for each of the 41 codes is in the table below.

## Abilities this recipe calls

- **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.
- **List an affiliate's coupons** (`affiliatewp/list-affiliate-coupons`, read only, from AffiliateWP): Lists the coupon codes that credit one affiliate and the discount each one gives.
- **List referrals** (`affiliatewp/list-referrals`, read only, from AffiliateWP): Lists commissions with amount, status, affiliate, customer and campaign. Filters by affiliate, status or date.
- **List visits** (`affiliatewp/list-visits`, read only, from AffiliateWP): Lists affiliate link visits with landing URL, referrer, campaign and whether they converted. No IP addresses.

## Variations

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

- Only check affiliates with more than [number] referrals.
- Look back [number] days instead of 90.

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