Bot Links and Ref Parameters

m.me 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 m.me link with an added parameter looks like this:

     
      https://m.me/<PAGE_ID>?ref=<REF_PARAM>
     

How to create a m.me link with a referral parameter.

Go to Tools > m.me 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. 

     
    https://m.me/ElegantBotsAI?ref=freecourse
     

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. 

     
    https://m.me/ElegantBotsAI?ref=freecourse
     

How to save payload data to a custom field

You can append any data to an m.me 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:

    https://m.me/ElegantBotsAI?ref=freecourse-456     

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 m.me links

You can append as many values and save it to multiple custom fields. Below is the format.

    https://m.me/ElegantBotsAI?ref=freecourse–value1–738–value2–514–value3    

–id1–value1
or
–id1–value1–id2–value2
or
–id1–value1–id2–value2–id3–value3
or
…..

That’s it! Enjoy…