WhatsApp Integration
Establishing communication via social media platforms like WhatsApp is essential in handling customer requirements and it also helps answer basic inquiries, build the engagement activities easily.
Now Kommunicate allows to integrate with WhatsApp business account and handle the queries via Kommunicate chatbot and with the help of human agents.
Whatsapp Integration with 360Dialog
360dialog is a verified WhatsApp Solution Provider and has been given the right by Facebook/WhatsApp to grant their clients access to the WhatsApp Business API.360Dialog is used to integrate WhatsApp. We call it direct WhatsApp. It is the easiest process. We have partnered with 360Dialog to make the process smooth.
Go to the integrations page to start the process.
If you are in the Start plan or still in the trial period then you can click on “request the access”. Choose the number of messages you are expecting monthly and hit Request WhatsApp Access button visible in the screenshot. A request will be forwarded to us for the WhatsApp integration. One of our team members will help you to understand the process.
If you are in a higher plan: Fill the form here directly to start the process.
To Get Started: Make sure you have Facebook Business Manager account ID. Fill the form here to create your 360Dialog account.
After submitting the form. It will ask you to connect your Facebook Business Account.
Follow the Steps:
You can also check the video to understand the process.
Once it has been approved. Please share the following details with us on support@kommunicate.io or start a chat with us:
API - In your 360Dialog account, go to WhatsApp account. Once all of the steps from the process are successfully completed, you can generate an API Key. When the phone number has the status "DONE" the "Generate API Key" button will be enabled. If you click on the button, you can generate an API Key which will be displayed in the browser.
Namespace - In your 360Dialog account, go to WhatsApp account section and click on Show details In the Details tab scroll down to WhatsApp Business account section to find Namespace
Phone number - Enter the WhatsApp number that you’ve used with your 360Dialog account
Kommunicate App Id - You can find it in the install section, click here.
Once we confirm that it is been integrated.
Voila! You are all set. Now Kommunicate is successfully integrated with WhatsApp account, try sending messages to the number linked to the account and these messages will be sent to Kommunicate chat as well, if the chatbot is already integrated, the bot will start replying to the queries on your WhatsApp chat.
Whatsapp Integration with Twilio
Twilio is used for WhatsApp integration, and the Twilio signup process must be completed before starting the integration with Kommunicate.
Instructions to set up Twilio account and WhatsApp number
Sign up to Twilio
Please have the following information handy to start the process.
- Facebook Business Manager account ID
- You will need your Twilio Account SID
Request access to enable Twilio numbers for WhatsApp.
- To do the integration on Kommunicate one need to have the WhatsApp number that is provided by Twilio, In order to get the number of WhatsApp, and fill out Twilio's "Request Access" form with accurate and up-to-date information, including the Facebook Business Manager ID.
- Please refer to Twilio’s documentation for more details
Submit a WhatsApp Sender request in the Twilio console
- Once you fill the Request Access form and submit it, you will receive the pre-approval email from Twilio. Check out this reference link for the next steps.
Allow Twilio to send a message on your behalf in the Facebook Business Manager console.
Submit Facebook Business Manager account for Business Verification
Twilio completes WhatsApp Sender registration from thier end
Once all of the above steps have been completed, the WhatsApp number can be retrieved to be added in Kommunicate. integration section, WhatsApp enabled number can be found in WhatsApp enabled senders section of the Twilio console, refer to the following screenshot for more details.
The instructions below will guide you through adding all of the necessary details to the Kommunicate dashboard and Twilio account.
- Copy Account SID, Auth Token from Twilio console, and WhatsApp Enabled Number from WhatsApp enabled senders section and add it in Kommunicate integration section.
- Integrate with Kommunicate as shown below
- Once integration on Kommunicate is finished, visit WhatsApp enabled senders section on Twilio and click on Edit Sender.
- Now add the webhook URL and select the HTTP POST. Also, add a URL in the status callback URL textbox and Save/Update WhatsApp sender. URL
Now Kommunicate is successfully integrated with WhatsApp account, try sending messages to the number linked to the account and these messages will be sent to Kommunicate chat as well, if the chatbot is already integrated, the bot will start replying to the queries on your WhatsApp chat.
Conversation on Kommunicate dashboard will be displayed in this format
Rich message buttons in WhatsApp
WhatsApp lets you add buttons to message templates. There are two types of buttons Quick Replies and Call to Action buttons.
Quick replies let businesses define buttons that users can tap to respond. When a Quick reply is tapped, a message containing the button text is sent in the conversation.
Call to action (CTA) buttons trigger a phone call or open a website when tapped.
To use buttons, you need to submit them as part of a message template to WhatsApp. Once approved, templates containing buttons can be sent by sending the message text in your API request.
Create Templates with Buttons
To implement the buttons, Navigate to the Twilio console, go to Programmable Messaging > Senders > WhatsApp Templates and click the New message template button. Here, a template containing the buttons must be submitted.
Send buttons as part of WhatsApp messages once the template with buttons has been approved. Send a message containing the template's body to send a button. The buttons are appended to the message automatically.
Limitations
Only certain media files are allowed to be sent or received. See more info here
If more than 24 hours have passed since the last user message, only template messages will be allowed.
Rich message response from bot is not supported by WhatsApp, so they will not be received by the end-user.
No more than three buttons with titles of 20 characters or less, and no duplicate button titles.
Send Template Message using API
Before, we can send a message, we need to have a Group ID. If you already have a group Id or conversation created, you can skip this step and move to send message API.
We can create a Group ID using API. Follow the steps to create the group:
POST: https://services.kommunicate.io/rest/ws/group/v2/conversation
Headers:
api-key: API_KEY_FROM_INSTALL_SECTION'
of-user-id: PASS_SUPER_ADMIN_EMAIL_HERE'
header 'Content-Type: application/json'
Body:
{
"groupName": "Conversation",
"platform": "whatsapp",
"source": "WHATSAPPDIALOG360",
"senderId": "SENDER_NUMBER",
"receiverId": "+919234408745"
}
You can find your api-key here
This is how it will look:
Headers:
Body:
72435896 is the Group Id here.
How to send a Template Message using API:
**1. Create the Template Object - **
Create a template object with name, language, and components as mentioned in WhatsApp template API page.
{
"template": {
"name": "account_update_whatsapp",
"language": {
"code": "en_US",
"policy": "deterministic"
},
"components": [
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "your-text-string"
},
{
"type": "text",
"text": "your-text-string"
}
]
},
{
"type": "header",
"parameters": [
{
"type": "text",
"text": "your-text-string"
}
]
}
]
}
}
As per the above object, "account_update_whatsapp" is the pre-approved template name. In components there are two parameters and one parameter is in Header. This is how a template looks in Dialog360:
**2. Convert it into String - **
After creating object, convert it to string using JSON to String Online Converter. Add the string in the “WHATSAPP_TEMPLATE” of send message API call and add your WhatsApp groupId.
For example:
POST: https://services.kommunicate.io/rest/ws/message/send
BODY:
{
"type": 5,
"contentType": 0,
"message": "TEMPLATE MESSAGE",
"groupId": "72435896",
"metadata": {
"skipBot": true,
"WHATSAPP_TEMPLATE": "{\n \"template\": {\n \"name\": \"sample_issue_resolution\",\n \"language\": {\n \"code\": \"en_US\",\n \"policy\": \"deterministic\"\n },\n \"components\": [\n {\n \"type\": \"body\",\n \"parameters\": [\n {\n \"type\": \"text\",\n \"text\": \"Name - test\"\n }\n ]\n }\n ]\n }\n}"
},
"source": 1
}
This is how it will look:
We can check the same on the Kommunicate dashboard, it will show as Template Message and user has received the message as well.