The way to implement a referral system
Get your customers to refer your bot to their friends is the easiest way to grow your subscriber list. BotSumo has a built-in feature that lets your bot automatically track referrals and execute any action when a user refers your chatbot to a new or existing user. A user can’t refer himself. At the end of this article has a link to a referral template ready to use.
It is very easy to use the built-in referral system. Follow these steps to create any referral system.
1- Create the shareable link
Your bot needs to give each user a unique link that they can share with their friends. To create a unique link for a referral system just append -c{{user_id}} to the end of any REF parameter m.me link. See some examples below.
Your Link | Referral Link |
https://m.me/your_page_id?ref=ref | https://m.me/page_id?ref=ref-c{{user_id}} |
https://m.me/you_page?ref=t-323483 | https://m.me/you_page?ref=t-323483-c{{user_id}} |
https://m.me/you_page?ref=44 | https://m.me/you_page?ref=44-c{{user_id}} |
You can for example get the link of any flow and append -c{{user_id}}.
The referral link must be sent to the user by your chatbot. When chatbot will send the user the link in Messenger, your bot will replace the {{user_id}} by the user ID related to your page. User ID is always unique.

You can also use the referral link as a button URL in a card.

2 – Increase points and reward
Every time a user refers a user a rule “User referred a new user” or “User referred existing user” is triggered. Go to Menu > Tools > Triggers & Actions to create rules. Basically every time a user refers your bot to a user, you will increase (not set value to) a custom field that contains the user points and start a flow that will use condition to check if the total point of the user is equal to the points that let the user be rewarded.

The image below shows how to increase user points. You need to click “+Action” button and click on “Set Custom Field”.

The flow that checks if the user gets rewarded must be similar to the image below.

Basically you will need a flow that will send the user their referral link, one rule to increase the user points, and another flow to check the user points and reward the user. You can create two rules if you want to give different points for referring a new and existing user.