Outbound Webhook: How To Send Referred Users Data Out

A webhook is a way for different applications to talk to each other or send data from one application to another in real-time.

In the case of Referral Factory, you can create an outbound webhook to send the data of your new referred user (or referred lead) to any endpoint – this could be an endpoint your developer creates or an endpoint you create in Zapier,  Airtable, Tray.io, or anywhere else that can receive an incoming webhook. 

Once you have created your webhook endpoint that can receive the data you're trying to send out, 

πŸ‘‰ Navigate to your campaigns tab in your dashboard

πŸ‘‰ Click on the Actions dropdown

πŸ‘‰ Choose Webhooks 

automate_referral_programs_webhooks

πŸ‘‰ Click on the "Create An Outbound Webhook" button. 

create_outbound_webhooks_automate_referral_campaigns

Steps to set up the outbound webhook πŸ‘‡

  1. Choose An Event
  2. Users To Send
  3. Endpoint & Method
  4. User Fields
  5. Hidden Fields
  6. Headers
  7. Finish

πŸ‘‰ Choose An Event

Follow the step-by-step prompts – start by choosing the event that your Webhook should fire on. 

set_up_outbound_webhook_inside_referral_factory

πŸ‘‰ Users To Send
Select which users to send. In most cases, you only want to send the referred users' data out, as these are the new users that have been referred to you.
referral_program_users_types

πŸ‘‰ Endpoint & Method

  1. Next, you will need to enter the endpoint that you created earlier. This must be a URL starting with HTTPS.
  2. You will then choose the request type – in most cases you will choose β€œSend me POST Request”.
  • GET- It requests data from a specified resource.
  • POST- It submits the processed data to a specified resource.

connect_your_referral_program_with_your_endpoint

πŸ‘‰ User Fields

Next, you need to customize the request fields and choose what information you want to send through. Toggle on which request fields you would like to pass on. Remember you need to use the same naming convention as your endpoint in order to catch the data correctly. For example – if you have named the field email_address in Airtable, you need to make sure you name it email_address in your Webhook setup on Referral Factory.

map_data_fields

πŸ‘‰ Hidden Fields

Next, you can use hidden fields if needed.

add_hidden_fields

πŸ‘‰ Headers

Next, you can set up your webhook headers (not required).

set_up_referral_campaign_webhooks

πŸ‘‰ Finish

Once you’ve completed the above steps, make sure you give your Webhook a name that you can easily identify and click β€˜Save’.

name_your_webhooks

 

Congrats. Your Webhook is now setup πŸ™Œ

 

Once you have created your Webhook or Webhooks, you can find them by navigating to your campaigns tab β†’ clicking the blue 'Actions' button β†’, and then clicking on Webhooks πŸ‘‡

outbound_webhooks

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

example_of_webhook_format

 

Learn more about Webhooks and Referral Factory in this help guide.