In this post, we will discuss the process of integrating Salesforce with WhatsApp. Once integrated, any new lead added to your Salesforce account will automatically receive a notification on WhatsApp.
This automation requires a one-time setup, for which we will use Pabbly Connect.
The process involves linking Salesforce with Pabbly Connect to capture new leads and then linking Pabbly Connect with WhatsApp to send those leads a message using WhatsApp Cloup API.
Steps to Automatically Send WhatsApp Messages to New Salesforce Leads
1. Sign In / Sign Up to Pabbly Connect and Create a Workflow
2. Setup Salesforce as the Trigger App to Fetch New Leads
3. Setup WhatsApp Cloud API as the Action App to Send Messages
4. Compose a Message Template
5. Map the Necessary Fields
Step 1:- Sign In / Sign Up to Pabbly Connect and Create a Workflow
A. Sign In / Sign Up
To begin this process, visit Pabbly Connect and create your account by clicking on the ‘Sign Up Free’ button. You can also click on Sign In if you already have an account.
Click on the Pabbly Connect ‘Access Now’ button
B. Create Workflow
To create a new workflow, click the ‘Create Workflow’ button.
Name your workflow, and click on ‘Create’.
Step 2:- Setup Salesforce as the Trigger App to Fetch New Leads
We will now look at the steps through which we will establish a link between Salesforce and Pabbly Connect. This will allow us to gather newly added leads from Salesforce.
A. Trigger App
Trigger allows us to designate the application that will receive the data for Pabbly Connect. In our case, it would be Salesforce.
Choose ‘Salesforce’ as the Action App, select ‘New Lead’ as an Action Event, and click on ‘Connect’.
B. Connect Salesforce Account
To connect with your Salesforce account, select ‘Add New Connection’ and click on ‘Connect With Salesforce’.
Enter your Instance URL, and click on ‘Save & Send Test Request’.
When you click on Save & Send Test Request, the system will automatically capture the details of the most recently added lead in your Salesforce account.
Step 3:- Setup WhatsApp Cloud API as the Action App to Send Messages
Action allows us to choose the application that will get executed by the workflow trigger.
Upon capturing the leads from Salesforce, we essentially want to send them a message on WhatsApp. Therefore, WhatsApp Cloud API will be our Action App.
Note: Follow steps 1 to 3 of this blog to create a new Whatsapp Business Cloud API account in case you don’t already have one.
A. Action App
Choose ‘WhatsApp Cloud API’ as your Action App, select ‘Send Template Message’ as an Action Event, and click on ‘Connect’.
B. Connect WhatsApp Cloud API Account
To connect with your WhatsApp Cloud API account, select ‘Add New Connection’. You will be asked to enter your Permanent Token, Phone Number ID, and WhatsApp Business Account ID.
Go to your Facebook Developer dashboard, and copy the Phone Number ID and WhatsApp Business Account ID.
Paste both in their respective fields.
The Token that is visible on your dashboard is temporary and expires every 24 hours. For our workflow, we require a Permanent Token. You can generate a Permanent Access Token by following the steps given in this post.
Paste the Permanent Token, and click on ‘Save’.
Step 4:- Compose a Message Template
Upon being prompted, you will need to fill in a few fields. You have the option to select your Template Name from the existing list if you already have one prepared or alternatively, follow the outlined steps to create a new message template.
A. Create a Message Template
Switch to your WhatsApp Cloud API dashboard, and click the ‘here’ hyperlink. You will be redirected to a new page.
Click on ‘Create Message Template’.
Select a Category, Name the template, and pick a Language. Click on ‘Continue’.
B. Body with Dynamic Data Tags
Type in your message in the Body field. To customize your message, incorporate Dynamic Data Tags into the template.
Dynamic Data Tags enable us to insert placeholders in our template that will be substituted with specific data in your message. This data may include names, email addresses, dates, times, ID numbers, and more. To insert a dynamic tag into your template, simply enclose your variables within double curly braces {{variable}}.
‘Submit’ your message and ‘Confirm’.
Upon submitting your template, it may be approved instantly or sent to Facebook for a manual review, which can take anywhere from a few minutes to a few hours. Refresh your page to check if your template has been approved and is accessible, as denoted by the green color.
Step 5:- Map the Necessary Fields
After successfully linking your WhatsApp account, the next step is to map the required details from the step above. Mapping guarantees that our data remains dynamic and adjusts to reflect the responses we receive.
Select your Template Name.
Map the Recipient Mobile Number from the step above.
Remember the Dynamic Data Tags we talked about? Those tags will be substituted with the data that is contained within the Body Fields.
In Body Fields, enter or map the lead details from above. This may differ depending on the variable you choose. Click on ‘Save & Send Test Request’.
Once you click on Save & Send Request, a WhatsApp message will be dispatched to the lead’s mobile number.
Our automation is now finished. We have effectively merged Salesforce with WhatsApp. From now on, whenever a new lead is added to your Salesforce account, they will receive an automatic notification through a WhatsApp message.
You can copy this entire workflow by clicking this link.
Sign Up for a free Pabbly Connect account, and start automating your business
Subscribe to our Youtube Channel for more such automation
For any other queries, visit our forum