Bot Links and Ref Parameters is a shortened URL service operated by Facebook that redirects users a bot in Messenger. You can use them on your website, email newsletters, and more.

In addition to giving you a way to link to your bot, the Messenger Platform also supports the passing an arbitrary parameter via these links.

This can be used for many purposes, such as tracking different links placed in different channels or tying a Messenger user to a session or account in an external app. You can even use it to direct the user to specific content or features available within the bot.

An link with an added parameter looks like this:


How to create a link with a referral parameter.

Go to Tools > Links and REF Parameter and click the “Add Ref” button

For this illustration, we’ll select a Ref Link for Elegant Bots’ Free Chatbot Course.

The ref is “freecourse” and we selected the flow “FreeChatbotCourse”.

Note: You can also select other bot response such as “Text Response or a “Step”. Nonetheless, for this illustration we’ll use what’s normally used – a Flow. So, we’ll select the flow “FreeChatbotCourse”. 

When you hit the “Save” button, a ref link is already created as shown on the image below. 

To get your “Ref Link”, simply click on the 3 dots and click on “Get Link’.

The generated “Ref Link” is the string below. 


If you follow the “Ref Link”, it will route you to the flow “FreeChatbotCourse”, as shown on the image below. 

In the link shown below, freecourse is the ref parameter. You can replace freecourse with any word such as facebook-postyoutubebutton-in-bottom. 


How to save payload data to a custom field

You can append any data to an link and when the user clicks in your link the data is saved into a custom field. Append “–payload” at the end of the URL, where the payload is any data you want to save to a custom field. For example:     

On the above link 456 is the payload and it can be saved to the custom field “Course Code”. See the image below.

Note: Please create the custom field on Flows>Custom Fields.

How to pass multiple payload in links

You can append as many values and save it to multiple custom fields. Below is the format.–value1–738–value2–514–value3    


That’s it! Enjoy…