Thumbnail
WhatsApp Business API | Integration for Salesforce
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 Chat Messaging Dashboard
  • Show contact info inside for existing contacts directly inside the Chat Messaging Dashboard
  • Link to the contact info in Salesforce from the Chat Messaging Dashboard 
  • 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 Chat Messaging Dashboard + WhatsApp. Making it possible to show existing contact information directly available while conversing with a customer on WhatsApp. 

tyntec's Chat Messaging Dashboard 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 Chat Messaging Dashboard. 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 Chat Messaging Dashboard 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 Chat Messaging Dashboard 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 Chat Messaging Dashboard
  • The Eazy Token for the Chat Massaging Dashboard (request it here)

Salesforce Setup

1. Install the package

tyntec's Chat Messaging Dashboard 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 Chat Messaging Dashboard 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.