How to deploy Haptik's bot on Whatsapp?
- Getting Started
- Bot Building
- Smart Agent Chat
- Conversation Design
-
Developer Guides
Code Step Integration Static Step Integration Shopify Integration SETU Integration Exotel Integration CIBIL integration Freshdesk KMS Integration PayU Integration Zendesk Guide Integration Twilio Integration Razorpay Integration LeadSquared Integration USU(Unymira) Integration Helo(VivaConnect) Integration Salesforce KMS Integration Stripe Integration PayPal Integration CleverTap Integration Fynd Integration HubSpot Integration Magento Integration WooCommerce Integration Microsoft Dynamics 365 Integration
- Deployment
- External Agent Tool Setup
- Analytics & Reporting
- Notifications
- Commerce Plus
- Troubleshooting Guides
- Release Notes
Table of Contents
Prerequisites for WhatsApp IntegrationTypes of WhatsApp ConversationsSetting up Whatsapp accountDeploying the Whatsapp botConnecting through Platform DeploymentsWhatsApp helps more than 1.5 billion people connect and share with the people they care about. WhatsApp is a simple, secure, and reliable way for businesses to reach their customers all over the world.
The WhatsApp Business API Client supports a subset of the features provided by the WhatsApp applications you already know from Android, iOS, Web, and other platforms including end-to-end encryption. The difference is that this application can be deployed on a server, providing a local API that allows you to programmatically send and receive messages and integrate this workflow with your own systems (CRMs, customer care, etc.).
If you would like us to consider your business for inclusion in the limited public preview of the WhatsApp Business API, please visit here.
If you use anything other than the official WhatsApp Business API or other official WhatsApp tools, Whatsapp reserves the right to limit or remove your access from WhatsApp as this violates their policies.
Prerequisites for WhatsApp Integration
- A Facebook Business Manager account
- A verified business
- A WhatsApp Business Account
- A-Line of Credit for your WhatsApp Business Account — You can refer to About WhatsApp Business API Billing for more information about the billing process as well.
- A command-line tool such as a terminal or an app like Postman can perform cURL requests.
After verifying your business, your business will be reviewed for compliance with the WhatsApp Terms of Service and WhatsApp Commerce Policy. This step is initiated automatically. You can check the status of business verification and a business review in the Settings tab of your WhatsApp business account in Business Manager. Business verification will show as Verified and Account Status will show as Approved upon approvals.
Types of WhatsApp Conversations
There are two types of conversations that are possible on WhatsApp.
- A regular user-initiated conversation where the user sends a message to the WhatsApp bot and the bot replies back to the user. The bot is allowed to reply back to the user within a 24-hour window from the last message sent by the user.
- A conversational flow is bot-initiated conversations. In this type whenever a transactional event occurs for eg: a user bought a movie ticket, a bill has been generated, etc. a pre-approved template message can be sent out.
WhatsApp Bot Conversations
On WhatsApp, users can get their queries resolved with the help of AI-powered conversational journeys. The conversational journeys are present for users 24 * 7 and help the user resolve their queries within minutes.
To build the conversational flows, read here.
Highly Structured Message (HSM)
WhatsApp message templates and media message templates are specific message formats that businesses use to send out notifications or customer care messages to people that have opted into notifications.
Messages can include appointment reminders, shipping information, issue resolution, and payment updates. These are the preferred methods of reaching customers.
Other types of messages such as text and media, must be sent within a 24-hour window of a message received from a customer.
WhatsApp Business API provides the following features:
- Industry Information - People can now easily identify your business by its category or industry and find out more information (i.e., hours of operation, website, location, description).
- Send and Receive - Enable two-way high-value conversations with customers.
- Message Templates - Create message formats that are needed for sending notifications to users.
Templates are also known as HSMs. HSM stands for Highly Structured Message. An HSM template will have placeholders in it which can be filled with dynamic user-specific values. Here’s a sample HSM:
Hi {{1}}! Thanks for starting your personal training plan. We’ll send you a {{2}} update with your new schedule. You can log-in online using your training ID {{3}}. Stay fit!
After filling in user-specific data the HSM will be sent out as:
Hi Joey! Thanks for starting your personal training plan. We’ll send you a weekly update with your new schedule. You can log-in online using your training ID 123456. Stay fit!
To know more about HSMs, read here.
Setup WhatsApp Business Account
Once you decide which type of conversation is well suited for your business need, you can now proceed to set up the WhatsApp Business Account which is the first step for businesses to communicate with customers on WhatsApp.
Create the WhatsApp Business Account and set up a line of credit.
This business account will allow people to easily identify your business and find out more information such as your address, hours of operation, website, and description.
Through your account, in the Facebook Business Manager, you will have the ability to create message templates for sending notifications to customers at scale. There are certain types of notifications, that are Allowed on Whatsapp and some are Not-allowed on Whatsapp.
We have covered the detailed setting up process, here.
Share your WhatsApp Bot
If you want to share the WhatsApp bot link on the website (or marketing content) wherein the user clicks on it, and it directly opens the WhatsApp conversation with the bot on their device - On the website, you can add a link with your WhatsApp number (e.g. 1XXXXXXXXXX) and the default text as a query parameter (e.g. I'm interested in your car sale) as follows:
https://wa.me/1XXXXXXXXXX?text=I'm%20interested%20in%20your%20car%20for%20sale
Clicking on it will redirect the user to the WhatsApp chat window for your number.
Add the entire number i.e. including the country code. For example, in the case of an Indian number, the link will be similar to https://wa.me/918899xxxxxx?text=Hi
You can read more about sharing WhatsApp links, here.
Setting up Whatsapp account
Before we start WhatsApp integration we need to get the business and phone number approved. The steps involved are:
Step 1: Apply for access: Whatsapp Business APIs are only available to approved businesses. Businesses can apply for approval by filling a questionnaire and submit to us and we will get the business approval as a WhatsApp partner.
Step 2: Procure a number: After getting approval, the next step is to connect a number. The number should be a fresh number with no prior WhatsApp account associated with it. The number can be a mobile number, landline number, or even an IVR number. The only restriction is that it should also be capable of either receiving an SMS or a Call for OTP verification.
Because of end-to-end encryption requirements, WhatsApp requires that business API of any enterprise business to be hosted as a separate service. Whatsapp provides a set of Docker images with the business API setup which will be setup end to end by Haptik. Production level setup with HA, alerting, etc. will be done.
Post setup of the WhatsApp system, the number will be verified using a certificate from Facebook Business manager & Two Factor Authentication Pin. The number will be registered on the WhatsApp system by Haptik. (Number needs to be online to receive OTP)
There are rate limits on a WhatsApp standalone setup. It is around 20 messages/sec. So if you have a high volume you might have to setup a multi-connect cluster to handle the load.
Why do we need a setup?
A WhatsApp business account lets your business use the WhatsApp Business API to communicate directly with your customers.
Step 1: Create a Facebook Business Manager
In order to create a WhatsApp Account, the brand must already have a Facebook Business Manager set-up.
Facebook Business Manager is free to use. To start, first make sure that you have a personal (to the organization) Facebook account to confirm your identity.
Next, sign up for Business Manager:
- Go to business.facebook.com
- Click Create Account
- Enter a name for your business, select the primary page and enter your name and work email address
If you don't yet have a Page for your business, click here to know how to create a new page.
Move through the rest of the onboarding flow by entering the rest of the required fields.
Step 2: Verify Facebook Business Manager
You need to complete business verification to send a message from the WhatsApp Business Account
To start the verification process:
- Go to Security Center, and click Start Verification in the Business Verification section
- Enter your business details and click Next
- Verify the Legal Business Name and upload official documents that may be required
- Verify the Business Address or Phone Number by uploading a document that shows both the legal name of your business and the mailing address or phone number shown on the screen
Upload an official document that matches the business’s legal name you entered. Any discrepancy in the document name will lead to rejection The verification button may be greyed out prior to starting the onboarding process. Share the BM Id with team Haptik and we will enable the option. Read here to know more about the verification process.
Step 3: Share Verified Facebook Business Manager ID with Haptik
Haptik will require the 15 or 16 digits numeric Facebook Business Manager ID in order to create a WhatsApp Account.
To find your Facebook Business Manager ID -
- Go to Business Settings
- Click Business Info
- Below Business Manager Info, you'll see your ID number
Step 4: Haptik will create the WhatsApp Business Account
Haptik can now create your WhatsApp Business Account using your Legal Business Name and Facebook Business Manager ID.
Step 5: Business needs to approve the request for Haptik
Once the WhatsApp account is created, you will have to accept the Invitation from Jio Haptik to send messages on your behalf on the business. Please follow the steps to approve the request:
- Go to business.facebook.com
- Click on Business Settings
- Now select Requests
- You will see a pending request
- Click on Approve
Once you approve the request, your WhatsApp account is set-up. The account will not be approved if your Business Manager is not verified.
Once the setup is complete, we will now see how to deploy the using Haptik Platform.
Deploying the Whatsapp bot
You can use the Platform Settings
section of the Conversation Studio tool to deploy your bot on Whatsapp. You can read more about the section here.
Connecting through Platform Deployments
After the bot is built you can connect it to the Whatsapp number through the Platform Deployments section of the Conversation Studio tool. Navigate to Platform Deployments through Business manager, as shown -
As a registered account, Haptik will raise a WhatsApp container and provide all the credentials required to complete the setup.
After saving the credentials the bot should work on the connected WhatsApp number.
Platform Deployments settings should be provided in the Production environment.