Need to send Whatsapp Messages from Salesforce - Apex Code - triggers

I am doing a proof of concept to find a way to make callouts from Apex code to send automated Whatsapp messages/communications from Salesforce to our customers at difference points of time in Sales life cycle (ex: one at lead conversion, one when a payment is received etc).
My assumption here is to send these messages via triggers. Only thing is i am not able to figure out the correct approach to start with. I did see an example online which is using middleware apps like twilio, weboxapp to convey the messages to Whatsapp servers. Is there a way these communications could be sent directly? Any leads are appreciated!

There appears to be a fairly new integration set up between Salesforce and WhatsApp. There's a good write up in the first link below, and then documentation from Salesforce in the 2nd link. I'd start by looking through there because it might help solve your requirements much more easily. I believe that Whatsapp's APIs are private and need to be accessed through an approved partner.
https://www.wearemarketing.com/blog/salesforce-whatsapp-integration-release.html
https://help.salesforce.com/articleView?id=sf.messaging_set_up_whatsapp.htm&type=5

Related

Finishing Whatsapp Business API Setup

I came from a similar state in this question.
My objective is to reply to interested customers via whatsapp messages. I'll use a very special setup, so I'll be using the API.
Reasons:
With not to pay anyone other than container hosts
Solution with custom API
Customer doesn't like any extra costs
Just like user noboundaries, I see the numbers, but I cant get the certificate
User Navjot Singh has explained I need to create a "business api account"
I tried just that, put out all my contacts and stuff, in this site.
They did respond yes, but only with pointless instructions, since I wish not to contract any messaging providers. I had taken a look at it, but they charge a very expensive price beyond the $0.005 whatsapp will charge. Also, the solution I'm creating requires messages to be sent programatically, and the partners don't seem to provide the correct solution.
So, I wish to skip into using the api. I followed the appropriate guides:
Getting started
Phone Number
I already got some things done:
two phone numbers (one of them for testing) with whatsapp business;
company has been verified, with domain
have business management account
local environment with docker
I can access the local environment and I have set an user account and the admin acount. I can log into those via the API, since postman can ignore certificates, but in order to proceed I really feel like I need that certificate.
So to sim up I guess I need help creating the whatsapp business account for my customer. Any advice?
Also i'd appreciate any other helpful insight or feedback. I really feel lost and I don't see a place where I can talk to people trying to do the same thing, or doing this is much of a madness after all?
thanks for getting to read until here, and I apologize for my non natural, almost broken English.
Hi I wanted to start big in stackOverflow but I fell flat.
About the subject at hand, westerday I dwelt deep into the rabbit hole.
For most companies, you actually are forced to work with a provider, such as twllio or messagebird. They act as intermediary between the facebook business and the whatsapp business api.
Some of they offer messaging separated from whatsapp api setup I still need to take a look into it, but for those who are trying to set up whatsapp business api on their one, it seems as of november 2020 it's not possible.
please check out:
respond.io's guide
blog post from take.net PT-BR (google translate didn't like me trying to translate this to English)

How to implement Gmail Smart-Compose feature in my project using Gmail API?

I wanted to use the Gmail smart compose feature in my project. I read many documents but no documents suggest anything related to the implementation of smart compose in Gmail API.
Attaching a link below about the small information about the autocomplete feature:
SmartCompose
Answer:
Unfortunately, this is not possible to do using the Gmail API.
More information:
The Gmail API using the client libraries works on a request-response basis, and these are not retrievable through a Gmail API method. In order to do this, there would need to be a request made each time the string the user is typing changes, which would use not only require a lot of network traffic, but would also make application running slow as many requests would be made.
Feature Request:
On the flip side however, Google already knows about this, and a Feature Request for this has been made on their Issue Tracker. You can view this feature request here, to which you can click the star (☆) in the top left to let Google know more people want this feature to be implemented.
References:
Autocomplete suggestions for text-inputs
Google's Issue Tracker
An API for gmail smart-compose feature

Integrate Facebook messenger into CRM without bot?

we have built a very simple bot that simply passes any message onto our own application. (we want to answer questions asked from our customers to be handled straight from our CRM application for customer service purpose)
Now, the bot is declined with message:
Thank you for your submission. We tested the messenger experience on your associated page and received either no response from your messenger bot or received a human response. Please resubmit with the new, improved version of your bot.
Which raises the question for me: is it even allowed to do human assistance via the messenger API? Or is it bot only? I have read through all the platform policies, use case examples, etc.
So, how do I create the simplest integration? (send message straight through to one of our customer service users?)
Making a bot is easy if you use Wit.ai which is an NLP and speech API. It can integrate with the messenger/graph API. Basically, you send text to wit.ai and it returns the intent. For example: you send "get me a large pizza" to Wit and it returns something like (intent = pizza, size=large, time = now) You could also try api.ai but in my opinion, it is not as good yet.

Autofill an HTML form

What applications exist that can take a series of fields from my db (or csv output from my db) and insert them into a web-based form and then submit that form?
Big Picture Use Case:
I maintain an in-house registration management system for webinars that we produce/present. Currently we use GoToWebinar.com to host our events but they haven't always been (and may not always continue to be) our vendor.
GoToWebinars.com does not provide me an API for creating registrations for 3rd party individuals. So when someone decides to attend one of our events they have to fill out 2 registrations forms, mine and GoToWebinars.com. I'd like to automate the task of filling in GoToWebinar's registration form.
I am looking into the same thing. I found some bits and pieces here and there and was able to decipher the URL to post to GTW:
https://www.gotowebinar.com/en_US/island/webinar/registration.flow?Template=island/webinar/registration.tmpl&Form=webinarRegistrationForm&WebinarKey=XXX_YOUR_WEBINAR_ID_XXX&Name_First=ViewersFirstName&Name_Last=ViewersLastName&Email=ViewersEmailAddress
If you are using cURL, then be sure to use CURLOPT_FOLLOWLOCATION because there are some redirections on the GTW side and cURL needs to follow them.
So far this seems to work for us.
Good luck!
I'm late to the party, but let me offer a way to call the CITRIX API via PHP to register a new GotoWebinar attendee, in case somebody else hits this page looking for the answer to your question.

Questions on webhooks

Jeff Lindsay, who coined the term 'webhook', said that the difference between webhook and http callback is that webhooks are user-defined. I think I understand what he meant, but I was thinking about it and I asked myself, can webhooks be effectively used by regular users (I mean: non-developers)?
Usually people don't have a clue how the internet works, they don't know what http is, terms like URL, callback, or request-response don't say anything to them. I've heard that many people do not know the difference between a web browser and a web site, they think that internet really starts at google.com and they type in all urls in the google search box... I mean, what's the use of webhooks when you're not a developer?
Do you think services like AlertGrid make sense? It's a webhook consumer that you can configure to dispatch alerts (SMS, phone, email) either when the callback is NOT received in x amount of time, or when the received data meets user-defined condition, plus it does some data visualization. We wanted it to make webhooks usable for non-developers. But still it requires an initial integration by someone who at least knows how to configure the source to send the webhook events. In many cases it only takes pasting an url to a textbox, but it seems to be beyond the skills of a typical user.
So, are the webhook doomed to be used by software developers only, or is there a chance that millions of Facebook or Twitter users will start making use of them somehow?
I think that something implemented using Webhooks can be made very user friendly.
Suppose Stack Exchange allowed users to define a webhook that would be notified whenever you earned a badge. You could supply a custom URL, or there could be simple buttons to click that would set it up for your Facebook or Twitter account. It could be as simple as the Facebook Like button.
YES I think this is a great idea. It's actually something I designed in my head a couple months ago and didn't think the product existed.
Webhooks are extremely powerful and having a 'service bus' aggregate/manage/dispatch these callbacks is extremely compelling to me.
I think that we are a long way from the general public consuming webhooks in any sort of meaningful way but I don't see why not. I remember when RSS was a 'developer' only technology.
Thanks for the link. I'll be digging in more this weekend.