Zapier
Connect your program to about eight thousand other tools, with no code and no webhook handler to host.
Zapier watches for something happening in your affiliate program and does something in another tool. A partner earns a commission, and a message appears in Slack. Somebody applies to join, and a card appears on your board. You build it by picking from two dropdowns.
If you already run your own server, webhooks do the same job with more control and no third party. Zapier needs nothing hosted.
What you need
A Zapier account. The free plan is enough to try this.
An AffiliateRail API key. In the dashboard, Settings, API keys, Create key. Tick Read, Partners, Commissions and Webhook endpoints.
The key is shown once. Copy it before you close the dialog.
In Zapier, search for AffiliateRail, and paste the key when it asks. Zapier checks it straight away and shows your program name once it works.
Tick all four scopes. Webhook endpoints is the easy one to miss. Without it, a Zap connects fine and then never fires, because every AffiliateRail trigger works by creating a webhook endpoint behind the scenes.
What can start a Zap
These are triggers. Each one fires the moment the thing happens, so a Zap runs within a second or two.
| Trigger | Fires when |
|---|---|
| New Partner | A partner is added to your program |
| New Application | Somebody applies to join |
| Application Approved | You approve an application |
| New Referral | A partner sends a visitor who gets tracked |
| New Sale | A referred customer pays |
| New Commission | A partner earns a commission |
| Commission Paid | A commission is included in a payout that has been paid |
| Payout Paid | A payout to a partner has been paid from your own account |
| Payout Failed | A payout fails, so you can chase it |
What a Zap can do in AffiliateRail
These are actions and searches.
| Action | What it does |
|---|---|
| Create Partner | Adds a partner and sends them their portal invitation |
| Update Partner | Changes a partner's details, group or tags |
| Approve Application | Approves a pending application, which creates the partner |
| Reject Application | Rejects a pending application, with your own wording |
| Create Lead | Records a lead against a partner |
| Create Commission | Writes a manual commission into your ledger |
| Find Partner | Looks a partner up by email |
| Find Customer | Looks a referred customer up by email |
Nothing in Zapier can pay anybody
There's no action that sends a payout, and there never will be. Paying partners happens in Payouts, in the dashboard, from your own PayPal or Wise account, after you have looked at what you're about to send.
That's partly our decision and partly Zapier's rule: their platform doesn't allow an action that results in a payment. So a Zap can tell you a payout was paid or that one failed. It can't ask for one.
Create Commission is the closest thing. A commission is a line in your ledger saying what a partner has earned. It isn't a payment. Commissions sit there until you approve and pay them, and they can be voided or reversed if the sale refunds.
Money in a Zap
Every amount arrives twice.
amount_minoris the exact figure in whole cents or pence, so $19.80 is1980. Use this for anything that does arithmetic.amount_displayis the same figure written out,$19.80. Use this in a message a person will read.
AffiliateRail never stores a decimal amount anywhere, for the reason every accounting system gives: 0.1 plus 0.2 isn't 0.3 in a computer, and a rounding error in a commission is somebody's money.
Some Zaps worth building
- A partner is approved, so add a row to a Google Sheet and send them a welcome email from your own mailbox.
- A partner earns a commission, so post it to a
#winsSlack channel. - Somebody applies, so create a task for whoever reviews applications.
- A payout fails, so raise it somewhere you'll see it. Build this one first: otherwise a failed payout stays silent until the partner emails you.
- A referred customer signs up, so add them to your CRM with the partner's name on the record.
When a Zap stops firing
Almost always one of three things.
The API key was revoked or rotated. Zapier shows the connection as broken. Reconnect it with a new key.
Somebody deleted the webhook endpoint by hand. Every running Zap has one, in Settings, Webhooks, pointing at a hooks.zapier.com address. Deleting it stops the Zap. Turn the Zap off and on again in Zapier and it re-subscribes.
The key is missing a scope. A key without Webhook endpoints connects but can't subscribe. Create a new key with all four scopes ticked.
You can see what was delivered and what failed in Settings, Webhooks, under the endpoint's deliveries.