Manage several Facebook pages on the same Messenger chatbot

How do I get the ID of the Facebook page I contacted?

If you have connected your BOTNATION chatbot to several Facebook pages you may need to know the ID of the Facebook page you are contacting in order to personalize messages.

This can happen if you have multiple locations that each have their own Facebook page. They have their own Messenger account, however you want to manage a single chatbot for all these establishments while customizing the chat according to the establishment contacted by the user.

The user’s Messenger account ID is linked to the Facebook page ID. This information is available on BOTNATION in the system variable {{BN_MESSENGER_PAGE}} .

You can then perform conditions on this variable {{BN_MESSENGER_PAGE}} as for example below:

You are probably wondering now how to know in advance this identifier without having to perform tests to display the variable.

You have to go to the settings of the concerned Facebook page, you will find this identifier in the “About” section, as shown on the picture below.

The page ID is at the bottom of the “About” section.

➜ Discover Botnation and launch your chatbot easily!