Whatsapp icon integrated with an authentication API, showcased on a green square.

Channel | WhatsApp Business

With more than 2 billion people using WhatsApp around the world to send 60 billion messages every day, the chat app has revolutionized the way we communicate. With an enterprise-grade API, companies can now send notifications and provide customer service through WhatsApp in a secure, reliable, and customer-friendly way.

WhatsApp Business API | Integration for Salesforce

logo salesforce ct2x 2

New

Get to know how you can integrate tyntec’s WhatsApp Business API with Salesforce.

Introduction

This article explains how to do the following:

 

    • Connect your Salesforce Organisation with WhatsApp Business via tyntec’s Conversations Inbox

 

    • Show contact info inside for existing contacts directly inside the Conversations Inbox

 

    • Link to the contact info in Salesforce from the Conversations Inbox

 

    • Push closed conversations to Salesforce and archive them with the existing contact info

 

This tutorial enables you to connect your company’s Salesforce Organisation with tyntec’s Conversations Inbox + WhatsApp. Making it possible to show existing contact information directly available while conversing with a customer on WhatsApp.

 

tyntec’s Conversations Inbox enables you to talk to your Salesforce Contacts. For this to work, you’ll need to have an active WhatsApp Business Account (WABA) with tyntec.

This tutorial enables you to use your existing Salesforce contact information and connect it with contacts who reach you via WhatsApp on the Conversations Inbox. You’ll be able to see instantly the first name, last name, the email address, a customer status, or whatever information you already have about a contact in your Salesforce environment.

From a conversation in your Conversations Inbox you’ll be able to open the corresponding contact link in Salesforce, making it easy to find the right contact while staying in the conversation.

After a conversation with your user has ended, just close the conversation in the Conversations Inbox and push the whole conversation to Salesforce. Making a conversation history available directly connected to your contact in Salesforce.

Prerequisites

To get started with this tutorial you’ll need to:

 

    • Use Salesforce as your CRM system (Enterprise version, or above)

 

    • Have an active WhatsApp Business Account (WABA) with tyntec

 

    • Have administrator rights within your Salesforce environment

 

    • Access to tyntec’s Conversations Inbox

 

 

Salesforce Setup

1. Install the package

tyntec’s Conversations Inbox Integration has been designed as a package, which can be installed into your Salesforce org.

If you use custom domains within Salesforce, you may need to replace the domain in front of the URL with your custom domain.

Install for Live Environments

Install for Sandboxed Environments

 

To make sure that all users have access to messages and page layouts, install the package for “All Users”.

salesforce_integration_whatsapp_setup_01

Tick the checkbox “Yes, grant access to these third party websites” to authorize access for the Conversations Inbox endpoint, then select “Continue“.

salesforce_integration_whatsapp_setup_02

After the package is installed click “Done” to close the dialog.

salesforce_integration_whatsapp_setup_02_1

2. Configure the Package

In Salesforce open the “App Launcher” and use the search bar to search “Eazy Token Infos“.

salesforce_integration_whatsapp_setup_02_2

Open the “Eazy Token Infos” to launch the app.

salesforce_integration_whatsapp_setup_03

Select the “New” button on the right. 

salesforce_integration_whatsapp_setup_04

Add the following details.

1. Eazy Token Info Name: Eazy Setting Info
2. Access Token: paste in the token you received

Then “Save” it. 

salesforce_integration_whatsapp_setup_05

If you haven’t already created a domain, you will need to do so.
From Setup search for the word Sites
Click the site hyperlink to open the below page:

salesforce_integration_whatsapp_setup_06

Enter the domain name after the http://
Click the check Availability button
Tick the checkbox “I have read and accepted the Salesforce Site Terms of Use” and then click the button “Register My Salesforce Site Domain”

Then confirm your action by clicking “OK”.

salesforce_integration_whatsapp_setup_07_2

In the Site section click the “New” button

salesforce_integration_whatsapp_setup_08

Complete the fields as follows:

Site Label:

your chosen name for the site

Site Name:

will auto populate from the Site Label on tab

Site Contact:

the system administrator

Default Web Address:

add rest in the free text area, this entire URL will be your endpoint, you will need this later. i.e https://leanne-developer-edition.eu8.force.com/rest

Active checkbox:

check

Active Site Home Page:

SiteLogin (case sensitive)

Leave all other fields as default
Then click “Save“.

salesforce_integration_whatsapp_setup_09

Click on “Public Access Settings“.

salesforce_integration_whatsapp_setup_10

Open the “Apex Class Access“.

salesforce_integration_whatsapp_setup_11

Click Edit and add the Tyntec_Purus_MessageWebservice class from the left panel into the right panel and click save.

salesforce_integration_whatsapp_setup_12

How it Works on tyntec’s Side

You request access to the WhatsApp Business API and setup your WhatsApp Business Account (WABA) with tyntec. With a simple process from request access to account activation.

 

You will need to request a bearer token for your WABA

 

In Order to receive the required information into your org, you will need to contact the dev team at Eazy Dashboard, and ask them to set up the following JSON payloads for your WABA

Add the following into the remarks section of the Contact

  • Email
  • Product
  • Source
  • Company

 

This will enable you to gather that detail into your salesforce Org. the resulting JSON which is sent will look like this:

{
	"contact":{
	"firstName":"Paul",
	"jid":"44788888888@whatsapp.eazy.im",
	"lastName":null,
	"notes":[
],
	"phoneNumber":44788888888,
	"remarks":
	"Email paul@company.com\n
	Product Whatsapp\n
	Company CompanyName\n
	Source Growth Campaign"
	}
}

You will also need them to create a new request for closing a conversation, and the new request will look like this:

{"jid": "31612345678@whatsapp.eazy.im","status":"closed","timestamp":1575317219}

This tells the integration to close off that particular conversation.

The last step will be to give them your endpoint, that you created earlier in the set up process.

Receiving Messages

Once the installation is complete any new messages will be stored in an Object related to either the Contact or Lead, single conversations will be stored in one message record until closed, then a new record will be opened for each conversation.