Outbound Webhook: How To Send Data From Referral Factory To External Apps

Learn how to create an outbound webhook. This means you can send user data out of Referral Factory and into your custom CRM, application, or external software.

📌 Webhooks are available on the following plans:

Basic, Pro, and Enterprise

Click here for more information on Referral Factory's plans.

In this guide 👇

1. What You Can Do With An Outbound Webhook

2. How To Create An Outbound Webhook

3. How To Edit An Outbound Webhook

 


1. What You Can Do With An Outbound Webhook

Referral Factory can send data to other applications via an outbound webhook. So, when you get a new user, we can pass that information into your custom CRM, contact database, or app.

The most popular use case for an outbound webhook on Referral Factory is to send the data of new referred leads. In other words, when someone signs up on their friend's referral link, we can send all the related data to an endpoint of your choice. However, we can also send the data of someone who registers for a referral link. 

The following events can trigger an outbound webhook from Referral Factory:

👉 When a new user (Person Referring OR Person Invited) joins your campaign. In other words, when someone registers for a referral link on the Pages for the Person Referring or when someone fills in their details on the Pages for the Person Invited. While this is a rare case, you can also fire a webhook when a user is added via CRM sync, Zapier, or API. 

👉 When a referred user (the person invited) becomes qualified

 


2. How To Create An Outbound Webhook

Once you or your developer has created a webhook endpoint in the receiving application or software, such as Airtable or Tray.io, follow these steps to configure your outbound webhook in Referral Factory:

 

→ Navigate to the Settings tab and select Webhooks and API from the top navigation bar. 

→ Click Create An Outbound Webhook.

→ Select the campaign for which you are creating a webhook.

→ Click Next

Select the event that will trigger your webhook. You have 2 options: 

👉 When a user joins your campaign (this can be a person referring or a person invited)

👉 When a referred user (the person invited) becomes qualified. 

→ Click Next.

→ Select which users to send:

👉 Referred (these are people who fill in their details on the Pages for the Person Invited or your new leads)

👉 Direct (these are referrers who register for a referral link on the Pages for the Person Referring, or via a referral widget or pop-up)

👉 Added (these are referrers whom you have enrolled into the referral program by uploading them or via CRM sync)

💡 In most cases, you only want to send the referred users' data out, as these are the new leads that have been referred to you. However, you can send users of any source.

💡 If you want to attach different information to each type of user, we recommend creating multiple webhooks. 

→ Click Next
 
→ Insert the endpoint to which the data of your webhook should be sent. This endpoint should be provided by the receiving application or software and must start with https://.
→ Select your preferred method for your webhook:
👉 POST- This submits the processed data to a specified resource.
👉 GET- This requests data from a specified resource.

💡 We recommend using a POST request. 

 

  → Click Next. 
→ Use the dropdown fields to configure your data payload. You can drag and drop the various fields to customize the structure of your payload. You can also add additional properties. 
→ Click Next. 

 

💡 You can learn more about these user fields in our API documentation.

💡 Remember you need to use the same naming convention as your endpoint to capture the data correctly in your receiving application or software. For example – if you have named the field email_address in Airtable, you need to make sure you name the field email_address in your webhook setup on Referral Factory.

 
→ Add security credentials if required. If not required, you may leave these fields blank. 
→ Click Next. 
 

 

→ Add headers if required. If not required, you may leave these fields blank. 
→ Click Next. 

 

Name your webhook.

→ Click Save

 

 → Success! Your webhook has been created.

Here is an example of how the request body is formatted in the request when data is sent to your endpoint. Data is sent via query parameters to your Webhook URL. 

referrer_id=261470&referrer_code=zgLAYb&referrer_first_name=Jessica&referrer_email=support%2Bjessica%40referral-factory.com&id=261471&code=zruTPh&first_name=Byron&email=support%2Bbyron%40referral-factory.com&url=https%3A%2F%2Fwebhooks.referral-factory.com%2FzruTPh%2Fjoin&source=Referred&date=2022-06-09&referrals_count=0&campaign_id=4815

Screenshot showing an example of how the request body is formatted in the request when data is sent to your endpoint.


 

3. How To Edit An Outbound Webhook

 

→ Navigate to the Settings tab and select Webhooks and API from the top navigation bar. 

→ Click Create An Outbound Webhook.

→ Select the campaign for which you have already created an outbound webhook. 

→ Click Next

→ You will see a list of all the webhooks you have created at the bottom of the screen. 

→ Click the blue button under the Actions column and select Edit

This will take you back into the webhook builder.