- Shiv Shankar
- 3 Comments.
- Salesforce
Introduction
Salesforce is the most widely used CRM globally, and WhatsApp is the most commonly used messaging app globally. The benefits of connecting Salesforce and WhatsApp will undoubtedly be increased. Combining Salesforce with WhatsApp improves customer satisfaction, brand loyalty, and company standing.
Customer service is one of the most important factors in boosting a product or service’s sales and marketing. By offering valuable assistance to customers both before and after their purchase, you establish a strategic approach that fosters customer loyalty and drives business growth.The WhatsApp messaging service is used by over 2 billion users across more than 180 countries. WhatsApp Business allows companies to interact with consumers of the messaging service.
Let's look at how Salesforce can be used with this:-
Utilize your Facebook login information to access
https://developers.facebook.com
After logging in, create an app by going to My Apps on the home page.
Click the next button after selecting the “Business App” type. It will then direct us to the detail area, where we must provide all the required information.
Note: We do not need a confirmed business account to log in to WhatsApp Cloud API.
Once the login procedure is complete, we will be taken to the Meta Dashboard, as shown below:-
When we click on it, it will take us to the WhatsApp business platform API, where we can create or add an existing business account.
After this step, we will be taken to the app dashboard, where all our business information will be listed.
Compared to other APIs, WhatsApp cloud API provides a temporary access token that expires after 23 hours. It is also possible to generate a permanent access token, which will require a slew of new steps.
Select Phone Number: The API now provides a test number to free users. This is simply the Sender’s phone number. We can also use our own or a personalized number, but we must have a premium account. Find out more about pricing.
TO: The recipient’s number is represented by this number.
Note: Only five members are currently permitted, and each must be verified before being added to the list. We can also add more numbers.
After we enter the number, Meta will send us a Facebook confirmation code for the number we entered. This indicates that our phone number has been verified.
After entering all these details, press the “Send Message” button. The test number will be sent us a hello world template message, which will be displayed on the app dashboard.
This template is available by default once the account has been set up.
We can also design our own template.
Proceed by selecting “Create Template”. This action will redirect us to the following page, where we must provide the necessary details for the template type before clicking on “Continue”.
After that, we’ll be redirected to a page where we will need a header, body, and footer, and the ability to insert buttons.
The Meta Team is now reviewing it, and will be made available for use. We have completed the basic configuration of WhatsApp for integration with Salesforce.
Let’s look at this functionality in Salesforce-
For integration, WhatsApp Cloud API makes use of Meta’s Graph API. The message endpoint URL is
https://graph.facebook.com/v14.0/ {PhoneNumberId}/messages
PhoneNumberId is simply the test phone number ID generated during app setup.
To enable all callouts, add https://graph.facebook.com to the remote site settings.
Apex Class: WhatsAppIntegration.cls
Let us now create a Lightning web component from which we will interact and send messages.
LWC: SendMessageUsingWhatsApp.html
LWC: SendMessageUsingWhatsApp.js
LWC:SendMessageUsingWhatsApp.meta-xml
Now, create an Action Button on any Object and add a Lightning Web component.
Now, add that button to the Page Layout.
Now type the number and message that we want to send.
Congratulations! With the successful integration of Salesforce and WhatsApp, you can now send messages to your clients. This achievement opens up new avenues for communication and engagement with your customer base.
Neha
15/11/2022Great blog. Elaborated and articulated very well. It was helpful for me in integrating Whatsapp with Salesforce.
Rupal Chaudhary
12/12/2022Very Informative!
ziper
25/04/2023great blog, very informative.