WhatsApp Business API

Integrate WhatsApp into Odoo to automate customer communication through the most popular messaging channel.

WhatsApp API
Automated Messaging
Template Management
Status Tracking

WhatsApp Business API Overview

The WhatsApp module for Odoo 19 integrates WhatsApp Business API to enable businesses to send automated messages to customers. Supports order notifications, payment reminders, appointment confirmations, and approved marketing messages.

Key points

  • Official WhatsApp Business API integration

  • Manage multiple WhatsApp Business accounts

  • Send approved message templates

  • Track message delivery and read status

  • Automated notifications from Odoo modules

  • Multi-language message support

  • End-to-end encryption security

  • WhatsApp Business Policy compliance


System Architecture

WhatsApp system designed with modular architecture:

Key points

  • whatsapp - Core module providing API and infrastructure

  • whatsapp_account - Account and configuration management

  • whatsapp_account_followup - Payment reminder notifications

  • whatsapp_calendar - Appointment and meeting notifications

  • Integration with Odoo Mail System

  • Webhook for message status updates

  • Queue system for batch message processing


Key Features

Highlighted features of WhatsApp module:

Key points

  • Send template messages with dynamic parameters

  • Send messages to contacts, partners, customers

  • Media support: images, documents, videos

  • Status tracking: sent, delivered, read, failed

  • Automatic retry on send failure

  • Rate limiting compliant with API limits

  • Multi-language template support

  • Webhook callback for status updates

  • Detailed logging for debugging

  • Integration with notification system


WhatsApp Template Management

Managing WhatsApp message templates:

Key points

  • Create and manage templates in Meta Business Manager

  • Sync approved templates into Odoo

  • Categorize templates: marketing, utility, authentication

  • Define dynamic parameters in templates

  • Preview templates before sending

  • Version control for templates

  • Templates by language and country

  • Track template usage and performance


WhatsApp Account Configuration

Steps to configure WhatsApp Business account:

Steps

  • 1. Register WhatsApp Business API via Meta Business

  • 2. Obtain Phone Number ID and Access Token

  • 3. Create WhatsApp Account in Odoo

  • 4. Enter authentication credentials (API credentials)

  • 5. Configure webhook URL to receive callbacks

  • 6. Verify webhook with token

  • 7. Test connection and send test message

  • 8. Configure rate limits and retry policy


Sending Messages from Odoo

Ways to send WhatsApp messages from Odoo:

Key points

  • Manual send from contact/partner form

  • Automatic from workflow (sale order, invoice, appointment)

  • Scheduled action for batch sending

  • API call from custom module

  • Integration with automated actions

  • Trigger from stage change in pipeline

  • Mass mailing campaign via WhatsApp

  • Transactional messages from website


Tracking and Reporting

Monitor WhatsApp message effectiveness:

Key points

  • Dashboard overview of sent messages

  • Success/failure delivery rate

  • Message read rate

  • Average time to delivered

  • Message cost by template type

  • Performance by WhatsApp account

  • Error logs and troubleshooting

  • Export reports by time period


Integration with Odoo Modules

WhatsApp integrates with modules:

Key points

  • Sales - Order and quote notifications

  • Accounting - Invoice payment reminders

  • Calendar - Appointment confirmation and reminders

  • CRM - Marketing messages to leads

  • Project - Task and deadline notifications

  • HR - HR notifications and payslips

  • Helpdesk - Support ticket updates

  • eCommerce - Order confirmation and shipping


WhatsApp Policy Compliance

Ensure WhatsApp Business Policy compliance:

Key points

  • Only send messages to opted-in users

  • Use Meta-approved templates only

  • No spam or policy-violating content

  • Provide clear opt-out mechanism

  • Comply with 24-hour messaging window

  • No sensitive content transmission

  • Protect customer personal data

  • Monitor and handle complaints promptly


Error Handling and Retry

Intelligent error handling mechanism:

Key points

  • Auto-retry on temporary errors (network, rate limit)

  • Exponential backoff for retry attempts

  • Mark failed messages for manual review

  • Admin notification on critical errors

  • Fallback to email if WhatsApp fails

  • Detailed error code and message logging

  • Queue management to prevent message loss

  • Periodic health check for WhatsApp account


Security and Access Control

Security management for WhatsApp integration:

Key points

  • Encrypt API credentials in database

  • Access control by user groups

  • Audit log for all sent messages

  • Webhook signature verification

  • IP whitelist for webhook endpoint

  • Rate limiting to prevent abuse

  • Data retention policy for message logs

  • GDPR compliance for customer data


Performance Optimization

System optimization techniques:

Key points

  • Batch processing for bulk messages

  • Async queue to avoid blocking UI

  • Cache templates to reduce API calls

  • Connection pooling for HTTP requests

  • Lazy loading message history

  • Database indexing for fast queries

  • Periodic cleanup of old message logs

  • Monitor and alert on performance degradation


Practical Usage Tips

Key points

  • Test templates thoroughly before submitting for approval

  • Use template variables to personalize messages

  • Name templates clearly by purpose

  • Monitor read rate to evaluate effectiveness

  • Avoid sending too many marketing messages

  • Provide value in every message

  • Respect customer time zones

  • A/B test different templates

  • Backup API credentials securely

  • Have contingency plan when WhatsApp is down


Common Troubleshooting

Solutions for common issues:

Key points

  • Message not sending: Check API credentials and phone number

  • Template rejected: Review WhatsApp policy and adjust content

  • Rate limit exceeded: Reduce send rate or upgrade account

  • Webhook not working: Verify URL and token configuration

  • Message delayed: Check queue and worker status

  • Unusually high cost: Review template type and usage pattern

  • Invalid phone number: Validate format before sending

  • Connection timeout: Check network and firewall settings


Important Terminology

Key concepts to understand:

Key points

  • WABA - WhatsApp Business Account

  • Phone Number ID - WhatsApp phone number identifier

  • Template - Approved message template

  • Template Parameter - Dynamic variable in template

  • Message Template Namespace - Template grouping

  • Webhook - Endpoint receiving WhatsApp callbacks

  • Delivery Status - Message sending status

  • 24-hour Window - Free messaging time frame