Set up a WhatsApp Channel
This topic describes how to set up a WhatsApp channel on Yeastar P-Series Cloud Edition, so that agents in your business can receive and reply to WhatsApp messages from customers on their Linkus UC Clients.
Requirements
Platform | Requirement |
---|---|
Yeastar PBX |
|
|
Limitations
Learn about the limitations of WhatsApp messaging channel.
Item | Description |
---|---|
Message type | Supports text messages and multimedia messages, where the
multimedia message types are determined by WhatsApp. For more
information, see WhatsApp supported media
types. Important: When sending multimedia messages (such as images), WhatsApp
downloads the file from a link provided by the PBX.
Therefore, if you have set
Allowed
Country/Region IP Access Protection rule, make
sure that you have allowed the IP access from the country
where the WhatsApp server is located, otherwise the file
transmission would fail. |
Messaging mechanism | Supports to receive and reply to Inbound messages, but agents can NOT initiate a messaging session with a WhatsApp user. |
Message sending rate | Supports to send up to 80 messages per second. |
File size | Supports to send a file with a maximum size of 100 MB. |
File retention period | Files can be retained for 24 hours. |
Session auto closure |
A session that has been inactive for more than 24 hours will be closed automatically. |
Procedure
Video Tutorial
Step 1. Create a Meta app on 'Meta for Developers' portal
- Log in to 'Meta for Developers' portal, then go to My Apps from the top menu.
- Create an app of the Business type.Note: In the Business Account field, select your Business Account to connect the app with your business, as apps that need advanced access for permissions must be connected to a verified business entity.
- In the Add products to your app page, scroll down to find
WhatsApp and click Set
up.
You are redirected to the Quickstart page of the WhatsApp product.
- On the left navigation bar, go to API Setup page of the
WhatsApp product, and complete the followings:
- To use your own WhatsApp phone number for messaging, click the From drop-down list in the Select phone numbers section, and click Add phone number to add your phone number for messaging.
- In the From drop-down list, select the desired
phone number, then note down the number and the corresponding
Phone number ID as you will need to add them
on the PBX later.
In this example, select the default test number provided by WhatsApp.
- If you use the test number provided by WhatsApp, you need to specify the recipients' phone number in the To drop-down list, otherwise message sending may fail.
- On the left navigation bar, go to App secret of the app, as you will need it later on PBX. , note down the
Step 2. Create an admin system user on 'Meta Business Suite' portal
- At the top-left corner of the 'Meta for Developers' portal, go
to .
You are redirected to the Business settings page of 'Meta Business Suite' portal.
- Go to
- Click Add to create a system user with Admin role.
- Select the created user, click Add assets and grant the full control permission of the app to the created user.
, create a system user and grant app permission to the
user. - Go to , add the created user to your WhatsApp Business account and grant the user full control permission.
- Go back to
whatsapp_business_messaging
andwhatsapp_business_management
permissions enabled.Note: By default, the token expires after 60 days. You can set it to Never if you don't want the token to expire.A window pops up to show the generated access token.Important: Make sure that you have copied and properly saved the access token before closing the pop-up window, as it is only displayed ONCE.
, generate an access token with the
Step 3. Create and configure a WhatsApp channel on PBX
- Log in to PBX web portal, go to .
- Click Add, and select WhatsApp.
- In the Authentication tab, enter the authentication
information of WhatsApp.
- Name: Enter a name to help you identify the channel.
- Webhook URL: Note down the Webhook URL, as you will need it later on WhatsApp.
- Verify Token: Note down the verify token, as you will need it later on WhatsApp.
- Access Token: Paste the Access Token obtained from 'Meta Business Suite' portal.
- App Secret: Paste the App Secret obtained from 'Meta for Developers' portal.
- In the Messaging Settings tab, configure the
channel.
- Phone Number: Enter the WhatsApp phone number in E.164 format
(
[+][country code][phone number]
). For example,+15550193510
. - Phone Number ID: Paste the phone number ID.
- Destination for Inbound
Messaging: Specify the destination of
inbound messages from the number.
Option Description Extension If selected, choose an extension from the Extension drop-down list. Only the extension user can receive inbound messages from the number.
Message Queue If selected, choose a queue from the Message Queue drop-down list. All the agents in the selected message queue can receive inbound message(s) of new sessions in the queue. However, only the user who picks up a session will be able to receive and respond to the follow-up inbound messages in the session.
- Phone Number: Enter the WhatsApp phone number in E.164 format
(
- Click Save.
Step 4. Configure webhook in the Meta app
- Log in to 'Meta for Developers' portal, then go to My Apps from the top menu.
- Click the created app to enter the details page.
- Go to
- Paste the Webhook URL and verify token obtained from the PBX.
- Subscribe to messages webhook field.
to configure the messaging webhook and subscribe to webhook
field, so that PBX can get notified upon receiving WhatsApp messages.
Result
- The Status of the WhatsApp channel shows , which indicates that you have successfully created a WhatsApp channel.
- PBX automatically tracks and records the number of messages sent and
received on the channel, where the Total column
displays the total amount of the sent messages, including both successfully
sent messages and failed ones.Tip: You can filter the statistics by a time period using the time filter.
What to do next
Send text messages to the phone number and see if the specified agent can receive messages on his or her Linkus UC Client.