AffiliateWP Automations
How to Give an Affiliate a Bonus Commission When They Complete a Training Course
Bonuses encourage the behaviour you want. To give an affiliate a bonus commission when they complete a training course, use Zapify's A user completes a course trigger for LifterLMS with the Create a referral action. AffiliateWP and LifterLMS are Zapify PRO integrations.
What this automation does
The automation is one trigger plus one action:
- Trigger: A user completes a course (
LIFTERLMS_COURSE_COMPLETED, LifterLMS) - Action: Create a referral (
AFFWP_CREATE_REFERRAL, AffiliateWP)
When an affiliate completes the course, Zapify creates a referral for them with the bonus amount, which then appears in their earnings like any other.
PRO feature
LifterLMS and AffiliateWP are Zapify PRO integrations, so this automation needs an active Zapify PRO licence.
No Connection needed for AffiliateWP
AffiliateWP runs on your own site, so there is no API key to paste for it and nothing to set up under Settings → Connections.
Before you start
- AffiliateWP installed and active.
- LifterLMS installed and active, with a course students can finish.
How to build the automation
Step 1: Create a new automation
- In the WordPress admin, go to Zapify → Automations.
- Click Add New to open the builder.
- Name it clearly, such as Reward affiliates for finishing training.

Step 2: Add the "A user completes a course" trigger
- Click Add Trigger.

- Choose LifterLMS as the app.

- Select A user completes a course.

- In the Course field, pick the course, or leave it as any course.
Step 3: Add the "Create a referral" action
- Click Add Action.

- Choose AffiliateWP as the app.

- Select Create a referral.

Step 4: Configure the action
| Field | Required | What it does |
|---|---|---|
| Affiliate | No | An affiliate ID, or the email of an affiliate's user. Leave empty to use the affiliate account of the user this automation is running for. |
| Amount | Yes | The commission, as a number that is not negative. |
| Type | Yes | Sale, Opt-in, Lead or any type your site offers. |
| Status | Yes | Pending (the default), Unpaid, Paid or Rejected. |
| Description | No | A short note shown on the referral in AffiliateWP. |
| Reference | No | Usually the order or record the referral is for. |
| Context | No | Where it came from, such as woocommerce. Leave empty to file it under zapify. |
For example:
- Affiliate: leave empty to use the affiliate account of the student who finished the course
- Amount:
10 - Type: Lead or Sale
- Status: Unpaid, so it is included in the next payout
- Description:
Bonus for completing affiliate training - Context:
training
Step 5: Set the steps Live and save
Each trigger and action has its own Live / Off / Draft switch. A new automation starts as a Draft and does nothing until its steps are Live.
- Set the trigger and every action to Live.
- Click Save.

Step 6: Test it
Complete the course as a test affiliate, then open AffiliateWP → Referrals. Zapify → Logs shows the run.
Tokens you can use
| Token | What it holds |
|---|---|
| Course ID | The numeric ID of the course. |
| Course title | The course's name. |
| Course URL | The permalink to the course. |
The action makes two tokens available to later actions: Referral ID and Affiliate ID.
Conclusion
With the A user completes a course trigger and the Create a referral action, training pays for itself. Because the bonus is a normal referral, you can email affiliates when it is paid.
FAQs
Is this free in Zapify?
No. AffiliateWP and LifterLMS are both Zapify PRO integrations and need an active Zapify PRO licence.
What if the student is not an affiliate?
The run fails and says the user is not an affiliate and no affiliate was specified.
Could one student be paid twice?
Only if they complete the course twice. Add a filter, as described in filters and conditions, if you need to guard against it.
Do I need to write any code?
No. Everything is configured visually in the Zapify builder.