New: connect Claude, ChatGPT or Cursor to your WooCommerce store. See how →

StoreAgent
Affiliates & loyalty recipe

Credit an Affiliate for a Missed Sale

Checks whether a sale already has a commission and adds the missing referral with the order as its reference.

WHAT IT DOES asks first Changes your store, only after you say yes
TIME SAVED ~15 min vs doing it by hand
REQUIRES BOTH
StoreAgentFree plugin · MCP on every plan
+
AffiliateWP AffiliateWP 2.37.0+ · changes need Enable MCP Write Access on
Connect your store
THE PROMPT
Affiliate [name] says they sent us the customer on order [order number], but the sale was not tracked. Look up the order and show me its date, total, status and customer. Check whether a referral already exists for that order. Then show the affiliate's rate, their coupon codes, and their visits on the day of the order. Tell me in plain words whether they should be credited and how much the commission should be at their rate. Wait for my OK, then add the referral as unpaid with the order as its reference.
PASTE INTO ClaudeChatGPTCursor+ any MCP client
WHAT HAPPENS NEXT

What Happens When You Paste It

Your assistant picks the right abilities, pulls live data from your store and does the work. Here’s roughly how the conversation goes.

1
It reads first. Read abilities run straight away, so it’s working from your real catalog, not guessing.
2
It checks with you. Anything that writes to your store stops and asks before it goes ahead.
3
It’s all logged. Every ability call shows up in wp-admin, so you can see exactly what changed.
Claude · connected to your store
yourstore.com · via StoreAgent MCP
Live
Affiliate [name] says they sent us the customer on order [order number], but the sale was not tracked…
Order 4182 is completed, $300, placed on 9 October. No referral exists for it. Maria Lopez earns 15% and had 2 visits that day, neither converted. Calling:
woocommerce/orders-querydone
affiliatewp/list-referralsdone
affiliatewp/get-affiliatedone
affiliatewp/list-affiliate-couponsdone
affiliatewp/list-visitsdone
affiliatewp/add-referraldone
CONFIRM BEFORE WRITING
This will make changes in WooCommerce. Do you want me to go ahead?
Yes, applyShow me first
Added a $45.00 unpaid referral for Maria Lopez with reference 4182 and the note: Customer referred by word of mouth.
UNDER THE HOOD

Abilities This Recipe Calls

Make sure these are switched on in your StoreAgent MCP settings. You can turn any of them off at any time.

read only
Finds orders by status, customer, email or date, with the items in each order.
woocommerce/orders-query
read only
Lists commissions with amount, status, affiliate, customer and campaign. Filters by affiliate, status or date.
affiliatewp/list-referrals
read only
Finds one affiliate by ID, username or email, with rate, group, notes, lifetime earnings and referral URL.
affiliatewp/get-affiliate
Lists the coupon codes that credit one affiliate and the discount each one gives.
affiliatewp/list-affiliate-coupons
read only
Lists affiliate link visits with landing URL, referrer, campaign and whether they converted. No IP addresses.
affiliatewp/list-visits
asks first
Adds a manual commission for a sale or lead that was not tracked.
affiliatewp/add-referral
MAKE IT YOURS

Tweak It for Your Store

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

+ Use a flat [amount] instead of their rate.
+ The referral already exists. Change its amount to [amount] instead.
StoreAgent

PO BOX 4362
Gumdale QLD 4154
Australia

Our Brands

© 2026 Rymera Web Co Pty Ltd. All Rights Reserved. ABN 51 604 474 213. Privacy Policy · Terms of Service · Data Processing Addendum · Affiliate Disclosure