Can I get an affiliate's lifetime referred sales through an API, a webhook, Shopify Flow or a Shopify metafield?
No, you can't pull an affiliate's lifetime referred sales through an API, webhook, Shopify Flow, or Shopify metafield. Simple Affiliate has no public API, doesn't send webhooks to your own URLs, and doesn't write referral counts or sales totals to Shopify customer tags or metafields.
Where to see the lifetime total
Simple Affiliate shows each active affiliate's lifetime total right in the app:
- Open Analytics in Simple Affiliate.
- Select the Sales tab.
- Set the date range to All time (the default range is Last 90 days).
Only active affiliates appear in this list, with their totals under the Sales column. Use Export to CSV to get a file with one row per selected affiliate.
If you connect Simple Affiliate to Claude or ChatGPT, you can ask it for an affiliate's total sales. That option is included on every plan. It acts as you inside a chat, not as an API for another app. See Can I use Claude or ChatGPT with Simple Affiliate? for more details.
Shopify Flow, metafields and tags
The Shopify Flow triggers in Simple Affiliate only send details for one referral or one affiliate, never a total. The available triggers are Referral created, Referral confirmed, Referral reversed, Affiliate created, and Affiliate approved.
For referral triggers, you get that single order's amount, the commission amount, the currency, and the group name. They also include the affiliate's Simple Affiliate ID, name, and email. Moving an affiliate to a different group doesn't fire a trigger.
On an affiliate's Shopify customer, the metafield Simple Affiliate writes only holds their status. Simple Affiliate doesn't write a referral count, lifetime sales total, or similar number to a customer tag or metafield.
A tier signal for another app
If another app (like a loyalty app) reads Shopify customer tags, you can share a sales tier rather than an exact amount. With the Premium plan, you can set up group automation using a Lifetime flow and the Sales trigger. When an affiliate's lifetime sales reach a tier's threshold, the flow moves them up to a higher group.
Simple Affiliate adds a Shopify customer tag to every active affiliate, using Affiliate Group: plus their group name. If you set up one group per tier, your other app can read an affiliate's tier from that tag. Simple Affiliate keeps the Affiliate Group: tag active unless you turn it off inside the Flows page, under the Customer tags flow.
Keep a few limits in mind:
- The tag only shows the tier, not the sales amount.
- Tag updates happen during Simple Affiliate's next daily store check, not right when the move occurs.
- A Lifetime flow won't move an affiliate down into a lower group.
- An affiliate whose group isn't part of the flow won't get a tier.
To learn how these flows count sales, see How does a group automation flow with the Sales trigger count sales?.
Klaviyo
Simple Affiliate sends the Simple Affiliate Referral Confirmed event to Klaviyo on the Basic plan and above. That happens if the Klaviyo integration is turned on and Simple Affiliate has your Klaviyo private API key saved. The event goes to the Klaviyo profile tied to the affiliate's email address, carrying the order_amount property for that single order.
Simple Affiliate doesn't send an event for reversed referrals, and it doesn't send a total as a profile property. Because of that, adding up those events in Klaviyo won't subtract refunds or cancellations.