AffiliateWP Automations
AffiliateWP Automations in Zapify: Every Trigger and Action Explained
Running an affiliate program means a lot of small jobs: welcoming applicants, deciding who to approve, telling affiliates when they earn and when they are paid, and keeping your own records. Zapify PRO connects AffiliateWP to the rest of your site so those jobs happen on their own. This page lists every trigger and action, what you need installed, and links to 24 automations you can copy.
Requirements
PRO feature
AffiliateWP is a Zapify PRO integration. It appears in the free builder greyed out so you can see what it offers before upgrading. See Zapify Free vs Pro.
- AffiliateWP installed and active.
- Zapify PRO with an active licence.
There is no Connection to set up. AffiliateWP runs on your own site, so there is no API key to paste.
Triggers
| Trigger | Starts when |
|---|---|
| A user registers as an affiliate | Somebody signs up through AffiliateWP's registration form, optionally only when their status is pending or active. |
| An affiliate's status changes | An affiliate's status changes to active, inactive, pending or rejected, optionally from a particular previous status. Approval is this trigger set to Active. |
| An affiliate earns a referral | AffiliateWP records a new referral, optionally limited by type, source and product. |
| An affiliate's referral changes status | A referral becomes pending, unpaid, paid or rejected, optionally limited by type. |
Who does the automation run for?
Most triggers are about the affiliate, so the user tokens and the Send an email action default to the affiliate. An affiliate earns a referral has one extra choice, Run for:
- The affiliate (the default) runs for the affiliate's WordPress user.
- The referred customer runs for the customer who bought. If the customer has an account, it runs for that user. If they checked out as a guest, it still runs, without a user, and you use the Referred customer email token to reach them.
Referral statuses
| Status | What it means in AffiliateWP |
|---|---|
| Pending | Created, but the order behind it is not complete yet. |
| Unpaid | Confirmed and waiting for the next payout. |
| Paid | Paid out. |
| Rejected | Not payable, for example because the order was refunded. |
Referrals for store orders are usually created as Pending at checkout and move to Unpaid when the order completes. To act on confirmed commissions only, use the status trigger set to Unpaid instead of the referral-created trigger.
Actions
| Action | What it does |
|---|---|
| Make the user an affiliate | Creates an affiliate account for a user, active or pending approval, with an optional rate, payment email and notes. If they are already an affiliate, nothing changes and the run succeeds. |
| Set the user's affiliate status | Changes an affiliate's status to active, inactive, pending or rejected. If they already have that status, nothing changes. |
| Create a referral | Creates a referral for an affiliate, given by ID or email, or the user's own affiliate account, with an amount, type, status, description, reference and context. |
All three work through AffiliateWP's own functions, so what they create appears in AffiliateWP and fires AffiliateWP's own hooks, including its notifications.
Tokens
The affiliate tokens are offered by all four triggers:
| Token | What it holds |
|---|---|
| Affiliate ID | The affiliate's numeric ID in AffiliateWP. |
| Affiliate status | Their status: active, inactive, pending or rejected. |
| Affiliate referral URL | Their personal referral link, ready to put in an email. |
| Affiliate payment email | The address they get paid at. |
| Affiliate rate / Affiliate rate type | Their commission rate and whether it is a percentage or a flat amount. |
| Affiliate earnings / Affiliate unpaid earnings | What they have earned in total, and what is still waiting to be paid. |
The two referral triggers add the referral and customer details:
| Token | What it holds |
|---|---|
| Referral ID | The referral's numeric ID. |
| Referral amount | The commission earned. |
| Referral type / Referral status | Sale, opt-in or lead, and the status it has now. |
| Referral context | The source of the referral, such as woocommerce or edd. |
| Referral reference (order ID) | The order or record the referral was earned from. |
| Referral description | The description AffiliateWP saved with it. |
| Referral products | The products on the referral, as a readable list. |
| Referred customer email | The customer's email, when AffiliateWP recorded one. |
The status triggers also offer Affiliate previous status or Referral previous status, so a message can say what changed. Every trigger also offers the user tokens for the user it runs for, such as User email and First name.
The actions hand back tokens for later steps: Affiliate ID and Affiliate referral URL from Make the user an affiliate, Affiliate ID from Set the user's affiliate status, and Referral ID and Affiliate ID from Create a referral.
Ideas to start with
Each of these is a step-by-step page.
Welcome and approve affiliates
- Send a welcome email when someone registers as an affiliate
- Get an email when a new affiliate is waiting for approval
- Post a Slack message when a new affiliate applies
- Create a ClickUp task to review each application
- Send an email when an affiliate is approved
- Send an email when an application is rejected
- Add a WordPress role when an affiliate is approved
- Add approved affiliates to a MailerLite group
- Tag approved affiliates in Groundhogg
Keep affiliates and customers informed
- Email an affiliate when they earn a new referral
- Email an affiliate when their commission is approved
- Send a payout email when a referral is paid
- Email an affiliate when a referral is rejected
- Thank a customer who buys through an affiliate referral
Alert your team and keep records
- Post a Slack message when an affiliate earns a referral
- Log referrals to a Google Sheet
- Log payouts to a Google Sheet
- Send a webhook when an affiliate earns a referral
Create affiliates and referrals automatically
- Make a customer an affiliate when they buy a WooCommerce product
- Make every new WordPress user an affiliate
- Make a student an affiliate when they complete a LearnDash course
- Approve an affiliate when they complete a training course
- Create a referral when a webhook is received
- Give an affiliate a bonus commission when they complete a training course
Conclusion
The AffiliateWP integration lets your program look after itself: warm welcomes, quick decisions, payout notices and records that write themselves. Start with the welcome email, then explore triggers and actions and filters and conditions to narrow when each one runs.
FAQs
What can Zapify automate in AffiliateWP?
Zapify can react when somebody registers as an affiliate, when an affiliate's status changes, when an affiliate earns a referral and when a referral changes status. It can also make a user an affiliate, set an affiliate's status and create a referral. Combine those with any other Zapify action, such as email, Slack, Google Sheets, MailerLite or Groundhogg.
Is the AffiliateWP integration free?
No. It is part of Zapify PRO. The actions you pair it with, such as Send an email, may be free.
Do I need an AffiliateWP API key or a Connection?
No. AffiliateWP runs on your own site, so Zapify talks to it directly.
How do I send an email when an affiliate is approved?
Use the An affiliate's status changes trigger with New status set to Active, and the Send an email action. See the step-by-step guide.
How do I notify an affiliate when they are paid?
Use the An affiliate's referral changes status trigger with New status set to Paid. See the payout email guide.
Can I email customers who buy through an affiliate link?
Yes. Set Run for to The referred customer on the An affiliate earns a referral trigger. It works for guests too, using the Referred customer email token. See the thank-you guide.
Why are some AffiliateWP triggers greyed out?
AffiliateWP is a Zapify PRO integration and needs an active licence, and AffiliateWP itself must be installed and active.
Do I need to write any code?
No. Everything is configured visually in the Zapify builder.