WhatsApp

Make your bot available on WhatsApp

Prerequisites

  • A Meta application created from the Meta for developers interface,

  • The WhatsApp application installed (on your phone or computer),

  • A phone number to test the bot.

To create a bot on WhatsApp that will be connected to your dydu bot, we will follow these steps:

  1. Adding and configuring the necessary products from your “Meta for developers” portal.

  2. Creation and configuration of a Meta type integration from the “Channels” menu of the BMS dydu.

  3. Advanced access request for necessary permissions and features.

Add necessary products for WhatsApp

To make your application work on WhatsApp, we will add and configure the following products:

  • Facebook login for business,

  • WhatsApp.

To do this:

  1. Click “Add a product”.

  1. Look for the “Facebook login for Business” product and click “Configure”.

  2. The “Settings” page of the “Facebook login for business” product will open and a new section “Facebook login for business” will be displayed in the left menu.

  3. Return to the products page by clicking “Add a product”.

  4. Search for “WhatsApp” and click on “Configure”.

  1. The “Settings” page of the “WhatsApp” product will open and a new “WhatsApp” section will be displayed in the left menu.

Your products are successfully added! We will proceed to configure them. Let's start with the configuration of the “Facebook login for business” product.

Setup the Facebook Login product

  1. Click Facebook Login for Business > Settings.

  1. Activate the option “Connect with the JavaScript SDK”. This option will allow you to connect to your Facebook account from your integration on the Channels menu of dydu.

  2. Fill in the field “domains authorized for the Javascript SDK”: fill in the field with the main URL of your “Channels” menu.

For example, connect to the Channels menu of the BMS dydu if the full Url is “https://sso.channels.dydu.ai/?ticket=ST-1475-7riKAzdDpiYrbRGbmhLImJ-cDd8-cas-prod-sso#/configurations". Keep only"https://sso.channels.dydu.ai/” for the field Authorized domains for the Javascript SDK.

  1. Click the “Save Changes” button.

Setup the WhatsApp product

  1. Click WhatsApp > Start

Before adding the bot's final phone number and requesting a permanent access token for it, let's start by validating the configuration with a test number provided by META and a temporary access token. To do this:

  1. In the "Send and receive messages" section click on the "To" drop-down list

  2. Click on "Manage phone number list"

  3. A modal opens, click on "Add a phone number"

  4. Fill in the number to add (pay attention to the prefix)

  5. Click on "Next"

  6. The added number will receive a code. It will be necessary to copy this code and thus validate the addition of the number.

Let's go to the step Creating and configuring a Meta-type integration from the "Channels" menu of the BMS dydu

Creation and configuration of a Meta type integration from the “Channels” menu of the BMS dydu

To do this we will need:

  • the identifier of your META application and the corresponding key,

  • the identifier of the bot's telephone number and its access token.

These 3 pieces of information are specific to your Meta application and are available on your Meta for Developers portal.

Where to find the identifier of your META application and the corresponding key:

  1. In the Meta for Developers portal, on your app, click Settings > General in the left menu.

  2. Copy and keep your app ID.

  3. Click the “View” button to view your application key. You will be prompted to enter your password to view the key.

  4. Copy and keep your application key.

Where to find the bot phone number ID and temporary access token:

  1. In the Meta for developers portal, on your application, click WhatsApp > Start in the left menu.

  2. On the main page, look for “Temporary access token”.

  3. Copy and keep this token.

  1. Still on the main page, look for “Send and receive messages”, under your phone number you will find “phone number ID”, copy and keep this value.

With this information, connect to your BMS dydu and open the Channels menu of your bot.

If you already have a Meta type integration? Go directly to step 9.

  1. Click “Create” to create a new integration.

  2. Select the Meta platform.

  1. Give a name to this integration and click on “Create”.

  2. You arrive on the “Information” page allowing you to choose the language and space that will be queried for your bot on WhatsApp.

  3. Click on the “Next” button

  4. A modal opens: enter the identifier of your application as well as the secret key of the Meta application.

This information was previously retrieved from your Meta for Developers portal. You skipped this step and don't know how to retrieve the app id and secret key? It's explained here!

  1. Once the information has been provided, click on “Save”

  2. You arrive on the “Connection” page, the second and last step in configuring your Meta integration.

  3. On the left, you find the available connections. Click Create next to WhatsApp, to connect your dydu bot to your WhatsApp account.

  4. A new tab will open asking you to continue as “your account” Click on continue as “your account”

  1. Select the WhatsApp account to which you want to connect your dydu bot: this is the WhatsApp account from which your bot will be reachable!

  1. Check for which elements you require access authorization and click on “Save”

  2. A message confirming the association of your WhatsApp account with your Meta integration is displayed: click on the “I understand” button.

  3. You are then redirected to the configuration of your integration from the Channels menu. A “WhatsApp” modal is opened.

  1. Fill in the identifier of the telephone number and the token.

  2. This information was previously retrieved from your Meta for Developers portal. You skipped this step and don't know how to retrieve the page ID and access token? It's explained here!

  3. Click Update

  4. Your WhatsApp connection is listed!

  5. Click “Finish”

Your bot is now available on WhatsApp but is only accessible for the phone numbers you added during WhatsApp product setup from your meta for developers portal. In addition, the token generated is only valid for 24 hours following its creation (it can be updated as many times as necessary).

To make it available to all WhatsApp users and without any time limit, you must:

  • request advanced access to certain permissions and features,

  • pass app control,

  • generate a permanent token.

You can also add your bot's phone number if you don't want to use the test phone number provided by Meta. To do this, go to WhatsApp > Start and search for “Add a phone number”

As the conversations initiated by the company are chargeable, you will be asked to enter a means of payment.

Meta makes these pricing conditions available on its site, to find out more we invite you to consult the Meta site directly and the page dedicated to this purpose.

Advanced access request for necessary permissions and features

  1. Go to your Meta for developers portal

  2. Click App Control > Permissions & Features in the left menu

All permissions and features are listed on this page. Request advanced access for the following permissions:

  • whatsapp_business_management

  • whatsapp_business_messaging

A search bar is available on this page. You can use it to search for permissions to add. For each permission click on “Get Advanced Access”

Some permissions require a successful test call to Meta APIS and pass the application control put in place by Meta. We encourage you to follow the instructions and documentation provided by Meta to do so.

Once these permissions are granted, you can switch your application to “Live” mode.

Create a permanent token

Meta provides online documentation to detail the steps required to create a permanent token. You will find this documentation here.

Last updated

Tous droits réservés @ 2023 dydu.