All Collections
Integrations
Zapier-Powered Integrations
Using Zapier to Auto-Create Email Conversion Triggers by Offer
Using Zapier to Auto-Create Email Conversion Triggers by Offer

Leverage Refersion webhooks and Zapier to automatically create email triggers for affiliates that are in specific offers.

Andre Tan avatar
Written by Andre Tan
Updated over a week ago

Refersion has the ability to automatically create email conversion triggers for affiliates after a customer’s sale results in a conversion. This can be used to grant the affiliate a lifetime commission on that customer’s future sales.

Having this enabled for all affiliates in all offers works for most brands; if this works for you, simply email our team to have the feature enabled in your account. However, if you’d like to focus this and only add email conversion triggers for affiliates in certain offers, you’ll need to set this up outside of Refersion. In this article we've outlined the steps you'd use to set it up with Zapier, a workflow automation tool, and our Refersion Webhooks.

Before you get started please note:

  • This is an advanced tutorial; familiarity with Zapier and webhooks is required to complete this setup. If any of these terms sound unfamiliar, we recommend looping in your developer.

  • You will need a paid Zapier plan that supports at least 1 Premium app.

Step 1 - Create a Zap and set up your trigger

From the Zapier dashboard, click Make a Zap and give your Zap a descriptive name so it will be easy to find later.

Next, choose Webhooks by Zapier as the event that will start your zap.

Find “Catch Hook” under the Choose Trigger event and hit Continue. On the next page you’ll be given a custom webhook URL. Copy that URL.

Step 2 - Setting up a webhook in Refersion

Next you will create a webhook that will send notifications to Zapier for newly approved conversions. In Refersion, navigate to Account > Settings > Webhooks (on the bottom left) and then click + Create New Webhook.

A new window will pop up. From the popup, select the Conversion Approved topic type and paste the webhook URL you copied from your Zapier account.

Click Create. Now you have a webhook that will notify your Zapier account whenever a conversion is approved in Refersion.

Step 3 - Test Your Trigger

Head back to your Zap and click Continue to navigate past the custom webhook URL tab. To proceed on the next tab you will have to test your Zap by sending a request to the webhook URL; you'll need a pending conversion to approve to complete this test.

Note: If there are no pending conversions available on your account, create a new one by placing a test order.

Once you have approved a pending conversion in Refersion you can head back to Zapier and click Test. Zapier should be able to confirm receipt of the webhook, meaning that Refersion is successfully sending data into Zapier whenever a conversion is approved. This process may take a few minutes.

Click the blue Continue button to proceed.

Step 4 - Add a Filter Step

In order to ensure your zap is only creating email triggers for affiliates in specific offers, you’ll need to add a filter step in Zapier to specify the specific offer IDs.

For the filter step, search and select the Offer ID field from the conversion approved webhook captured in Step 1 of the zap. For the condition, select Exactly matches, and enter the offer ID for which you want to have email triggers created. In the below screenshot we’re using offer ID 84961.

Note: If you have multiple offers you to specify, you can click “+ Or” and add another Offer ID filter to the zap.

Test your Zap again to confirm it would have continued with this filter enabled, and then click Continue.

Step 5 - POST Your Email Conversion Trigger to Refersion

In order to create the email triggers, we’ll be utilizing Zapier’s Webhooks feature to POST to Refersion’s API.

For this step, choose Webhooks by Zapier as the app and select POST as the action then click continue.

Next you’ll enter in the following details for the post request:

Once the URL and Payload type fields are set up, you will need to configure 3 different fields related to the email conversion trigger and the affiliate.

For the first field you will type affiliate_code on the left. To the right of the field, you’ll search for “Affiliate Code” in the data from “Step 1, Catch Hook”. This field will let Refersion know which affiliate to create a trigger for.

For the next field you will enter type on the left. This determines the type of conversion trigger that you will create. Accepted values are COUPON, SKU, EMAIL. We’ll use EMAIL (in all caps).

For the final field you will type trigger on the left, and on the right you’ll search for “Customer Email” from the same “step 1, Catch Hook” webhook data. This will let Refersion know to attach this specific customer’s email from the approved conversion to the specified affiliate as a new email conversion trigger. This is what all of the fields should look like once you’ve completed these steps:

You can leave the next four fields (Wrap Request in Array, File, Unflatten, Basic Auth) as is.

For the very last section Headers, you will need your public and secret Refersion API Keys. You can find those keys by navigating to Account > Settings > Refersion API or following this guide.

Once you have those keys handy, type Refersion-Public-Key on the left and enter your public API key on the right. Add another header and type Refersion-Secret-Key on the left, and enter your secret key on the right.

Click the Continue button at the bottom, and click Test & Review on the next page.

If everything has been set up properly, then your email conversion trigger will have been created for your affiliate in your Refersion account! You can check this by navigating to the affiliate’s profile in Refersion and reviewing their conversion triggers.

That's it! Turn on your Zap! Going forward, anytime there is an approved conversion in your account for an affiliate in the offer ID(s) specified in the zap, an email conversion trigger will be created in Refersion.

Did this answer your question?