How to set up dynamic rewards using Zapier/Webhooks

If you're looking to implement a referral program that offers rewards based on specific attributes of the referred friend, such as the pricing plan they signed up for, you can achieve this by setting up dynamic rewards using Zapier or webhooks. This will allow you to automate the reward process and ensure that each referred friend is issued the appropriate reward based on their attributes.

To set up dynamic rewards using Zapier, follow these steps:

  1. Your GrowSurf campaign referral trigger must be "Sign Up + Qualifying Action" and you should be adding participants to your campaign programmatically via JavaScript growsurf.addParticipant() or via REST API /POST Add Participant.
    1. At participant signup, you will need to add metadata (e.g, the plan they chose [STARTER, PROFESSIONAL, TEAM] or their country [USA, CAD, GB, AUS]).
  2. After your referral trigger is set up and a participant unlocks a reward, you can determine which reward they receive by using their custom metadata. To do this at the reward automation level, you should create a Zap with a Zapier Filter. The metadata of each participant (referrer/referred friend) are available to be used in the filter to create rules for issuing rewards. For example, you can use Zapier Filter to set something up like this: "If a participant has CAD as their country, then give them <specific-to-CAD-reward>".
    1. If your campaign is using a single-sided reward, then you will need to call /GET Participant By ID using the referredId value from the New Participant Reward event payload to get the referred friend's metadata. This is common in the use case where you want to provide the referrer with a dynamic reward and make a coupon code immediately accessible to the referred friend prior to signing up (see article).

To set up dynamic rewards using webhooks, follow these steps:

  1. Your GrowSurf campaign referral trigger must be "Sign Up + Qualifying Action" and you should be adding participants to your campaign programmatically via JavaScript growsurf.addParticipant() or via REST API /POST Add Participant.
    1. At participant signup, you will need to add metadata (e.g, the plan they chose [STARTER, PROFESSIONAL, TEAM] or their country [USA, CAD, GB, AUS]).
  2. Add a webhook URL to your campaign and configure it to send data to your server every time a New Participant Reward event occurs (for instructions on how to setup webhooks, click here).
  3. Once you set up your referral trigger, and a participant unlocks a reward, you can now use the metadata you received via webhooks to determine which rewards to fulfill from your end.
    1. If your campaign is using a single-sided reward, then you will need to call /GET Participant By ID using the referredId value from the New Participant Reward event payload to access the metadata of the referred friend. This is common in the use case where you want to provide the referrer with a dynamic reward and make a coupon code immediately accessible to the referred friend prior to signing up (see article).

Note: If you need to update participant metadata at any time, you can do so by calling the following REST API endpoints:

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.