{"id":1864,"date":"2022-11-07T10:14:16","date_gmt":"2022-11-07T09:14:16","guid":{"rendered":"https:\/\/botnation.ai\/get-an-email-and-a-phone-number-from-a-facebook-messenger-chatbot\/"},"modified":"2026-01-02T16:27:58","modified_gmt":"2026-01-02T15:27:58","slug":"get-an-email-and-a-phone-number-from-a-facebook-messenger-chatbot","status":"publish","type":"support","link":"https:\/\/botnation.ai\/en\/support\/get-an-email-and-a-phone-number-from-a-facebook-messenger-chatbot\/","title":{"rendered":"Get an email from a Facebook Messenger chatbot"},"content":{"rendered":"<p>Facebook Messenger chatbots allow you to easily retrieve an email. We present you the best practices.<\/p>\n\n\n\n<p>The Facebook Messenger chatbot makes it easy for you to collect leads. Indeed, you have probably already noticed that the Facebook module has options that <a href=\"https:\/\/botnation.ai\/chatbotnation-hebergement-de-chatbot-web\/\">web chatbots<\/a> do not have, such as those circled in red:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/11\/image-166.png.webp\" alt=\"\" class=\"wp-image-6344\"><\/figure>\n\n\n\n\n\n<h2 class=\"wp-block-heading\">Introduction to email collection via a Facebook Messenger chatbot<\/h2>\n\n\n\n<p>If you discover it (and there\u2019s no harm done!), it\u2019s used to capture the email declared by your user on Facebook. Indeed, to exchange with a Facebook Messenger chatbot, it is necessary to be connected to a Facebook account. When creating this account, you will be asked to declare an email address that is included in your Facebook profile. In the platform settings, you then set your privacy preferences.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How does Facebook email collection materialize on Botnation AI?<\/h2>\n\n\n\n<p>Let\u2019s take a concrete example: in your chatbot, you insert a 2-step form aiming at collecting the username and email of your prospect. For the first question, you will use <a href=\"https:\/\/botnation.ai\/en\/modify-a-system-variable\/\">the System variable<\/a> {{USERNAME}} which will allow you to collect the name declared by the user when he\/she registered to Facebook. Let\u2019s look at the rest.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Email collection via the Facebook module<\/h2>\n\n\n\n<p>After clicking on the corresponding icon, the module configuration will appear as follows:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/11\/image-24.png.webp\" alt=\"\" class=\"wp-image-1870\" style=\"width:619px;height:703px\"><\/figure>\n<\/div>\n\n\n<p>All you have to do is decide on a redirection sequence when the email is retrieved under the {{BN_EMAIL}} variable. Also, give the user the option of not responding by offering a cancel button. Here we have indicated that the button would be called \u201cCancel\u201d. Also, indicate where this button will redirect (for example, to the phone number retrieval). Thus, the user has 2 options:<\/p>\n\n\n\n<p>1) Click on the email declared via Facebook that you can retrieve<\/p>\n\n\n\n<p>2) Choose cancel and you will not get the person\u2019s email back. This is a shame, and we will explain below how to avoid this situation!<\/p>\n\n\n\n<p>Here\u2019s how the dialog window looks on the user side (use the Test button at the top right to see where you are in real time):<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/11\/image-25.png.webp\" alt=\"\" class=\"wp-image-1873\" style=\"width:600px;height:121px\"><\/figure>\n<\/div>\n\n\n<p>I can see that it is my Facebook username and the email I declared on the social network.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Problem solving<\/h2>\n\n\n\n<p><strong>Offer your users to fill in an alternative email.<\/strong><\/p>\n\n\n\n<p>It is common to have several email addresses or Facebook accounts to meet personal or professional needs or simply to manage data on the Internet.<\/p>\n\n\n\n<p>To avoid wasting information in this type of form, we advise you to offer an alternative to your users by giving them the possibility to fill in another email address than the one declared in Facebook. The interests are numerous:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Your users do not feel compelled to give a personal email address<\/li>\n\n\n\n<li>Your users give an email address that they consult regularly<\/li>\n\n\n\n<li>They can choose on which email address to be contacted according to the service<\/li>\n<\/ul>\n\n\n\n<p>How to do this? We will leverage the cancel option by adding an intermediate sequence that asks to add an alternative email.<\/p>\n\n\n\n<p>It\u2019s very easy, but don\u2019t get lost in the editing! We advise you to follow step by step what we do here or to draw the tree structure (on free paper, it helps more than you think).<\/p>\n\n\n\n<p>Repeat the sequence where you ask your user to fill in his email. Explain that they can 1) Click on the email that appears to confirm it 2) Choose to enter another email. Here is our example:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/11\/image-28.png.webp\" alt=\"\" class=\"wp-image-1879\" style=\"width:638px;height:582px\"><\/figure>\n<\/div>\n\n\n<p>We have modified the cancel button which redirects to a simple user input sequence. In concrete terms, this is what will be offered to your user:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img decoding=\"async\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/11\/image-29-1024x159.png.webp\" alt=\"\" class=\"wp-image-1881\" style=\"width:694px;height:108px\"><\/figure>\n<\/div>\n\n\n<p>At this point, 2 cases are possible:<\/p>\n\n\n\n<p>1) The user clicks on his email then it will be retained in the variable {{BN_EMAIL}} and the user continues the form<\/p>\n\n\n\n<p>2) The user wishes to enter another email, then it should be sent on the alternative sequence provided for this purpose.<\/p>\n\n\n\n<p>Note: when you register on Facebook, a valid email address is required. If you set up this system, then an email will necessarily appear. It is possible, however, that some Facebook subscribers may not want to share their information with third-party applications.<\/p>\n\n\n\n<p>Let\u2019s go back to case 2). So create the alternative email retrieval sequence and add the \u201cUser Entry\u201d module:<\/p>\n\n\n\n<p>Then, ask your user to enter their email. Create the new user variable that will contain this value (in our example it is {{EMAIL}}). You can opt for Email Detection in \u201cVariable Type\u201d. This allows the input to be proposed again if the user does not write a value in the form xxx@xxx.xx. Otherwise, you can let it run free without selecting this option.<\/p>\n\n\n\n<p>This is what the configuration looks like:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img decoding=\"async\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/11\/image-31-1024x805.png.webp\" alt=\"\" class=\"wp-image-1885\" style=\"width:702px;height:551px\"><\/figure>\n<\/div>\n\n\n<p>NB: we have not done it here but it is possible to add a cancel button so that the user does not have to communicate this data.<\/p>\n\n\n\n<p>On the user side we have this:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img decoding=\"async\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/11\/image-32-1024x267.png.webp\" alt=\"\" class=\"wp-image-1887\" style=\"width:756px;height:197px\"><\/figure>\n<\/div>\n\n\n<p>Well constructed, this handling will allow you to face a maximum of cases and to mitigate the loss of information by proposing alternatives to your users.<\/p>\n\n\n","protected":false},"featured_media":0,"template":"","meta":{"_acf_changed":false},"categorie-support":[194,222],"class_list":["post-1864","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\/1864","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=1864"}],"wp:term":[{"taxonomy":"categorie-support","embeddable":true,"href":"https:\/\/botnation.ai\/en\/wp-json\/wp\/v2\/categorie-support?post=1864"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}