Referral rule filer for different purchase values

Asked on December 30, 2016 in Technical.

I am just getting integrated with Branch and want to learn how to create a referral rule for when a user invites a friend to the app and that friend makes a purchase that holds a range of specific $ amount.

For example, I would like to reward the referring user $5 every time each one of his referred friends sign up and make a purchase of $1 or more (anything that is not $0). **This situation is possible to have a $0 purchase because of the fact that its a group planning app that can have an RSVP to an event with a total price of $0.

 

As a note, I have already created a custom event for Event Purchased and it has metadata for the total price purchased, I’m just not sure how to create the referral rule to target ONLY those who were referred and ultimately made a purchase value of >$1

Mixstir — Product Manager
1 Answer(s)
Answered on January 2, 2017.

Hi – thanks for posting. Great question!

You can definitely achieve this with Branch referral rules. All you would need to use a flag, say award_credits, and set it to true only when the purchase value is greater than the amount you wish. Then, on the Branch Dashboard create a referral rule for the purchase event and use the filter option. In this case, you would need to add the key value award_credits : true in the referral rule filter. Let me know if you have more questions. Hope this helps.

Developer
Commented on January 2, 2017.

Hey, thanks for the help! Sounds pretty easy! For flags, is there a page in the docs that explains these? So I can really understand how to use it correctly and maybe some other use cases. I tried searching for Branch flags and couldn’t find anything.

Mixstir — Product Manager
Commented on January 2, 2017.

I meant flag in a generic sense. So basically award_credits will be nothing but a key value pair that you’ll add on the metadata and use it for filters. Here is some documentation on using event filters: https://dev.branch.io/getting-started/webhooks/advanced/#filtering-which-webhooks-are-sent

Developer