Resources
/
APIs & Integrations
/
How to integrate WhatsApp Business API with Zoho CRM?

How to integrate WhatsApp Business API with Zoho CRM?

Use case 1: Send out an automatic WhatsApp notification to a lead, as soon as the lead is created on Zoho CRM. 


Steps to follow:


1. Create a template on Interakt, which would be sent as soon as the lead is created on Zoho CRM.


Suppose you create the following template. This template has a variable/placeholder in the body wherein you would want to include the lead’s name.



2. Copy the ‘template code name’. You will find the template name in the URL of the above template page. In the above example, the template code name is welcome_lead_1. It is the portion of the URL between ‘template/’ and ‘/view’. 


3. Go to your Zoho CRM account page -> Settings -> Automation -> Workflow Rules -> Create Rule


4. Select Module as ‘Leads’ and give a name to the Rule. Then Click on ‘Next’.


 

5. Next, you need to select WHEN you want the WhatsApp notification to be sent. Since the usecase is for sending a WhatsApp notification as soon as a lead is created on Zoho CRM, you should choose ‘On a record action’ followed by ‘Create’. Then click on ‘Next’.


6. Next you need to select WHICH leads you want the rule to apply to. Since the usecase if for sending a WhatsApp Notification to any lead that gets created, you may simply choose ‘All Leads’ and click on ‘Next’.


7. Next, you need to define the Action that should be performed when the Lead is created in Zoho CRM. Since the usecase is for sending the WhatsApp notification immediately, we will choose ‘Instant Actions’ and within that, we will choose ‘Webhook’. 


8. Then select ‘New Webhook’ in the popup that opens.

9. Provide any name for the Webhook. 

10. Choose Method as ‘POST’

11. Provide the ‘URL to Notify’ as https://api.interakt.ai/v1/public/message/


12. Select ‘Authorization Type’ as ‘General’.

13. Then add a parameter under ‘Custom Parameters’. Give ‘Parameter Name’ as Authorization. Give ‘Parameter Value’ as Basic <API Key>. To get your <API Key> go to https://app.interakt.ai/settings/developer-setting and copy the Secret Key from there.


14. Choose ‘Body Type’ as ‘Raw’ and ‘Format’ as ‘JSON’.

15. In the Body, insert the following code:


{"countryCode":"+91",

"phoneNumber":"${Leads.Phone}",

"type":"Template",

"template":{

"name":"welcome_lead_1",

"languageCode":"en",

"bodyValues":[

"${Leads.First Name}"

]

}

}


  • In the “phoneNumber” field, the code will automatically pick up the value in the ‘Phone’ field of the Lead. The value in the ‘Phone’ field should exclude the country code or else the notification will fail to get sent. 


  • In the “name” field, paste the ‘template code name’ which you had copied in Step 2. 



  • In “bodyValues”, you need to enter the value of the variable/placeholder in your template body. Since your template variable is supposed to contain the name of the lead, you can map the ‘First Name’ of the Lead here. Alternatively you can select some other field from the Leads module by typing #.



16. Click on ‘Save and Associate’.

17. Then Click on ‘Save’ to save the workflow rule.

18. Ensure that the Status of the Workflow Rule is toggled to Active.



  1. Now you can test out the workflow by creating a new lead (preferably with your own Phone Number). You should receive a WhatsApp Notification as soon as you create the lead.

Code to be used for different kinds of templates:


1. Template with 1 variable/placeholder in the Template Body - described above


2. Template with >1 variables/placeholders in the Template Body

Suppose the template is the following:



Template Code Name = welcome_lead_2


Template Language Code = en


Variables: Here, there are 2 variables in the Template Body. Variable {{1}} is a placeholder for the lead name and the variable {{2}} is a placeholder for the lead’s email id. 


To send this template via Zoho CRM, you can use the following code:


{"countryCode":"+91",

"phoneNumber":"${Leads.Phone}",

"type":"Template",

"template":{

"name":"welcome_lead_2",

"languageCode":"en",

"bodyValues":[

"${Leads.First Name}",

"${Leads.Email}"

]

}

}

3. Template with >1 variables/placeholders in the Template Body and a media header

Suppose the template is the following:




Template Code Name = welcome_lead_3


Template Language Code = en


Variables: Here, there are 2 variables in the Template Body. Variable {{1}} is a placeholder for the lead name and the variable {{2}} is a placeholder for the lead’s email id. 


Header: Since there is a media header in the template, the public URL of the media would need to be provided in the code. To obtain the public URL of the media, you can use a service like Cloudinary


To send this template via Zoho CRM, you can use the following code:


{"countryCode":"+91",

"phoneNumber":"${Leads.Phone}",

"type":"Template",

"template":{

"name":"welcome_lead_3",

"languageCode":"en",

"headerValues":[

"https://res.cloudinary.com/duqzdpfxi/image/upload/v1644516035/depositphotos_52453715-stock-photo-hands-holding-word-welcome_sktye4.jpg"

],

"bodyValues":[

"${Leads.First Name}",

"${Leads.Email}"

]

}

}


4. Template with >1 variables/placeholders in the Template Body and a dynamic URL in the CTA button

Suppose the template is the following:



Template Code Name = welcome_lead_4


Template Language Code = en


Variables: Here, there are 2 variables in the Template Body. Variable {{1}} is a placeholder for the lead name and the variable {{2}} is a placeholder for the lead’s email id. 


CTA button: Since there is a dynamic URL in the CTA button, there would be a variable {{1}} in the URL. In the code for sending the template, the value of this variable needs to be sent.


To send this template via Zoho CRM, you can use the following code:


{"countryCode":"+91",

"phoneNumber":"${Leads.Phone}",

"type":"Template",

"template":{

"name":"welcome_lead_4",

"languageCode":"en",

"bodyValues":[

"${Leads.First Name}",

"${Leads.Email}"

],

"buttonValues":{

"0":[

"Account123"

]

}

}

}

How to figure out if the WhatsApp Notification was sent / delivered / read / failed:

Since you are using code (Template Send API Calls) to send the WhatsApp notification, you won’t find the ‘message status statistics’ on your Interakt dashboard. We can send you the ‘message status statistics’ in the form of ‘webhooks’ to a Webhook URL provided by you. Along with the Webhook URL you would need to send a Secret Key for the URL as well.

Get Started with Interakt Today

• Drive Sales & Customer Experience   • No Set-up Costs    No Surcharge on Notifications

Got More Questions?

Get A Live Demo
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Interakt is a leader in E-Commerce Tools on G2 Interakt is a leader in Customer Communications Management on G2
Interakt is a Jio Haptik Product
Building Intelligent Virtual Assistants for Businesses

Download

Connect with us

Find Us On
Interakt is a Jio Haptik Product
Building Intelligent Virtual Assistants for Businesses
interakt.shop is a Haptik product.
Haptik is a WhatsApp Business Solution Provider

India | Singapore | Malaysia | UAE | Philippines | Africa

Copyright © Jio Haptik Technologies Limited 2022 | All rights reserved