Connecting WhatsApp Business with CDESK

This guide will walk you through the process of connecting the WhatsApp Business service with CDESK. Thanks to this integration, you will be able to create requests and communicate with customers via WhatsApp directly through the CDESK Portal.

For more information on using WhatsApp with CDESK, read the article WhatsApp manual.

To connect WhatsApp Business with CDESK, you will need:
  • Facebook Business Portfolio – A business account in Meta Business Manager that will own the WhatsApp developer application and a phone number.
  • Meta Developer Account – An account on Meta for Developers, needed to create a developer app for WhatsApp and get access credentials.
  • WhatsApp Developer Application – An application created in the developer account that serves as a connector between CDESK and the WhatsApp Business API.
  • Phone Number – A phone number that is not currently used in any WhatsApp application (personal or business version).

 

Creating a Business Portfolio (Facebook Business Account)

Go to business.facebook.com and log in with your regular Facebook account. If you don’t already have a business portfolio, the system will prompt you to create one. Fill out the initial form and click Submit.

Figure: Creating a Business Portfolio

After successful login or account creation, the Meta Business Suite environment will open, where you can manage business assets such as pages, accounts, WhatsApp numbers, and more.

Figure: Meta Business Suite

Next, confirm your email address. Then go to Settings > Business portfolio info and fill in the basic details about your company.

Figure: Filling in company details

Creating a Meta Developer Account

Go to developers.facebook.com and log in to your Meta Developer Account. If you don’t have a developer account yet, the system will guide you through the registration form.

Figure: Creating a new Meta Developer Account
Figure: Phone number verification
Figure: Email verification
Figure: Selecting the account role (we recommend Developer)

Creating a Developer Application

After successfully logging into your Meta Developer Account, you need to create your own developer application that will serve as a connector between CDESK and the WhatsApp Business API service.

Go to the Apps page and click Create App.

Figure: Create App button in the list of apps in the developer account

A form will appear where you enter the name of the application and a contact email for notifications from Meta.

Figure: Details of the new app

For the use case, select Other and click Next. This step will redirect you to an older interface for app creation, which is compatible with WhatsApp API.

Figure: Selecting the app use case

In the next step, select Business as the application type.

Figure: Selecting the application type

Enter the app name again, add the contact email, and assign the app to the created business portfolio. Then click Create App. Meta will prompt you to enter your Facebook account password.

Figure: Creating the developer application

After creating the app, add the WhatsApp product to the app by clicking Set Up. If you don’t see this screen or have already left it, you can return by clicking Add Product.

Figure: Adding the WhatsApp product to the created application

Configuring WhatsApp API in the Developer App

After creating the developer app, the next step is to set up the WhatsApp API for your app. This process involves connecting your own phone number, which will serve as your official WhatsApp Business account.

Right after creating the app, you will see the introductory screen. If the correct business portfolio is set, click Continue.

Figure: App introductory screen

In the Quickstart tab, click on Start Using API, which will redirect you to the API Setup tab.

Figure: Start Using the API button

In this tab, add your own phone number. Meta automatically assigns a test number, which you can use to test the connection, but for production use, you must add your own number. To add it, click Add Phone Number.

Figure: Add Phone Number button

Fill out the form to add the phone number, thereby creating a WhatsApp Business account. The name and description will be displayed to customers when communicating via WhatsApp.

Figure: Form for adding a phone number
Figure: Entering the phone number
Figure: Verifying the phone number using a code

After verifying the phone number, you will be redirected to your Business Portfolio (business.facebook.com) to create a system user, which will ensure a permanent Access token.

Creating a Permanent Access Token Using a System User

In your Business Portfolio (business.facebook.com), go to System Users and click +Add. This will open a form to create a new System User. Assign a name and role. The Employee role is sufficient. After filling it out, click Create System User.

Figure: Creating a new System User

After creating the system user, you need to assign permissions to the created developer app and WhatsApp Business account.

For the created system user, click the three dots and the Assign Assets button. A form for assigning permissions will appear. In the Apps tab, select your created developer app and assign all permissions: Full control > Manage app.

Figure: Assigning permissions to the developer app

Then go to the WhatsApp accounts tab and select the WhatsApp Business account with your phone number (the one you created at the end of the previous section). Assign all permissions: Full control > Manage WhatsApp business accounts. Then click Assign Assets to apply the permissions.

Figure: Assigning permissions to a WA Business account

Next, proceed to create an Access token using this system user. Click Generate Token. A form for generating the Access token will appear. In the first step, select your developer app.

Figure: Selecting the developer app for generating the Access token

Set the token expiration to Never.

Figure: Setting the token expiration

In the next step, add the following permissions:

  • whatsapp_business_management
  • whatsapp_business_messaging
Figure: Adding Whatsapp permissions

In the final step, a permanent Access token will be generated. Before closing the window, copy and save this token. After closing the window, you will not be able to view this token again and will need to regenerate it.

Figure: Generated permanent token

Preparation for Production Use

Business Verification

For production use of the WhatsApp Business API, it is essential that your business is verified. For verification, you will need an official document confirming the existence of your business, such as a bank account confirmation or a business registry extract. The details in this document must match the details entered in the Business Portfolio. For more information on supported documents, visit Meta’s page.

Open your Business Portfolio (business.facebook.com) and go to Settings -> Business Portfolio Info. In the Business Verification Status section, click on View Details.

Figure: Entering the Business Portfolio

Then click the Start Verification button and fill out the verification form step by step.

Figure: Starting the verification process

After successful verification, the status Verified is displayed in the Business Verification section.

Figure: Successfully verified company
Setting Up Payment Methods

To use WhatsApp Business API, it is necessary to set up a payment method. Without a valid payment method, you cannot fully utilize the production features of WhatsApp API. However, this process is not associated with immediate costs. Regular communication is free. Fees may apply for automated messages, templates, notifications, or communication after 24 hours from the last message. For more information on WhatsApp API pricing, visit Meta’s page.

Open your Business Portfolio (business.facebook.com) and click on Billing & Payments in the menu.

 

Figure: Opening Billing & Payments in the Business Portfolio

Go to the Accounts > WhatsApp Business Accounts tab and, under the WhatsApp Business account that includes your added phone number, click Add Payment Method.

Figure: Adding a payment method

A form for adding a payment method will open. After filling it out, the payment method will be set up.

Figure: One of the steps in the form for adding a payment method

Connecting WhatsApp API with CDESK

The connection with WhatsApp API is set up in the CDESK Portal under CDESK > Global settings > Omnichannel > Chats. First, activate the module using the toggle switch. All the necessary details for the connection can be found in the developer app settings (developers.facebook.com).

In the app editor, go to the WhatsApp -> API Setup tab and copy the data according to the following table or image.

Fields in CDESK Field in WhatsApp Developer App Settings in Meta Developers
WhatsApp company account ID WhatsApp Business Account ID (API Setup tab)
API Token (Access Token) Insert the permanent token created using the System User (described above)
Webhook URL URL address entered in the Configuration -> Callback URL tab
Webhook Token The token entered in the Configuration -> Verify Token tab
Company phone number ID Phone Number ID (API Setup tab)
Company phone number Your added phone number (API Setup tab)
Second company phone number ID Fill in only if you have a second phone number set up
Second company phone number Fill in only if you have a second phone number set up
Figure: Settings in the API Setup tab

Then go to the Configuration tab, where:

  • In the Callback URL field, enter the address from the Webhook URL field in CDESK.
  • In the Verify Token field, enter the token from the Webhook Token field in CDESK.
Figure: Settings in the Configuration tab

After entering the Callback URL and Verify Token, a list of Webhook Fields will appear. Check the messages item. This event is required to receive messages from WhatsApp to CDESK.

Figure: Activating the messages webhook event

After activating the module and completing the necessary settings, go to the Chat Processing tab, where you can select the default company for creating requests. Save the settings by clicking Save.

Figure: Selecting the default company

You can then go to CDESK -> Omnichannel -> Chats and start using the Chats module with WhatsApp. You can find the user manual in the article WhatsApp manual.

Figure: Activated Chats module

Customizing the WhatsApp Business Account

To customize your account, go to WhatsApp Accounts in Meta Business Suite (business.facebook.com).

Select the WhatsApp Business account associated with your phone number, click the three dots, and select WhatsApp Manager. A new tab will open with the WhatsApp Manager environment. Here, you can adjust all parameters related to your WhatsApp Business account – such as message templates, company information, and more.

Figure: Entering WhatsApp Manager

One of the important steps is setting up the appearance of the account as customers will see it during communication. Go to the Phone Numbers tab, select your phone number, and go to the Profile tab. You can edit, for example, the profile photo, name, website, email, company address, etc. This information will be displayed to customers when communicating via WhatsApp and helps create a trustworthy and professional profile.

Figure: Editing details in the Profile tab

Adding a WhatsApp link to Your Website

To allow customers to contact you via WhatsApp directly from your website, you can use a simple link in this format:

https://api.whatsapp.com/send?phone=421917123456

421917123456 is the telephone number in international format without the “+” sign and spaces. The phone number must be the same as the one you added to your WhatsApp Business account.

When customers click this link, WhatsApp (mobile app or web) will open, where they can start a conversation with your number.