Skip to content

WhatsApp Business Cloud

With WhatsApp Business Cloud modules in Ibexa Connect, you can:

  • watch events, send a message, and template messages

  • upload and download media

  • enable two-step verification, register, verify, and deregister senders

  • retrieve and update business profiles

Caution

Please note that this app will allow you to send messages from your WhatsApp Business number and NOT from your personal WhatsApp number which you use to communicate with friends and family.

To get started with WhatsApp Business Cloud, you need:

A Facebook Developer account

A valid mobile phone number.

Note

Before you begin, understand the following information about the phone numbers:

  • The phone number should not be registered with your personal WhatsApp account which you use to communicate with your friends and family. If already registered, delete the existing account on your mobile to register with WhatsApp Business Cloud.

  • You cannot use the same phone number parallelly on both on-premise and Cloud API at the same time. Only one platform is supported at a time with the phone number. See overview and phone numbers.

  • Do not infringe the WhatsApp Terms and Conditions: "If you use anything other than the official WhatsApp Business Platform or other official WhatsApp tools, We reserve the right to limit or remove your access to WhatsApp as this violates our policies. Please do not use any non-WhatsApp authorized third-party tools to communicate on WhatsApp. See Unauthorized use of automated or bulk messaging on WhatsApp for more information".

To connect WhatsApp Cloud API to Ibexa Connect involves the following steps:

  1. Set Up WhatsApp Cloud API

  2. Create Permanent Access Token

  3. Connect WhatsApp Business Cloud to Ibexa Connect

Set Up WhatsApp Cloud API

To set up WhatsApp Cloud API:

  1. Log in to your Facebook account.

  2. Go to Facebook Developer Site, click My Apps > Create App.

    WhatsApp_2.png

  3. Select the app type as Business. Click Next.

    WhatsApp_3.png

  4. Enter the display name and select the business account. Click Create app.

    WhatsApp_4.png

  5. When prompted, re-enter the password of your Facebook account. Click Submit.

    WhatsApp_5.png

    The app is created.

  6. On the app's Dashboard, scroll down to find the WhatsApp app, and click Set up.

    WhatsApp_7.png

  7. Select the account type, and click Continue.

    msedge_PWyw42LRgh.png

  8. Copy the WhatsApp Business Account ID to a safe place.

    msedge_pHZLN1aMKm.png

Create Permanent Access Token

To create a permanent access token for your WhatsApp Business Cloud account:

  1. Log in to your Facebook Developer Account.

  2. Click Apps Dashboard > Business Settings.

    msedge_JXUSH7yWcf.png

    Note

    If you don't see the App Dashboard menu, refresh the page.

  3. Click System Users > Add. Enter the username, select the role as Admin and click Create System User.

    msedge_GrgqJAJuKF.png

  4. Click Add Assets > Apps. Select the app you want to assign to the user, enable Full Control access, and click Save Changes.

    msedge_uhY6itESIH.png

  5. Click WhatsApp Accounts > Add People > Select the system user > Enable Full Control Access > Assign.

    msedge_IAFNToXZMR.png

  6. Click System Users > Select the user > Generate Access Token.

    msedge_E19bOnegf0.png

  7. Select the app, following permissions, and then click Generate Token.

    • whatsapp_business_messaging

    • whatsapp_business_management

    msedge_1l8P4VjL6L.png

  8. Copy the token to a safe place.

    msedge_p6UE3016iG.png

You can use this token as a permanent access token.

Add your own phone number to WhatsApp Business Cloud API

When you set up WhatsApp API, a test number is created for you. You can add your own number.

  1. Log in to your Facebook developer account.

  2. On the Getting Started page, click Add phone number.

    msedge_JFQHgJjcc8.png

  3. Enter your business profile details and click Next.

    msedge_lPxzxNEZOW.png

  4. Enter the business phone number that you want to connect to WhatsApp Business API.

    Note

    Ensure that the phone number is not registered with WhatsApp before. If already registered, delete your WhatsApp account with the number before registering here

  5. Enter the verification code received on your phone number.

    msedge_2HKEzKZdsj.png

  6. Enter your business details and click Save.

You have successfully added your own business phone number to WhatsApp Business Cloud API.

msedge_gTxzNx9Pgd.png

Connect WhatsApp Business Cloud to Ibexa Connect

To connect WhatsApp Business Cloud with Ibexa Connect you need to obtain the Permanent Token and WhatsApp Business Account ID values from your WhatsApp Business Cloud account.

  1. In your Facebook developer account:

  2. Log in to your Ibexa Connect account, and add a module from the WhatsApp Business Cloud app into a Ibexa Connect scenario.

  3. Click Add next to the Connection field.

    msedge_iyb1o4JJkO.gif

  4. In the Connection name field, enter a name for the connection.

  5. In the Permanent Token field, enter the token created prior to the connection.

    You can also use a temporary token which is only valid for 24 hours and available on the getting started screen.

    msedge_pONcIWbVuu.png

    Note

    Ibexa Connect recommends using the temporary token for testing purposes as it is valid only for 24 hours and you will lose your data once the token expires.

  6. In the WhatsApp Business Account ID field, enter the ID from your Facebook Developer account > WhatsApp > Getting Started section screen, and click Save.

    msedge_O2hHvvkCkn.png

You have successfully connected the WhatsApp Business Cloud app and can now build scenarios.

Message

You can watch events, and send messages using the following modules.

Watch Events

Triggers when a new message is received.

Webhook name

Enter a name for the webhook.

Verify Token

Enter the Temporary Access Token from the WhatsApp Getting Started section or the permanent token.

Ensure that you use the same token for creating connections and webhooks.

msedge_kSuXhq19pI.png

Events

Select or map the events which you do not wish to watch.

See Setting up WhatsApp Business Cloud webhooks to add webhooks to your account.

Send a Message

Sends a message.

Note

You can send a message using this module if you satisfy the below conditions:

  • Your business number phone number must be first approved by WhatsApp before you use it for sending messages.

  • You can only initiate new chats via Send a Template module. Only after sending a templated message to a specific customer and receiving a response from the customer, you can use this Send a Message module to send a non-templated message to the customer.

  • If a customer contacts you first, then you can reply to the customer with this Send a Message module for the next 24 hours.

Sender ID

Select or map the Sender ID from which you want to send the message.

Receiver

Enter the receiver's WhatsApp ID or phone number.

If you are using a testing number:

  • You must register the recipient's number in the Facebook Developer console.

  • Enter the receiver's phone number without any prefixes such as +, spaces, (), and _ . For example, if the receiver phone number is +1-212-345-6789, then you must enter it as 12123456789.

If you are using your own phone number, the receiver field accepts both WhatsApp ID and a phone number in any dilable format with country code. However, Ibexa Connect recommends explicitly prefixing the country code with a plus sign (+). Some of the examples of supported phone number formats are:

  • +1-212-345-6789

  • +1 (212) 345-6789

  • +1 212 345 6789

  • +1 (212) 345 6789

Message Type

Select the message type. For example, image.

Based on the selection, dynamic fields auto-populate, and you need to enter the details to send the message. For more details on these dynamic fields, see WhatsApp Business Cloud Messages API documentation.

For any errors, while sending the messages, see Troubleshooting.

Send a Template Message

Sends a template message.

Note

Your business phone number must be first approved by WhatsApp before you use it for sending messages.

Sender ID

Select or map the Sender ID from which you want to send the template message.

Receiver

Enter the receiver's WhatsApp ID or phone number in any dialable format.

If you are using a testing number:

  • You must register the recipient's number in the Facebook Developer console.

  • Enter the receiver's phone number without any prefixes such as +, spaces, (), and _ . For example, if the receiver phone number is +1-212-345-6789, then you must enter it as 12123456789.

If you are using your own phone number, the receiver field accepts both WhatsApp ID and a phone number in any dilable format with country code. However, Ibexa Connect recommends explicitly prefixing the country code with a plus sign (+). Some of the examples of supported phone number formats are:

  • +1-212-345-6789

  • +1 (212) 345-6789

  • +1 212 345 6789

  • +1 (212) 345 6789

Message Template

Select or map the message template you want to send.

Media

You can upload and download media using the following modules.

Upload a Media

Uploads a media and retrieves its ID.

Sender ID

Select or map the ID of a sender whose media you want to upload.

File

Enter the file details:

File name

Enter the filename including the file extension. For example, invoice.xls.

Data

Enter the path to the file stored in your local directory. For example, "@/local/path/file.jpg".

For more information on supported media types, see the WhatsApp Business Cloud documentation.

Download a Media

Downloads a media by its ID.

Media ID Enter the Media ID you want to download.

Phone Number

You can enable two-step verification, register, verify, and deregister senders using the following modules.

Enable Two-Step Verification

Activates the two-step verification for a sender number by its ID and a 6-digit pin.

Sender ID Select or map a Sender ID whose two-step verification you want to enable.
PIN Enter (map) a 6-digit pin you wish to use for two-step authentication. To disable or reset two-step verification, see the WhatsApp Business Cloud documentation.

Register a Sender

Registers a sender by its ID and a 6-digit pin.

Sender ID Select or map a Sender ID whom you want to register.
PIN Enter (map) a 6-digit pin you wish to use for registration. To disable or reset two-step verification, see the WhatsApp Business Cloud documentation.

Verify a Sender

Verifies a sender by its ID.

Sender ID

Select or map a Sender ID whom you want to verify.

Action

Select the action you want to perform to verify the sender:

  • Request a Code

  • Verify a Code

By

Select a method for receiving the code:

  • SMS

  • Voice

Code

Enter (map) the code received to complete the verification.

Deregister a Sender

Deregisters a sender by its ID.

Sender ID Select or map a Sender ID of a sender to deregister.

Business Profile

You can retrieve and update business profiles using the following modules.

Get a Business Profile

Retrieves the details of the WhatsApp business profile by the sender ID.

Sender ID Select or map the Sender ID whose business profile you want to retrieve.

Update a Business Profile

Updates a WhatsApp business profile by the sender ID.

Sender ID

Select or map the Sender ID whose business profile you want to update.

Address

Enter the address of the business.

Description

Enter the business details.

Vertical

Select or map the industry of the business. For example, finance.

Email

Enter the contact email address of the business.

Websites

Add the business website URL address.

For example, a website, Facebook Page, or Instagram. You must include the http:// or https:// portion of the URL.

File

Enter (map) the file details:

Profile Picture File Name

Enter the file name of the profile picture.

Profile Picture Data

Enter the path to the file stored in your local directory. For example, "@/local/path/file.jpg".

Setting up WhatsApp Business Cloud webhooks

  1. Log in to your Ibexa Connect account.

    Open the Watch Events module, enter a name for the webhook, click Save, and copy the URL address to your clipboard. Click OK and Save the trigger.

    WhatsApp_9.gif

  2. Go to App Dashboard, click Webhooks > Subscribe to this object to enable the webhooks.

  3. When prompted enter the Callback URL copied in step 1 and the Verify token.

    The verify token is the Temporary access token or permanent access token but it has to be same in the Ibexa Connect and WhatsApp account.

    For more information on webhooks, see the WhatsApp Business Cloud documentation.

Add Recipient's Phone Number

If you are using a testing number to send messages you must add the recipients to your WhatsApp account in the Facebook Developer account. You can add a maximum of five recipients' numbers that are enabled with WhatsApp.

To add the recipient's phone number:

  1. Log in to your Facebook Developer account.

  2. On the left menu, click WhatsApp > To > Manage phone number list.

    msedge_nzLFyZ9wpy.png

  3. Add the phone number and click Next.

    msedge_RSV63wdPiT.png

  4. Enter the verification code received on your WhatsApp and click Next.

    oHpY6zTG8A.png

The recipient's number is successfully added to the list.

msedge_tIPy3ODLSg.png

Troubleshooting

Some of the errors that you might encounter when using WhatsApp Business Cloud.

WhatsApp API - Error 500 code 13100

The user gets an error 500 from the module and the DevTool > Response Body shows error code 131000.

msedge_rE37iWpMU2.png

Note

You can only initiate new chats via Send a Template module. Only after sending a templated message to a specific customer and receiving a response from the customer, you can use this Send a Message module to send a non-templated message to the customer.

If you’re using a testing number, you must first register up to five authorized recipient numbers in WhatsApp Manager before sending messages to them. See Add Recipient's Phone Number.