{"versionId":"9495b53d-8bd0-4555-029a-08dccaef2767","articleId":"95abf7ba-910d-4b08-ca3e-08dbdc84beba","title":"Adding a chatbot to WhatsApp","tags":["integrations","All articles"],"content":"<h2 id=\"mcetoc_1gokq5i7i3s\">Introducing WhatsApp integration</h2>\n<p>You can deploy the same chatbot, with the same knowledge base, on your website and on other channels, including WhatsApp.</p>\n<p>This means you can automate the answering of frequently asked questions, wherever your customers are asking them. All your chat forms and escalations will work on WhatsApp too.</p>\n<p>To set up your bot in WhatsApp, you'll first need to create an app on WhatsApp, and then connect it to your FAQ Bot.</p>\n<p>This article describes the steps you need to take.&nbsp;</p>\n<div class=\"mce-toc\">\n<h2>In this article...</h2>\n<ul>\n<li><a href=\"#mcetoc_1gokq5i7i3s\">Introducing WhatsApp integration</a></li>\n<li><a href=\"#prerequisites\">Prerequisites</a></li>\n<li><a href=\"#mcetoc_1hkpimn601tm\">Bot features on WhatsApp</a></li>\n<li><a href=\"#create-a-facebook-app\">Create an app</a>\n<ul>\n<li><a href=\"#create-your-app\">Create your app</a></li>\n</ul>\n</li>\n<li><a href=\"#mcetoc_1hkpimn601tn\">Configure your app</a>\n<ul>\n<li><a href=\"#mcetoc_1hkpimn601to\">Test details</a></li>\n<li><a href=\"#mcetoc_1hkpimn601tp\">Configuration</a></li>\n</ul>\n</li>\n<li><a href=\"#mcetoc_1hkpimn601tq\">Create your System Users Access token</a></li>\n<li><a href=\"#mcetoc_1go83kfvj3c\">Connect your bot&nbsp;</a></li>\n<li><a href=\"#mcetoc_1hkpimn601tr\">Testing your bot in&nbsp;WhatsApp</a></li>\n<li><a href=\"#mcetoc_1hkpimn601ts\">App review &amp; publication</a></li>\n<li><a href=\"#set-the-api-version\">WhatsApp documentation</a></li>\n</ul>\n</div>\n<div data-heading-level=\"h2\">\n<h2 id=\"prerequisites\">Prerequisites</h2>\n<p>Before you get started, you will need:</p>\n</div>\n<ul style=\"list-style-type: none;\">\n<li style=\"list-style-type: disc;\">A Meta for Developers account. If you don't have an account, you can create one at&nbsp;<a href=\"https://developers.facebook.com/\" data-linktype=\"external\">developers.facebook.com</a>.</li>\n<li style=\"list-style-type: disc;\">A WhatsApp Business Account</li>\n<li style=\"list-style-type: disc;\">A Premium FAQ Bot subscription. WhatsApp bots are not available on Starter or Standard plans. <a href=\"https://www.faqbot.ai/pricing\" target=\"_blank\" rel=\"noopener\">See pricing</a>.</li>\n</ul>\n<p style=\"list-style-type: disc;\">Note that this information is correct at the time of writing, but the Meta app submission process is subject to change. If you need any help, <a href=\"mailto:help@faqbot.nz\" target=\"_blank\" rel=\"noopener\">please get in touch</a>.</p>\n<h2 id=\"mcetoc_1hkpimn601tm\">Bot features on WhatsApp</h2>\n<p>There are <a href=\"https://help.faqbot.ai/article/faq-bot-features-on-whats-app\" target=\"_blank\" rel=\"noopener\">some differences in how FAQ Bot features work on WhatsApp</a>, due to the limitations of that channel.&nbsp;</p>\n<div data-heading-level=\"h2\">\n<h2 id=\"create-a-facebook-app\">Create an app</h2>\n</div>\n<div id=\"tabgroup_1\" data-bi-name=\"tab-group\">\n<section id=\"tabpanel_1_messenger\" role=\"tabpanel\" data-tab=\"messenger\">\n<p>Users will access your bot from a WhatsApp link/number. To connect the bot, you'll first create an app and then connect the bot to the app.</p>\n<div data-heading-level=\"h3\">\n<h3 id=\"create-your-app\">Create your app</h3>\n</div>\n<ol>\n<li style=\"list-style-type: decimal;\">Sign in to your&nbsp;<a href=\"https://developers.facebook.com/\" data-linktype=\"external\">Meta for Developers</a>&nbsp;account.</li>\n<li style=\"list-style-type: decimal;\">Go to&nbsp;<a href=\"https://developers.facebook.com/apps/create\" data-linktype=\"external\">Create App</a></li>\n<li style=\"list-style-type: decimal;\">On the&nbsp;<strong>Create an app</strong>&nbsp;page, select&nbsp;<strong>Other</strong>&nbsp;and then&nbsp;<strong>Next<br><img src=\"https://portal.faqbot.nz/api/images/079d861d72cc4aca80c65588df217079/files/Other%20WA%20app.png?width=1000&amp;height=\"><br></strong></li>\n<li style=\"list-style-type: decimal;\">On the <strong>Select an app type</strong> page select <strong>Business</strong> and click <strong>Next</strong></li>\n<li style=\"list-style-type: decimal;\">On the <strong>Details</strong>&nbsp;page, enter a name for your app and select&nbsp;<strong>Create app</strong>.\n<ul style=\"list-style-type: none;\">\n<li style=\"list-style-type: disc;\">If prompted, enter your password and select&nbsp;<strong>Submit</strong>&nbsp;to create your app.</li>\n<li style=\"list-style-type: disc;\">After your app is created, the site goes to a page for your app.</li>\n</ul>\n</li>\n<li style=\"list-style-type: decimal;\">You'll see a set of products. Click <strong>Set up</strong> on the&nbsp;WhatsApp tile<br><img src=\"https://portal.faqbot.nz/api/images/079d861d72cc4aca80c65588df217079/files/Setup%20WhatsApp%20Meta.png?width=1000&amp;height=\"><br><br></li>\n<li style=\"list-style-type: decimal;\">You'll then be prompted to select your Meta Business Account.</li>\n</ol>\n<h2 id=\"mcetoc_1hkpimn601tn\">Configure your app</h2>\n<h3 id=\"mcetoc_1hkpimn601to\">Test details</h3>\n<p>Under&nbsp;WhatsApp on the side menu, click <strong>API Setup. </strong>There are a few things here you can use for testing:</p>\n<ol>\n<li>Temporary access token (note this token will expire after 23 hours, so is only suitable for initial testing. It will need to be refreshed or replaced with a <a title=\"system user access token\" href=\"https://developers.facebook.com/docs/whatsapp/business-management-api/get-started#1--acquire-an-access-token-using-a-system-user-or-facebook-login\" target=\"_blank\" rel=\"noopener\">system user access token</a>)</li>\n<li><strong>From</strong> phone number - including a number you can use for testing - this is the number of your app/bot</li>\n<li><strong>To </strong>phone number - this is the phone number of the device you will be testing from. Once you enter this number, you will be sent a verification code, which you'll need to add here to confirm the connection.</li>\n</ol>\n<h3 id=\"mcetoc_1hkpimn601tp\">Configuration</h3>\n<p>Under WhatsApp on the side menu, click <strong>Configuration</strong>.</p>\n<ol>\n<li>Enter the <strong>callback URL</strong>. This is in the format&nbsp;<br><span dir=\"ltr\"><a title=\"https://bot.faqbot.nz/api/v1.0/webhook/%7bpage_or_number_id%7d/%7bfaq_subscription_key%7d/messages\" href=\"https://bot.faqbot.nz/api/v1.0/webhook/%7BPAGE_OR_NUMBER_ID%7D/%7BFAQ_SUBSCRIPTION_KEY%7D/messages\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"Link https://bot.faqbot.nz/api/v1.0/webhook/{PAGE_OR_NUMBER_ID}/{FAQ_SUBSCRIPTION_KEY}/messages\">https://bot.helpfruit.com/api/v1.0/webhook/{PAGE_OR_NUMBER_ID}/{FAQ_SUBSCRIPTION_KEY}/messages</a></span>\n<ol style=\"list-style-type: lower-alpha;\">\n<li>Find your {PAGE_OR_NUMBER_ID} on the <strong>API Setup page </strong>(see above) - you're looking for the <strong>Phone number ID</strong></li>\n<li>Find your {FAQ_SUBSCRIPTION_KEY} on the Widget setup tab in the <a href=\"https://portal.faqbot.nz/configuration/main\">FAQ Bot Portal &gt; Configuration &gt; Main</a></li>\n<li>Enter \"faq\" in Verify token</li>\n<li>Click&nbsp;<strong>Verify and save</strong></li>\n</ol>\n</li>\n<li>Click <strong>Manage</strong> to manage Webhook fields. Select&nbsp;<strong>Messages</strong> and click&nbsp;<strong>Done</strong></li>\n</ol>\n<p>&nbsp;</p>\n<h2 id=\"mcetoc_1hkpimn601tq\">Create your System Users Access token</h2>\n<p>Follow the instructions <a title=\"System users access token\" href=\"https://developers.facebook.com/docs/whatsapp/business-management-api/get-started#1--acquire-an-access-token-using-a-system-user-or-facebook-login\" target=\"_blank\" rel=\"noopener\">on this page</a>.</p>\n<p>Assign the app you have created above as an asset.</p>\n<p>Some things to note on your token:</p>\n<ul>\n<li>Token expiration - when your token expires, your bot will stop working. So you may wish to set expiry to \"Never\" (recommended)</li>\n<li>Permission required: whatsapp_business_messaging</li>\n</ul>\n<p>Copy the token as you'll need it for the next step.</p>\n<p>&nbsp;</p>\n<h2 id=\"mcetoc_1go83kfvj3c\">Connect your bot&nbsp;</h2>\n<p>In the FAQ Bot portal, navigate to the<strong> Channel settings</strong> tab on <a title=\"Configuration settings\" href=\"https://portal.faqbot.nz/configuration/main\" target=\"_blank\" rel=\"noopener\">Configuration &gt; Main</a><br><br>In the WhatsApp section:</p>\n<ol>\n<li>Enter your <strong>Phone number ID<br></strong>Find this in your Meta for Developers Account under <strong><strong>WhatsApp &gt; API Setup<br></strong><br></strong></li>\n<li>Enter your&nbsp;<strong>Access token<br></strong>For a quick test, you can use your temporary access token. Find this in your Meta for Developers Account under<strong> WhatsApp &gt; API Setup </strong>- note this will only last for a short time<br>To set up a permanent token, <a title=\"Create a system user access token\" href=\"https://developers.facebook.com/docs/whatsapp/business-management-api/get-started#1--acquire-an-access-token-using-a-system-user-or-facebook-login\" target=\"_blank\" rel=\"noopener\">follow this guide</a> to set up a system user access token.<strong><br><br></strong></li>\n<li>Enter your <strong>App secret</strong><br>You'll find this in your Meta for Developers Account, under&nbsp;<strong>App settings &gt; Basic<br><img src=\"https://portal.faqbot.nz/api/images/079d861d72cc4aca80c65588df217079/files/app%20secret.png?width=1000&amp;height=\"><br></strong></li>\n</ol>\n<p>Once the steps above are complete, you will be ready to test your bot on WhatsApp.<br><br><img src=\"https://portal.faqbot.nz/api/images/079d861d72cc4aca80c65588df217079/files/WhatsApp%20settings.png?width=1000&amp;height=\"><br><br></p>\n<h2 id=\"mcetoc_1hkpimn601tr\">Testing your bot in&nbsp;WhatsApp</h2>\n<p>WhatsApp users won't be able to message your bot until while it's in Development mode without first connecting a <strong>To phone number</strong> for testing. To connect a test device phone number (ie the mobile phone you will be testing on), go to <strong>API Setup </strong>under WhatsApp on the side menu<strong>. </strong>Once you enter this number, you will be sent a verification code, which you'll need to add on this screen to confirm the connection.<br><br>You can add and verify more than one number if you have multiple testers.</p>\n<p>&nbsp;</p>\n<div data-heading-level=\"h3\">\n<h3 id=\"submit-for-review\"></h3>\n</div>\n<h2 id=\"mcetoc_1hkpimn601ts\">App review &amp; publication</h2>\n<p>Until an app is published, it's in&nbsp;<a href=\"https://developers.facebook.com/docs/apps/managing-development-cycle\" data-linktype=\"external\">Development Mode</a>. It will only work for admins, developers, and testers.</p>\n<p>Once you have tested your bot on WhatsApp, there are some review steps that need to be completed to move your app from Development to Live mode and publish your app.</p>\n<p><img src=\"https://portal.faqbot.nz/api/images/079d861d72cc4aca80c65588df217079/files/app%20go%20live.png?width=1000&amp;height=\"></p>\n<p>1. Toggle from Development to Live in your app dashboard. Any required steps will be highlighted, for example:</p>\n<ul>\n<li>add privacy policy URL. This could be a link to your organisation's privacy policy, typically on your website.&nbsp;</li>\n</ul>\n<p>2. Go to <strong>App Review &gt; Permissions and Features<br><br></strong>3. Request Advanced Access to <strong>whatsapp_business_messaging</strong>. <a href=\"https://developers.facebook.com/docs/development/release/business-verification\">Business Verification</a> is required, as well as App Review.</p>\n<p><img src=\"https://portal.faqbot.nz/api/images/079d861d72cc4aca80c65588df217079/files/WhatsApp%20permissions.png?width=1000&amp;height=\"></p>\n<p>4. Complete the rest of the required information. You will need to:</p>\n<ul>\n<li>Answer questions about data handling, eg - &nbsp;</li>\n</ul>\n<p><img src=\"https://portal.faqbot.nz/api/images/079d861d72cc4aca80c65588df217079/files/data%20handling%20Meta.png?width=1000&amp;height=\"></p>\n<ul>\n<li>Check you have requested the necessary permissions and features (see above)</li>\n<li>Select the audience for your app</li>\n</ul>\n<p><img src=\"https://portal.faqbot.nz/api/images/079d861d72cc4aca80c65588df217079/files/image%20%2821%29.png\"></p>\n<ul>\n<li>Provide justification for your app - answer the specified questions and provide a screencast. <a href=\"mailto:help@faqbot.nz\" target=\"_blank\" rel=\"noopener\">Contact us</a> for guidance.</li>\n</ul>\n<p><img src=\"https://portal.faqbot.nz/api/images/079d861d72cc4aca80c65588df217079/files/Justification%20WhatsApp.png\"></p>\n<p>&nbsp;</p>\n<div data-heading-level=\"h3\">The App Review process can take 10 days or more, and may require revisions depending on the individual app reviewers.&nbsp;</div>\n<div data-heading-level=\"h3\">&nbsp;</div>\n</section>\n<div data-heading-level=\"h2\">&nbsp;</div>\n<div data-heading-level=\"h3\">\n<h2 id=\"set-the-api-version\">WhatsApp documentation</h2>\n</div>\n<p>For WhatsApp documentation for developers, see&nbsp;<a href=\"https://developers.facebook.com/docs/whatsapp/\">https://developers.facebook.com/docs/whatsapp/</a></p>\n<p>&nbsp;</p>\n<p>&nbsp;</p>\n<p>&nbsp;</p>\n</div>","description":"","isMarkdown":false,"publishedOnUtc":"2024-09-09T23:00:44.1609284","modifiedOnUtc":"2023-11-07T00:45:08.1686505"}