WhatsApp's Click to Chat feature allows you to begin a chat with someone without having their phone number saved in your phone's address book.
As long as you know this person’s phone number, you can create a link that will allow you to start a chat with them.
By clicking the button, a chat with the person automatically opens.
Click to WhatsApp Chat works on both your phone and WhatsApp Web.
1. Go to Setup -> Contacts -> Button and links
2. Click on New Button and Links button
3. Enter below required details:
Label: Click to WhatsApp Chat
Name: Click_to_WhatsApp_Chat
Display Type: Detail Page Button
Behavior: Display in New Window
Content Source: URL
4. Use below URL in the text area:
https://api.whatsapp.com/send?phone={!Contact.Phone}&text={!JSENCODE("Hi "& Contact.Name &", Hope you are doing good. I want to connect with you regarding our new product.")}
5. Add this new button to the contacts page layout.
Now go to any contact which has correct phone number populated and click on Click to WhatsApp Chat button.
Note:
Use https://api.whatsapp.com/send?phone=whatsappphonenumber/&text=urlencodedtext where whatsappphonenumber is a full phone number in international format and URL-encodedtext is the URL-encoded pre-filled message.
Remove any zeroes, brackets or dashes when adding the phone number in international format. For a detailed explanation on international numbers, read this article.
You can use this functionality to any Salesforce standard and custom objects.
Read More: WhatsApp on Salesforce Integration in 5 Steps
Which Salesforce API Do I Use in Integration?
When To Use Salesforce REST API
When To Use Salesforce SOAP API
When To Use Salesforce Bulk API
Latest Salesforce Interview Questions and Answers:
As long as you know this person’s phone number, you can create a link that will allow you to start a chat with them.
By clicking the button, a chat with the person automatically opens.
Click to WhatsApp Chat works on both your phone and WhatsApp Web.
1. Go to Setup -> Contacts -> Button and links
2. Click on New Button and Links button
3. Enter below required details:
Label: Click to WhatsApp Chat
Name: Click_to_WhatsApp_Chat
Display Type: Detail Page Button
Behavior: Display in New Window
Content Source: URL
4. Use below URL in the text area:
https://api.whatsapp.com/send?phone={!Contact.Phone}&text={!JSENCODE("Hi "& Contact.Name &", Hope you are doing good. I want to connect with you regarding our new product.")}
5. Add this new button to the contacts page layout.
Now go to any contact which has correct phone number populated and click on Click to WhatsApp Chat button.
Note:
Use https://api.whatsapp.com/send?phone=whatsappphonenumber/&text=urlencodedtext where whatsappphonenumber is a full phone number in international format and URL-encodedtext is the URL-encoded pre-filled message.
Remove any zeroes, brackets or dashes when adding the phone number in international format. For a detailed explanation on international numbers, read this article.
You can use this functionality to any Salesforce standard and custom objects.
Subscribe blog for More updates !!!
Read More: WhatsApp on Salesforce Integration in 5 Steps
Which Salesforce API Do I Use in Integration?
When To Use Salesforce REST API
When To Use Salesforce SOAP API
When To Use Salesforce Bulk API
Latest Salesforce Interview Questions and Answers:
You have written a very effective blog for readers, thank you so much to share this useful information. If you want best Trucking Insurance in US then you should visit our website.
ReplyDeleteGreat post friend, Thank a lot to share this. You are doing good job. Keep posting.
Salesforce Consulting India
I just want to say that all the information you have given here is awesome...great and nice blog thanks sharing..Thank you very much for this one.
ReplyDeleteAnd i hope this will be useful for many people.. and i am waiting for your next post keep on updating these kinds of knowledgeable things.
Whatsapp Salesforce Integration
Thanks a lot for sharing that useful information. That was a really Intresting post and I would really like to know more.
ReplyDeletesalesforce development company
Salesforce development services
Salesforce Consultant
This comment has been removed by the author.
ReplyDeleteCan we use this code on any object like on Account, opportunity and also on custom objects.
ReplyDeleteAs long as you have Customer Name and Phone number field on any object(standard, custom), you can use this feature.
DeleteNice Post....Thank you for sharing great information...Keep going on..
ReplyDeleteSalesforce Training in Hyderabad
The best possible use makes the procedure or use justified, despite all the trouble. logo design service
ReplyDeleteYou can try ValueText App which save lots of your time - https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000EFoedUAD
ReplyDeleteIs there a way to add this to open up the app instead of the Webpage?
ReplyDeleteYou can create visualforce page and embed whatsapp URL in
DeleteWonderful blog post, thank you so much for the great information which you provided.
ReplyDeleteTop 5 features of salesforce lightning
Is there a way to do this and have salesforce log each time you chat someone?
ReplyDeleteIn the content source, user onclick javascript option and once button clicked then call one of your apex class which have salesforce log logic and after that call WhatsAPP URL.
DeleteJust do it in one step with many options like automation, bulk and single texting, powerful bots and many more https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000EFoedUAD
ReplyDeleteWhere will reply from customer stores in salesforce
ReplyDeleteHi, I used this tutorial some months ago. It worked weel so far; But recently it seems web.whatsapp change, and now the button open the page, but not launching the new chat, instead it push to install app.
ReplyDeleteHi,
ReplyDeletelink given in the above tutorial might not work now on ... i tried it today and was giving me .. page not found error...
try below endpoint url format.. it should work fine. worked well for me.
https://api.whatsapp.com/send?phone={!Contact.Phone}&text={!JSENCODE("Hi "& Contact.Name &", Hope you are doing good.You are receiving this message because you have been referenced as contact in salesforce ,")}
Thank you Sumit for above details. I have updated my Blog. :
DeleteHappy Coding.
Hi, great post! In my case i want to create cases with WA chat information. i guess i need to develop an API if i dont have WA business. regards
ReplyDeleteNice one indeed!
ReplyDeleteI was wondering, what about if your phone field was not properly populated? I mean, there are spaces and + and - characters. What would you suggest to properly format them all?
Thanks in advance!
ReplyDelete