{"id":22118,"date":"2022-09-05T13:21:46","date_gmt":"2022-09-05T11:21:46","guid":{"rendered":"https:\/\/botnation.ai\/support\/managing-multiple-facebook-pages-on-a-single-messenger-chatbot-2\/"},"modified":"2026-02-25T22:34:36","modified_gmt":"2026-02-25T21:34:36","slug":"managing-multiple-facebook-pages-on-a-single-messenger-chatbot-2","status":"publish","type":"support","link":"https:\/\/botnation.ai\/en\/support\/managing-multiple-facebook-pages-on-a-single-messenger-chatbot-2\/","title":{"rendered":"Managing multiple Facebook pages on a single Messenger chatbot"},"content":{"rendered":"<p>How do I retrieve the username of the Facebook page I\u2019ve contacted?<\/p>\n\n<p>If you\u2019ve connected your BOTNATION chatbot to several Facebook pages, you may need to know the ID of the Facebook page you\u2019ve contacted in order to personalize messages.<\/p>\n\n<p>This can happen if you have several establishments, each with its own Facebook page. They therefore have their own Messenger account, but you want to manage a single chatbot for all these establishments, while personalizing the chat according to the establishment contacted by the user.<br><br>The identifier of the Messenger account contacted by the user is linked to the identifier of the Facebook page. This information is available on BOTNATION in the system variable {{BN_MESSENGER_PAGE}} .<\/p>\n\n<p>You can then perform conditions on this variable {{BN_MESSENGER_PAGE}} as shown below:<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"641\" height=\"629\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-40.png.webp\" alt=\"\" class=\"wp-image-409\" srcset=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-40.png 641w, https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-40-300x294.png 300w\" sizes=\"(max-width: 641px) 100vw, 641px\" \/><\/figure>\n<\/div>\n<p>By now, you\u2019re probably wondering how you can find out this identifier in advance, without having to run tests to display the variable.<\/p>\n\n<p>You\u2019ll find this identifier in the \u201cAbout\u201d section, as shown in the screenshot below.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"617\" height=\"145\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-41.png.webp\" alt=\"\" class=\"wp-image-411\" srcset=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-41.png 617w, https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-41-300x71.png 300w\" sizes=\"(max-width: 617px) 100vw, 617px\" \/><\/figure>\n<\/div>","protected":false},"featured_media":0,"template":"","meta":{"_acf_changed":false},"categorie-support":[194,222],"class_list":["post-22118","support","type-support","status-publish","hentry","categorie-support-features","categorie-support-variables-en"],"acf":[],"_links":{"self":[{"href":"https:\/\/botnation.ai\/en\/wp-json\/wp\/v2\/support\/22118","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/botnation.ai\/en\/wp-json\/wp\/v2\/support"}],"about":[{"href":"https:\/\/botnation.ai\/en\/wp-json\/wp\/v2\/types\/support"}],"wp:attachment":[{"href":"https:\/\/botnation.ai\/en\/wp-json\/wp\/v2\/media?parent=22118"}],"wp:term":[{"taxonomy":"categorie-support","embeddable":true,"href":"https:\/\/botnation.ai\/en\/wp-json\/wp\/v2\/categorie-support?post=22118"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}