← All docs

Zapier

Sprout Affiliate on Zapier sends your affiliate program's events to Google Sheets, Mailchimp, Klaviyo, Slack, and the other apps on Zapier, the moment they happen. Its actions approve and decline applications, approve and reject referral orders, add bonuses, and change an affiliate, from a Zap.

Zapier is on the Professional plan, the same as the merchant API, because every trigger and action is an API call made with your key. Below Professional a Zap's steps fail with the reason, and the connection starts working again on the upgrade. Plans and billing.

Connecting

  1. In Shopify, open Sprout Affiliate > Settings > Developer.
  2. In the API keys card, name the key Zapier, choose Read and write, and press Create API key. Copy the key now: it is shown once.
  3. In the Zapier card on the same page, press Connect in Zapier, sign in to Zapier, and accept the invite. Sprout Affiliate is then in your Zapier account.
  4. In Zapier, start a Zap, search for Sprout Affiliate, and pick a trigger or an action.
  5. Press Sign in, paste the key, and press Yes, Continue. The connection is named after your store.

Triggers need Read and write: turning a Zap on adds its webhook endpoint to your store. A key belongs to one store, so a second store is a second key and a second connection.

Triggers

Every trigger is instant. Sprout Affiliate posts to Zapier when the event happens, signed and retried like any webhook.

TriggerRuns when
New AffiliateSomeone signs up as an affiliate, or you add one.
Affiliate ApprovedAn affiliate is approved and can start earning commission.
New Referral OrderAn order placed through an affiliate's link or discount code comes in.
Referral Order ApprovedA referral order is approved, so its commission is owed in the next payout.
Referral Order RejectedA referral order is rejected, so no commission is paid on it.
Payout PaidA payout is sent or recorded as paid. It runs once for each affiliate in the payout.
New BonusAn affiliate is granted a bonus.

The fields each one carries:

Every trigger also carries Event, Event ID, and Event Time. While you build the Zap, the sample is a recent record from your store.

Actions

ActionWhat it does
Approve Affiliate ApplicationApproves a pending application and emails the affiliate. Takes the Affiliate Ref.
Decline Affiliate ApplicationDeclines a pending application, removes it, and emails the applicant. Takes the Affiliate Ref.
Approve Referral OrderApproves a pending referral order. Its commission is paid in the affiliate's next payout. Takes the Order ID from a referral order trigger, or the Shopify order number.
Reject Referral OrderRejects a pending referral order, so no commission is paid on it. Takes the same Order ID.
Add BonusGrants an active affiliate a one-off bonus, paid in the next payout. Takes the Affiliate Ref, an amount in your store's currency, and an optional note.
Record Custom EventRecords a custom event, such as a booked call or an app signup, and the affiliate earns the amount the program pays for it. Takes the event's key, the Affiliate Ref or a click number, and your own Event ID, which is paid once ever, so a Zap that runs twice never pays twice. See Custom events.
Update AffiliateChanges an active affiliate's commission rate, pauses or reactivates the affiliate, or replaces your private note. Only the fields you fill in change.

No action starts a payout. Anything a Zap approves or adds is owed to the affiliate and paid in your next payout, including an automatic one.

Finds an affiliate by Affiliate Ref or by email address, and returns the affiliate's fields, your private note, and what the affiliate is owed: Pending Commission, Approved Commission, Paid to Date, and Unpaid Bonuses. Pending and Approved are blank when your live Shopify orders could not be read at that moment.

Zaps to start with

Where Zaps show in Sprout Affiliate

Turning on a Zap with a Sprout Affiliate trigger adds an endpoint to Settings > Developer > Webhooks, labeled Zapier, with its deliveries and a Replay button for any that failed. Turning the Zap off removes it. Deleting it in Settings stops that Zap's trigger until the Zap is turned off and on again.

A store has ten webhook endpoints, and each Zap with a Sprout Affiliate trigger uses one. The phone app lists them too.

Revoking the key in Settings > Developer > API keys disconnects Zapier at once and removes the endpoints its Zaps added.

Troubleshooting