AffiliateWP Integration: Affiliate Registration, Referrals, and Payouts
Krom Automation Pro connects to AffiliateWP, the leading self-hosted affiliate program plugin for WordPress.
With three triggers covering affiliate registration, commission earning, and payout processing, you can automate the entire affiliate communication lifecycle — welcome emails, commission notifications, payout confirmations, and admin alerts; without any manual work.
No API key or configuration is required. Krom Automation detects AffiliateWP automatically when the plugin is active.
Requirements #
- Krom Automation Pro installed and activated
- AffiliateWP installed and active
No configuration needed. The integration activates automatically.
Available triggers #
Affiliate Registered
Fires when a new affiliate registers in AffiliateWP. This fires on registration regardless of whether the affiliate is immediately approved or placed in pending status awaiting review.
| Data field | Description |
|---|---|
affiliate_id | AffiliateWP affiliate ID |
affiliate_email | Affiliate email address |
affiliate_name | Affiliate display name |
affiliate_username | Affiliate WordPress username |
affiliate_status | Affiliate status at registration (active or pending) |
date_registered | Registration date |
user_id | WordPress user ID linked to this affiliate |
website_url | Affiliate’s website URL |
payment_email | Affiliate’s preferred payment email address |
Common use: Sending a welcome email to new affiliates, alerting the admin to review pending applications, logging new affiliates to a Google Sheet for tracking, or adding them to a CRM.
Referral Accepted
Fires when an AffiliateWP referral is accepted and a commission is earned. This is one of the most valuable triggers for affiliate programmes — affiliates expect prompt notification when they earn.
| Data field | Description |
|---|---|
referral_id | AffiliateWP referral ID |
affiliate_id | Affiliate ID |
affiliate_email | Affiliate email address |
affiliate_name | Affiliate display name |
affiliate_username | Affiliate username |
referral_amount | Commission amount earned |
currency | Currency code |
referral_type | Referral type |
reference | Order or transaction reference (e.g. WooCommerce order ID) |
context | Integration context (WooCommerce, EDD, etc.) |
referral_status | Referral status |
referral_date | Date the referral was accepted |
affiliate_total_earnings | Affiliate’s total accumulated earnings across all referrals |
Common use: Notifying the affiliate by email when they earn a commission, alerting the marketing team via Slack when a high-value referral comes in, or logging referrals to Google Sheets for reporting.
Payout Created
Fires when an AffiliateWP payout is created for an affiliate.
| Data field | Description |
|---|---|
payout_id | AffiliateWP payout ID |
affiliate_id | Affiliate ID |
affiliate_email | Affiliate email address |
affiliate_name | Affiliate display name |
payout_amount | The payout amount |
payout_method | Payment method used (e.g. PayPal, bank transfer) |
payout_status | Payout status |
payout_date | Date the payout was created |
Common use: Notifying affiliates when their payout has been processed, logging payouts for accounting purposes, or alerting the finance team of outgoing payments.
Setting up your first AffiliateWP workflow #
- Go to Krom Automation > Workflows and click Add New Workflow.
- Click Add Trigger and select the AffiliateWP trigger from the Affiliate category.
- If you only want the workflow to run for affiliates with a specific status (e.g. pending approval), add a Condition node. Set the field to
affiliate_status, operator toequals, and value topending. - Add your actions using
{{affiliate_email}},{{affiliate_name}},{{referral_amount}}, and other available merge tags. - Simulate and activate.
Screenshot: AffiliateWP Affiliate Registered trigger on the canvas with a condition node filtering by affiliate_status, connected to a Send Email action below it.
Screenshot: AffiliateWP Referral Accepted trigger connected to a Send Email action and a Google Sheets Append Row action.
Real-world automation examples #
Welcome email to new affiliates Trigger:
Affiliate Registered Action: Send Email to {{affiliate_email}} welcoming {{affiliate_name}} with their affiliate dashboard link, programme terms, and any getting started resources.
Admin alert for new affiliate pending review Trigger:
Affiliate Registered Condition: affiliate_status equals pending Action: Send Email to {{admin_email}} notifying that {{affiliate_name}} from {{website_url}} is waiting for approval, with their registration date.
Commission earned notification to affiliate Trigger:
Referral Accepted Action: Send Email to {{affiliate_email}} notifying {{affiliate_name}} that they’ve earned {{referral_amount}} {{currency}} from a recent referral.
High-value referral Slack alert to marketing team Trigger:
Referral Accepted Condition: referral_amount greater than 100 Action: Slack Send Message to #marketing with {{affiliate_name}} earned {{referral_amount}} on referral {{reference}}.
Log all referrals to Google Sheets Trigger:
Referral Accepted Action: Google Sheets Append Row with {{affiliate_name}}, {{affiliate_email}}, {{referral_amount}}, {{currency}}, {{reference}}, and {{referral_date}} as columns.
Payout processed confirmation to affiliate Trigger:
Payout Created Action: Send Email to {{affiliate_email}} confirming that a payout of {{payout_amount}} {{currency}} via {{payout_method}} has been processed and is on its way.
Pre-built templates #
Install these from Krom Automation > Templates:
| Template | What it does |
|---|---|
affwp-new-affiliate-welcome | Welcome email to new AffiliateWP affiliates on registration |
affwp-new-affiliate-admin-alert | Admin notification email when a new affiliate registers |
affwp-referral-earned-notification | Email notification to affiliate when they earn a commission |
Troubleshooting on AffiliateWP integration #
AffiliateWP triggers aren’t appearing in the trigger list
Confirm AffiliateWP is installed and active. Krom Automation detects it automatically. If triggers still don’t appear after AffiliateWP is active, try deactivating and reactivating the Krom Automation Pro plugin to force a fresh detection scan.
The Affiliate Registered trigger is firing for both active and pending affiliates when I only want one
Add a condition on affiliate_status to restrict the workflow. Use equals active to target immediately approved affiliates and equals pending to target those awaiting review. Without a condition, the trigger fires for all new registrations regardless of status.
Referral Accepted is firing for referrals across all affiliates and I only need a specific one
Add a condition on affiliate_id equals the specific affiliate ID you want to target. You can find affiliate IDs in the AffiliateWP admin under Affiliates.
The {{affiliate_total_earnings}} field is showing zero on the first referral
This is expected. On the very first referral for a new affiliate, total earnings may not yet reflect the current referral depending on when the hook fires and how AffiliateWP calculates totals. The value is accurate from the second referral onwards.