My users receive a reward when their friend signs-up to the web app.
I think I’ve figured out step 2 and beyond (attached image) but I haven’t figured out how to create the initial referral link which I think should look like:
@bens - I just built a referral program and here is what I did to allow referral links to be shared:
a) create a referred id and save it to a field (i called it src) using the “Calculate Formula”, then “Generate random string” option (see screenshots below)
b) choose the length of the random string that you want for your id (notice how bubble changes the phrase to “Calculate RandomString” when you do this.
c) Generate the actual link that will be clicked (I stored it in the same table)
I stored the random string separately (in a field called src) so that when the visitor lands on my site, I can search the table and identify who actually sent that person.
d) Lastly, send the link by email or SMS to the friend
Great solution @jagdish_bajaj
I seem to have it working as intended. The detailed explanation probably saved me a day or so of blindly stumbling around. Thanks!
When a partner account is created, I create 3 PartnerLinks records, each with its own random string and store the string (field named src) and also the entire link that is clickable (field named link)
When the partner sends the link to a friend and that user clicks on the referral link, I search for the random string in the PartnerLinks thing to locate the Partner who sent that referral.
It seems that you are updating “Refer Code valid” to “yes” without checking if the code was found in the search. If the input Referral code’s value is not empty, your code as shown, will always update to “yes”.
So before you change the user’s Refer Code valid, do it “Only when” – the current workflow thing’s value is not empty.
I looked inside the app and using the debugger, I tried to Check Validity using the code HIMANS but the search is turning up empty, even though a user exists with that code. There is a Privacy rule on the User thing which may be preventing the search from happening. Try changing the Privacy rule to allow other users to search, or temporarily remove the rule to see if that helps.