Whatsapp Integration - Script Response
Overview
A new WhatsApp Integration feature has been introduced in the Backend. This feature allows users to send Script Responses and supported files to WhatsApp using configured templates or file references.
Navigation
The Template option is available after creating a script and opening its Script Info section.
Steps
Navigation
Home > Scripts > Script Template
Script Template
The Script Template page contains the following sections:
Configuration
The Configuration section provides a Timezone option.
Timezone
Users can:
PDF Template
The PDF Template section allows users to create and configure PDF templates.
Add New PDF Template
Navigate to the PDF Template section. Click Add New. The Add PDF Template modal will open. Enter the required Template Title. Click Add Template.Add PDF Template Modal
The modal contains:
Script PDF Template
After creating the PDF template, the user is redirected to the Script PDF Template page.
The page contains the following sections:
Template Information
The configured Template Title is displayed at the top of the page.
Example:
Whatsapp Integration
Placeholders
The Placeholders section displays the dynamic values that can be used inside the PDF template.
Placeholder Categories
Each placeholder also displays its usage Count.
Example
[Name]
[Mobile]
[Company_Name]
[Designation]
These placeholders can be used to dynamically populate the template with the relevant script or system data.
PDF Template Editor
The PDF Template section provides the following tabs:
View
The View tab displays the configured HTML content of the PDF template.
The template can contain:
Example
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<style>
@page {
margin: 0;
}
.page-break {
page-break-after: always;
}
</style>
</head>
<body>
<!-- PDF Template Content -->
</body>
</html>
PDF Configuration
The PDF template provides additional configuration options.
BG Image URL
The user can provide a background image URL.
Recommended Image Dimension:
794px × 1123px
BG Size
Defines how the background image should fit within the PDF.
Example:
Crop
Lock Ratio
When enabled, the aspect ratio between Width and Height is maintained.
Width and Height
Defines the dimensions of the PDF template.
Example
Width : 210
Height : 297
Paper
Allows the user to select the required paper size.
Example
A4
Save
Click Save to save the PDF template configuration.
WhatsApp Response Behaviour
The WhatsApp Integration supports sending the Script Response in different formats depending on whether a template is configured.
Template Configured
If a template has been added to the script, the Script Response will be sent through WhatsApp using the configured template.
The response will be generated in the configured template format.
Template Not Configured
If no template is configured for the script, the Script Response will be sent in link format instead of using a template.
Behaviour
Template Available
↓
Send Response using Configured Template
Template Not Available
↓
Send Response as Link
File Publishing Requirement
A file will be sent to WhatsApp only after the file has been published.
If a file has not been published, it will not be sent through WhatsApp.
Flow
File Created/Uploaded
↓
Publish File
↓
File Becomes Available
↓
Send File via WhatsApp
WhatsApp Eligibility
WhatsApp delivery is supported only when the recipient's mobile number uses the Indian country code +91.
If a country code other than +91 is used, the WhatsApp message will not be sent.
Example
+91
Supported
Any country code other than +91
Not Supported
Sending Files Without a Template
Files can also be sent through WhatsApp without creating a PDF template.
If the user wants to send a file such as an image, video, JPG, PNG, or PDF directly through WhatsApp, the file must first be uploaded and published through the required module.
Steps
Navigate to the relevant Module. Upload the required file. Publish the uploaded file. Obtain the file's Unique Code. Add the Unique Code to the Script. Execute/send the Script Response. The file associated with that Unique Code will be sent through WhatsApp.File Sending Flow
Go to Module
↓
Upload File
↓
Publish File
↓
Get File Unique Code
↓
Add Unique Code to Script
↓
Execute Script
↓
WhatsApp
↓
Configured File is Sent
Important:-
The file sent through WhatsApp will be the same file associated with the Unique Code added to the script.
Supported File Formats
The following file formats are currently supported for WhatsApp file delivery:
Unsupported File Formats
GIF files are currently not supported for WhatsApp delivery.
GIF → Not Supported
Multi-File Support
Multi-file support is currently not available.
At present, the integration does not support sending multiple files together as part of the same WhatsApp response.
Change Response Format
To change the format/prefix used for the Script Response:
Navigate to Settings. Open Codes. Locate Script Response Code Prefix. Update the required prefix. Save the configuration.Navigation
Settings
↓
Codes
↓
Script Response Code Prefix
↓
Update Prefix
↓
Save
The updated prefix will be used for the Script Response accordingly.
WhatsApp Integration Flow
Create Script
↓
Open Script Info
↓
Select Template
↓
Script Template
↓
Configure PDF Template (Optional)
↓
Save Template
↓
Generate Script Response
↓
Check Template Configuration
↓
┌──────────────────────────────┐
│ Template Configured? │
└──────────────┬───────────────┘
│
┌──────┴──────┐
│ │
Yes No
│ │
↓ ↓
Configured Link Format
Template Response
│ │
└──────┬──────┘
↓
Check WhatsApp Eligibility
↓
Country Code must be +91
↓
Send via WhatsApp