Overview
The WhatsApp Bot integrates with Meta’s WhatsApp Business API to enable automated and manual customer communication. It supports template messages, conversation management, and AI-powered responses.Template Messages
Send pre-approved templates for notifications
Conversation Inbox
Manage customer conversations in one place
AI Assistant
Automated responses for common inquiries
Request Integration
Link conversations to service requests
How It Works
Template Messages
WhatsApp templates are pre-approved message formats used for business-initiated conversations.Available Templates
nueva_solicitud_de_servicio
nueva_solicitud_de_servicio
Notifies vendors of new service request assignments.Parameters:
- Request ID
- Service type
- Customer name
- Contact phone
- Address
- Requested delivery date
solicitud_recibida_cliente
solicitud_recibida_cliente
Confirms receipt of customer’s service request.Parameters:
- Customer name
- Request ID
- Service type
- Requested date
- Contact email
ptar_formulario_enviado
ptar_formulario_enviado
Sends PTAR technical questionnaire link to customer.Parameters:
- Customer name
- Form URL
- Vendor name
- Vendor phone
solicitud_aprobada_operaciones
solicitud_aprobada_operaciones
Notifies vendor that operations approved a service request.Parameters:
- Vendor name
- Request ID
- Approved delivery date
reasignacion_removida
reasignacion_removida
Alerts vendor that a request was reassigned to someone else.Parameters:
- Vendor first name
- Request ID
- Service type
Sending a Template
Conversation Management
Viewing Conversations
All WhatsApp conversations are centralized in the inbox:Conversation List
Conversation List
GET /api/whatsapp/conversations?status=active&limit=50
- Customer name and phone
- Last message preview
- Unread count
- Assigned agent
- Linked service request (if any)
Conversation Detail
Conversation Detail
GET /api/whatsapp/conversations/:conversationId
- Full message history
- Customer information
- Conversation metadata
- Assignment status
Conversation Statuses
Active
Active
Ongoing conversations requiring attention or follow-up.
Archived
Archived
Resolved but kept for reference. Can be reopened if customer replies.
Closed
Closed
Completed and no longer active. Not reopened automatically.
Sending Messages
Manual Reply
Respond to customer messages from the conversation view:API call
Direct Message
Start a new conversation:WhatsApp’s 24-hour window applies: You can only send free-form messages within 24 hours of the customer’s last message. After that, use templates.
Assignment and Routing
Assign Conversation
Route conversations to specific agents:Link to Service Request
Connect a conversation to an existing service request:- Viewing conversation from request page
- Automatic context in AI responses
- Better tracking of customer interactions
Webhook Configuration
The WhatsApp webhook receives events from Meta:Verification (GET)
Incoming Events (POST)
- Creates or updates conversation
- Saves the message
- Triggers AI response (if enabled)
- Sends notifications to assigned agents
AI-Powered Responses
The bot can use GPT-4 to generate contextual responses:How It Works
How It Works
- Customer sends message
- System retrieves conversation history
- GPT-4 analyzes message and context
- Generates appropriate response
- Response is sent to customer
- Human agent can review and override
Context Sources
Context Sources
- Previous conversation messages
- Linked service request details
- Customer information from database
- Company knowledge base (if configured)
Message Types
WhatsApp supports various message formats:Text Messages
Text Messages
Plain text communication. Most common type.
Images
Images
Send or receive photos (e.g., service site images).
Documents
Documents
Share PDFs or other files (e.g., quotations).
Interactive Buttons
Interactive Buttons
Location
Location
Customer can share their location for service delivery.
Read Receipts
Mark conversations as read:- Updates unread count
- Clears notification badge
- Tracks agent response time
Best Practices
Respond Quickly
Respond Quickly
Aim to reply within 1 hour during business hours. Customers expect fast responses on WhatsApp.
Use Templates Wisely
Use Templates Wisely
Templates are for business-initiated messages. Use plain messages for ongoing conversations within 24 hours.
Link to Requests
Link to Requests
Always link conversations to service requests for better tracking and context.
Assign Strategically
Assign Strategically
Route conversations to agents familiar with the customer or service type.
Review AI Responses
Review AI Responses
Check AI-generated messages periodically to ensure quality and accuracy.
Template Approval Process
To create new templates:Design Template
Create template in Meta Business Manager with:
- Template name
- Category (marketing, utility, authentication)
- Message content with variables
- Optional header, footer, buttons
Troubleshooting
Template Rejected
Template Rejected
Common reasons:
- Contains variable in greeting (not allowed in opening)
- Uses promotional language in utility template
- Formatting issues or special characters
Message Not Delivered
Message Not Delivered
Check:
- Phone number format (+502xxxxxxxx)
- WhatsApp Business Account status
- Customer blocked the number
- 24-hour window expired (use template)
Webhook Not Receiving Messages
Webhook Not Receiving Messages
Verify:
- Webhook URL is accessible (HTTPS required)
- Verify token matches Meta configuration
- Webhook subscriptions include “messages” field
Related Features
Service Requests
Link WhatsApp conversations to service requests
Customer Management
View customer’s WhatsApp contact information