Section: Marketing & Communication
URL:/admin/whatsapp
Overview
WhatsApp is a full-featured messaging hub inside CRMConnect, built on the WhatsApp Business API (WABA / Meta Cloud API). It covers the complete lifecycle of WhatsApp communication: real-time two-way chat with leads and clients, automated chatbot flows, mass-messaging campaigns with approved templates, contact groups for audience segmentation, and a standalone contact directory for bulk outreach β all with granular role-based permissions per sub-module.
Business value
- Who uses it: Sales reps (chat), marketing (campaigns, bots), CRM admins (numbers, templates, groups)
- Key benefit: Consolidate every WhatsApp touchpoint β individual conversations, bulk campaigns, and automated responses β in one place linked to CRM records.
- Metrics it influences: Response time, lead conversion rate, campaign delivery/read rate, support deflection
Typical use cases:
- Sales rep chats with a lead directly from the CRM; the conversation is linked to the lead record and logged automatically
- Marketing sends a promotional campaign to a filtered group of contacts using a Meta-approved message template
- A chatbot answers FAQs outside business hours and routes the conversation to the right staff member based on the reply
- Proposals and invoices are sent to clients over WhatsApp with a single click via action-based template integration
Sub-modules at a glance
| Sub-module | URL | Purpose |
|---|---|---|
| Chat (Interaction) | /admin/whatsapp/interaction |
Two-way real-time chat with leads and clients |
| Bots | /admin/whatsapp/bots |
AI chatbots with visual Drawflow flow editor |
| Campaigns | /admin/whatsapp/campaigns |
Mass-messaging with WABA-approved templates |
| Groups | /admin/whatsapp/groups |
Contact groups for audience segmentation |
| Bulk Contacts | /admin/whatsapp/BulkContacts |
Standalone WhatsApp contact directory |
| Templates | /admin/whatsapp/templates |
Manage and sync WABA message templates |
| Quick Replies | /admin/whatsapp/QuickReplies |
Predefined reply shortcuts for chat agents |
| Numbers | /admin/whatsapp/numbers |
Connected WhatsApp Business numbers |
| Connection | /admin/whatsapp/connection |
Cloud API credentials and connection setup |
| Activity Log | /admin/whatsapp/activity_log |
Full audit trail of WhatsApp activity |
1. Chat (Interaction)
URL: /admin/whatsapp/interaction
Permission: whatsapp_chat β view
The main chat interface. Staff can open any conversation thread, send free-form messages or templates, attach media, use quick replies, and assign conversations to colleagues. Each conversation is linked to a CRM lead or client record.
Key concepts
| Concept | Description |
|---|---|
| Interaction | A conversation thread tied to a specific phone number and WhatsApp Business number |
| Quick Reply | A predefined message inserted with a shortcut β see Quick Replies sub-module |
| Template message | A Meta-approved structured message used to initiate conversations (required outside the 24-hour session window) |
| Assignment | Each conversation can be assigned to a staff member for ownership and accountability |
| Lead status | Lead status can be updated directly from within the chat view |
Common actions
- Open a conversation β click a thread in the left panel to load the message history.
- Send a message β type in the composer and press send; use the attachment icon for media.
- Insert a quick reply β type
/or click the quick-reply icon to select a predefined message. - Send a template β click the template icon to pick an approved WABA template when outside the 24-hour session window.
- Assign conversation β use the assignment control in the header to hand off to another staff member.
- Send a proposal via WhatsApp β from the proposal preview menu, click "Send Proposal on WhatsApp"; the system automatically opens or creates the interaction and sends the configured action template.
Action-based template integration
Certain CRM actions can automatically send a WhatsApp template when configured in Settings β WhatsApp β Template per action:
- Proposal sent β template is sent when a proposal is dispatched via the WhatsApp action button.
- Additional action triggers (invoice, estimate, etc.) follow the same pattern.
2. Bots
URL: /admin/whatsapp/bots
Permission: whatsapp_bot β view / create / edit / delete
WhatsApp Bots are automated conversation agents that respond to incoming messages based on a visual flow designed in the Drawflow drag-and-drop editor. Bots support multiple types (keyword triggers, menu-based, AI-assisted) and can reference approved WABA templates for structured responses.
Key concepts
| Concept | Description |
|---|---|
| Bot | A named automation with a trigger condition, a response flow, and an active/inactive toggle |
| Bot type | Determines how the bot is triggered (keyword match, menu selection, etc.) |
| Bot flow | The visual Drawflow canvas that defines the conversation path β nodes and connections |
| Flow node | A step in the conversation: send message, send template, branch on reply, wait, end |
| Template binding | A bot step can send a WABA template with mapped header_params, body_params, and footer_params |
| Active status | Only active bots intercept incoming messages; toggled per bot without deleting the flow |
Common actions
- List bots β
/admin/whatsapp/botsshows all bots with name, type, status, and quick actions. - Create a bot β click Add Bot, fill in the name, type, and optional template; save to create the record.
- Design the flow β click the Flow Editor icon to open the Drawflow canvas (
/admin/whatsapp/bots/botflow/{id}); drag nodes, connect them, configure each node's message or template, then save. - Activate / deactivate β use the toggle on the list row (AJAX call to
change_active_status); only one bot needs to be active per trigger scope to avoid conflicts. - Duplicate a bot β use the duplicate action to clone a bot's configuration and flow as a starting point for a new one.
- Edit settings β click edit to update name, type, template binding, or attached media file.
- Delete bot file β remove the media attachment from a bot without deleting the bot itself.
Flow editor notes
- The editor uses Drawflow (same engine as Marketing Automation).
- Flow JSON is stored in the
flow_datacolumn and saved viaupdateFlow. header_params,body_params, andfooter_paramsare JSON arrays that map template variables to dynamic values.
3. Campaigns
URL: /admin/whatsapp/campaigns
Permission: whatsapp_campaign β view / create / edit / delete
WhatsApp Campaigns allow sending a single WABA-approved template message to a large list of recipients (leads, client contacts, or contact groups) in one operation. Delivery and read status are tracked per recipient.
Key concepts
| Concept | Description |
|---|---|
| Campaign | A named mass-send job targeting a specific audience with a specific template |
Recipient type (rel_type) |
leads, contacts, or a contact group β selected when creating the campaign |
| Template | A Meta-approved WABA template used for the message body |
| WhatsApp number | The sender number (from the connected numbers list) |
| Delivery status | Per-recipient status: queued β sent β delivered β read |
| Delivered % | Count of delivered messages as a percentage of total recipients |
| Read % | Count of read messages as a percentage of delivered messages |
| Pause / Resume | Running campaigns can be paused and later resumed without losing progress |
| Campaign file | Optional media attachment sent with the template |
Common actions
- View all campaigns β
/admin/whatsapp/campaignslists campaigns with status and delivery metrics. - Create a campaign β click New Campaign, select the sender number, template, recipient type (leads / contacts / group), pick individual recipients or an entire group, optionally attach a file, then save.
- Edit a campaign β open an existing campaign before it runs to adjust recipients or template mapping.
- View campaign report β click a campaign name to see the detail view with delivered %, read %, and the per-recipient log.
- Pause / Resume β use the pause/resume control on the campaign detail view to halt or continue sending.
- Delete a campaign β removes the campaign record and its per-recipient data.
- Delete campaign file β remove the media attachment without deleting the campaign.
- Filter leads for campaign β use
get_filtered_leads(AJAX) to narrow the recipient list by lead criteria before saving.
Campaign analytics
The campaign detail view (/admin/whatsapp/campaigns/view/{id}) shows:
- Total recipients selected vs. total in CRM (as %)
- Delivered count and delivered %
- Read count and read %
4. Groups
URL: /admin/whatsapp/groups
Permission: whatsapp_groups β view / create / edit / delete
Groups are named collections of Bulk Contacts used to segment audiences for campaigns. A contact can belong to multiple groups; a group can be targeted as the recipient list for a campaign.
Common actions
- List groups β
/admin/whatsapp/groupsshows all groups with name and contact count. - Create a group β click Add Group, enter a name and optional description, save.
- Edit a group β click edit on any row to update the group name.
- Delete a group β removes the group; contacts are not deleted, only the group assignment.
5. Bulk Contacts
URL: /admin/whatsapp/BulkContacts
Permission: whatsapp_contacts β view / create / edit / delete
Bulk Contacts is a standalone WhatsApp-specific contact directory, separate from the CRM's leads and clients. Contacts here are the recipients available for campaigns and groups. Phone number uniqueness is enforced.
Key concepts
| Concept | Description |
|---|---|
| Contact | A record with name, phone number, company, address, city, state, country, description |
| Phone uniqueness | Each phone number can appear only once; duplicates are rejected on create and update |
| Group assignment | A contact can be assigned to one or more groups at creation or via edit |
| CSV import | Bulk contacts can be imported from a CSV file; existing phone numbers trigger a group-assignment-only update rather than a duplicate insert |
CSV import format
The import expects a comma-separated file with columns in this order (header row is skipped):
| Column | Field |
|---|---|
| 1 | name |
| 2 | phonenumber |
| 3 | company_name |
| 4 | address |
| 5 | city |
| 6 | state |
| 7 | country |
| 8 | description |
If a phone number already exists, the import skips creating a new record and only assigns the selected groups to the existing contact.
Common actions
- List contacts β
/admin/whatsapp/BulkContactsshows all contacts with their group memberships. - Add a contact β click Add Contact, fill in phone number (required, unique), name, and optional fields; assign to one or more groups; save.
- Edit a contact β update any field or change group assignments.
- Delete a contact β removes the contact and its group associations.
- Import from CSV β use the Import button, upload a CSV file, optionally pre-select groups to assign to all imported contacts, then confirm.
- Bulk delete β select multiple contacts via checkboxes and use the bulk delete action.
- Bulk assign groups β select multiple contacts and assign them to one or more groups in a single operation.
6. Templates
URL: /admin/whatsapp/templates
Permission: whatsapp_template β view / create / edit / load_template
Templates are Meta-approved WABA message templates required for initiating conversations and for campaign messages. The Templates sub-module syncs with the Meta Graph API to list, create, and manage templates directly from CRMConnect.
Key concepts
| Concept | Description |
|---|---|
| WABA template | A Meta-approved structured message with header, body, footer, and optional buttons |
| Template model | A predefined CRMConnect template for common document actions (proposal, invoice, proforma, storno, estimate) |
| Parameter mapping | Templates with variables ({{1}}, {{2}}) are mapped to CRM merge fields at send time |
parameter_format |
POSITIONAL (numbered placeholders) or NAMED β must match the Meta template definition |
| Sync with Meta | Templates are fetched from the Meta API; status (approved / pending / rejected) is shown |
Template models
The Template Models page (/admin/whatsapp/templates/template_models) provides one-click creation of standard templates in Meta for:
- Proposal
- Invoice
- Proforma invoice
- Storno (credit note)
- Estimate
Click Load to Meta on any model to submit it for Meta approval. Once approved, the template becomes available for campaigns, bots, and action-based sends.
Common actions
- View templates β lists all templates synced from Meta with their approval status.
- Create a template β define header, body, footer, category, language, and submit to Meta for approval.
- Edit a template β update a draft or rejected template and resubmit.
- Delete a template β removes the local record and deletes from Meta.
- Load a template model β use the Template Models page to submit a predefined document template to Meta with one click (requires
load_templatepermission). - Get template mapping β when selecting a template in the campaign or bot form, the parameter mapping UI loads automatically via AJAX to display the required variable fields.
7. Quick Replies
URL: /admin/whatsapp/QuickReplies
Permission: quickreplies β view / create / edit / delete
Quick Replies are short named text snippets that chat agents can insert into a conversation instantly. They reduce response time for frequently asked questions or standard greetings.
Common actions
- List quick replies β
/admin/whatsapp/QuickRepliesshows all saved replies with name and message preview. - Add a quick reply β click Add, enter a name (the shortcut label) and the full message text; save.
- Edit a quick reply β update the name or message text.
- Delete a quick reply β removes the shortcut; it will no longer appear in the chat composer.
- Use in chat β in the Interaction view, click the quick-reply icon or type the shortcut to insert the full message text into the composer.
8. Numbers
URL: /admin/whatsapp/numbers
Permission: whatsapp_numbers β view
Lists all WhatsApp Business phone numbers connected to CRMConnect via the Meta Cloud API. For each number the system fetches and caches the business profile from Meta (profile picture, about text, address, vertical, email, websites).
Key concepts
| Concept | Description |
|---|---|
| Phone Number ID | Meta's unique identifier for a WhatsApp Business phone number |
| Business profile | Display name, profile picture, about, address, email, vertical fetched from Meta Graph API |
| Profile picture proxy | Profile images are served through /admin/whatsapp/profile_picture_proxy/{phone_number_id} to add the required Bearer token β direct Meta URLs are not publicly accessible |
Numbers are added and configured in Settings β WhatsApp, not through this list view. This page is a read-only overview of active connections.
9. Connection
URL: /admin/whatsapp/connection
Access: Admin only
The Connection page shows the WhatsApp Cloud API integration status and provides the interface for entering or updating the Meta credentials (Access Token, Phone Number ID, Business Account ID, Webhook configuration). Only administrators can access this page.
10. Activity Log
URL: /admin/whatsapp/activity_log
A chronological audit trail of all WhatsApp actions performed within CRMConnect β messages sent and received, campaign dispatches, bot triggers, template sends, and system events. Useful for compliance review and troubleshooting delivery issues.
Permissions reference
| Permission resource | Controls access to |
|---|---|
whatsapp_chat |
Chat (Interaction) view and send |
whatsapp_bot |
Bots list, flow editor, create/edit/delete |
whatsapp_campaign |
Campaigns list, create/edit/delete/view |
whatsapp_groups |
Groups list, create/edit/delete |
whatsapp_contacts |
Bulk Contacts list, create/edit/delete/import |
whatsapp_template |
Templates list, create/edit/delete/load_template |
whatsapp_numbers |
Numbers list view |
quickreplies |
Quick Replies list, create/edit/delete |
Source: crm-connect-main/app/modules/whatsapp/controllers/ Β· Updated: 2026-06-03