Summary
Having trouble sending WhatsApp messages from Zoho CRM? This guide helps resolve common API configuration errors, including incorrect endpoint setup, token issues, and script problems. Follow these steps to get your integration working smoothly.
Instructions
Common Issues and Solutions
1. Incorrect API Endpoint or Token
Symptoms: Messages fail to send, and authentication errors appear.
How to fix:
In Zoho CRM, go to Settings → Marketplace → Installed Apps → Wati Plugin.
Update these fields:
API Endpoint URL: Get this from your Wati account's API Docs section
Bearer Token: Copy from Wati's API Settings
Click Save.
:::info Learn how to find these details in our guide on How to find your API Endpoint and Bearer Token in Wati.
:::
2. Workflow Function Configuration Errors
For Single-Parameter Templates:
```deluge
headerValue = Map(); headerValue.put("Authorization","Bearer your_token_here"); // Replace with actual token
raw_data = { "template_name": template_name, "broadcast_name": "zoho_auto_" + template_name, "parameters": [{"name":"name", "value": name}] // Single parameter }; // Format phone number (remove spaces/special chars) number = number.replaceAll("[\s+()-]",""); resp = invokeurl [ url: "https://your-endpoint.wati.io/api/v1/sendTemplateMessage/91" + number + "?SourceType=ZOHO", // Update country code type: POST, parameters: raw_data.toText(), headers: headerValue, content-type: "application/json" ]; info resp; ```
For Multiple Parameters:
```deluge
parameters: [ {"name":"name", "value": name}, {"name":"phone", "value": phone}, // Additional parameters {"name":"address", "value": address} ] ```
Key fixes:
Replace
####{{your-bearer-token}}
and####{{your-wati-api-endpoint}}
with actual valuesUpdate country code in URL (replace
91
if needed)Ensure proper comma separation between parameters
To learn more about the functions and parameters, please click on this help article.
3. Incorrect Field Mapping
Symptoms: Messages sent but contain wrong data.
Check:
Verify all fields in your script match Zoho CRM field names exactly
For contacts/leads:
Phone fields must include country code
Custom fields need exact API names
Frequently Asked Questions (FAQs)
General Questions
1. What is the purpose of this guide?
→ This guide helps you troubleshoot and fix common issues when sending WhatsApp messages from Zoho CRM using the Wati integration.
2. What are the most common issues with Zoho CRM and Wati integration?
→ The most common issues are:
Incorrect API Endpoint or Token configuration
Errors in Workflow Function configuration
Incorrect Field Mapping in Zoho CRM
API Configuration
3. How do I fix an incorrect API Endpoint or Token in Zoho CRM?
→ Go to Zoho CRM → Settings → Marketplace → Installed Apps → Wati Plugin.Update the API Endpoint URL and Bearer Token with values from your Wati account. Click Save.
4. Where can I find my API Endpoint and Bearer Token in Wati?
→ You can find these details in your Wati account:
API Endpoint URL: Available in the API Docs section
Bearer Token: Available in API Settings
Refer to the guide "How to find your API Endpoint and Bearer Token in Wati" for step-by-step instructions.
Workflow Function Configuration
5. What should I check if my Workflow Function is not working?
→ Ensure that:
The Authorization header includes your correct Bearer Token
The API URL includes the correct Endpoint and country code
Phone numbers are properly formatted (no spaces or special characters)
Parameters are correctly structured, especially for multiple parameters
6. How do I format phone numbers correctly in the script?
→ Use the following line in your script to remove spaces and special characters:number = number.replaceAll("[\\s+()-]","");
Also, ensure the country code (like 91 for India) is correctly included in the API URL.
7. How do I send multiple parameters in the Workflow Function?
→ Use the following structure:
parameters: [ {"name":"name", "value": name}, {"name":"phone", "value": phone}, {"name":"address", "value": address} ]
Ensure commas separate each parameter properly.
Field Mapping
8. What should I do if messages are sent but show incorrect data?
→ Verify that:
Field names in your script exactly match the field names in Zoho CRM
Phone fields include the correct country code
Custom fields use their exact API names from Zoho CRM
9. Where can I learn more about configuring functions and parameters?
→ You can find detailed instructions in the help article linked in the guide for understanding functions, parameters, and field mappings.