1. Feature Overview
The Chatbot message-sending API enables you to send and receive WhatsApp messages without the cost of hosting your own servers. If you’re using Chatbot API, this article will help you integrate with LeadSquared to avail WhatsApp messaging functionality right within the platform.
2. Prerequisites
If you’re not familiar with LeadSquared’s WhatsApp integration, see WhatsApp Business Messaging Connector. For frequently asked questions, see WhatsApp Business FAQs.
- Get an approved WhatsApp Business Number and Account.
- To enable the Chatbot API integration on your account, contact your account manager, or write to support@chatbot.team
- Submit Message Templates for Approval. To know how to do this, refer to Add WhatsApp Templates to LeadSquared.
3. Installation
For installation, refer to WhatsApp Business Messaging Connector.
4. Configuration
Once the connector is installed, add and configure your WhatsApp phone numbers to the connector.
4.1 Basic Details
Field
Description
WhatsApp Business Number
Select the country code, and provide your WhatsApp business number. This field is mandatory.
To get your WhatsApp business number, contact Chatbot Team representative or support team.
Account Name
Provide a relevant name for your connector. This field is mandatory.
Allow Lead Generation on incoming message
Enable to allow automatic lead creation when you receive messages from unknown mobile numbers.
Lead Source
From the dropdown, select a lead source for your leads.
Once you’re done, click Next.
4.2 Service Provider
From the available options, select Chatbot.team and click Next.
4.3 Authentication Set-up
On this screen, enter –
Send Message URL – The chatbot team will provide this URL for message sending.
- Message URL Example – https://{subdomain}.chatbot.team/webhook/v1/waintegration/ls/send-message
Get Media URL – If you’re a WhatsApp Cloud user, please leave this field empty. However, if you’re using a third-party service provider, then provide the URL where your service provider store media files sent by leads. This URL allows LeadSquared to access media files sent by your leads, enabling you to access these files directly from your LeadSquared account. To obtain this URL, reach out to your service provider’s account representative.
- Media URL Example – https://{subdomain}.chatbot.team/webhook/v1/waintegration/ls/media/{{mediaId}}
Permanent Access token – Enter the alphanumeric key in the text box.
- Use the key generated by the Chatbot.team for message
- Permanent Access token will be different for each subdomain.
Notifications Webhook URL – Configure this webhook in your chatbot team account to get alerted when you receive a message or when a message’s status has changed.
4.4 Advanced Settings
On this screen, provide the following details –
- Activity Mapping – A LeadSquared activity field to capture your WhatsApp messages. This is the activity that will be posted every time a WhatsApp message is sent or received.
- Default WhatsApp Number Fields – The number you set as the default phone number will be automatically selected when you’re sending a WhatsApp message to a lead. You can also select other numbers that are available from the Add Another Number dropdown.
- Default Country Code – The default country code will be used to send messages to a phone number that’s stored in a custom field, if no country code is listed.
- Enable Rich Media Template Support – If you want to include media files in your WhatsApp message, you must enable the slider.
- Show URL Preview in Custom Messages – Enable the slider to allow for URL previews in non-templatized WhatsApp messages.
- Compliance Type – Here, you can select the compliance type for the WhatsApp template, by choosing either WhatsApp Opt-out or Opt-in.
- WhatsApp Opt-out – Your leads can opt-in or out of receiving WhatsApp messages on the basis of this field. From the dropdown, select a LeadSquared lead field for the WhatsApp opt-in/opt-out functionality.
- Blacklist Incoming Messages – If required, you can enable this option to blacklist incoming messages from specific numbers. This is useful when you want to block numbers that send inappropriate messages to your users. Once enabled, enter the phone numbers in the text box available on the right side of your screen. You can add phone numbers with 7-12 digits (excluding the country code). This option is available only when the Allow Lead Generation on incoming messages setting is enabled.
Note: You must create a custom lead field of boolean type to map to the WhatsApp opt-out functionality. For example, you may create a custom lead field called “WhatsApp Opt Out”. Leads for whom the field is selected/checked won’t receive WhatsApp messages.
Click Save & Close when you’re done.
- If your credentials are correct, you’ll see the success message highlighted below.
- If they were incorrect, the integration will fail.
5. Sync Templates
You can sync your existing WhatsApp templates directly with LeadSquared from your WhatsApp Business accounts. This reduces the time and effort needed for copying and pasting template data. To sync existing templates –
- In your LeadSquared account, navigate to Apps>Apps Marketplace, and search for the WhatsApp Business Connector.
- Then, navigate to Apps>WhatsApp Templates, and from the Account dropdown, select the Chatbot team account for which you want to sync templates.
- On the top-right side, click the Sync Account button that’s available. This will sync the existing templates in your Chatbot team account with your LeadSquared account.
Note:
- We use the template name as a unique key. If a template already exists in LeadSquared’s WhatsApp templates, it won’t be synchronized from the business account. If you wish to sync such templates, kindly delete them first from your LeadSquared account, and then proceed with the synchronization. Please note that you will need to define the mail merge fields, media files, and URLs again after deletion.
- Newly synced templates will have the icon under Action. This means the templates need to be reviewed by you before you Save them. This is to ensure the template fields are mapped to the correct LeadSquared fields. Once this is done, you can begin using this template to send WhatsApp messages to your leads.