Dlwhatsapp
Full-featured WhatsApp Business integration for Frappe ERPNext — send messages, PDFs, templates & workflow notifications via Meta Cloud API
- Author: shihab0020
- Repository: https://github.com/shihab0020/dlwhatsapp
- GitHub stars: 1
- Forks: 2
- License: MIT
- Category: Integrations
- Maintenance: Actively Maintained
Install Dlwhatsapp
bench get-app https://github.com/shihab0020/dlwhatsapp
Tags
- erpnext
- erpnext-integration
- frappe
- frappe-app
- meta-cloud-api
- notifications
- whatsapp-api
- whatsapp-business
Add the Frappe Gems badge to your README
Maintain Dlwhatsapp? Paste this into your README:
[](https://frappegems.com/gems/apps/shihab0020/dlwhatsapp)
About Dlwhatsapp
DL WhatsApp
Full-featured WhatsApp Business integration for Frappe & ERPNext
Send quotations, invoices, delivery notes, and custom notifications via WhatsApp directly from your ERPNext desk. Built on the Meta WhatsApp Cloud API.
✨ Features
- WhatsApp Chat Page — Full in-desk chat UI: send/receive messages, images, documents, audio, templates, and emoji reactions
- Send PDFs from any document — Quotation, Sales Invoice, Delivery Note — one click sends a PDF via WhatsApp with a template header
- Template Messages — Sync and send approved Meta templates with dynamic fields from any ERPNext document
- Workflow Notifications — Automatically notify approvers or roles when a workflow state changes
- Assignment Notifications — Notify users when a document is assigned to them
- Auto Contact Names — Contacts are automatically named from ERPNext Customer / Contact / Lead records by phone number
- 24-Hour Session Management — Detects expired sessions, auto-sends a greeting template, and queues the user's message
- Multi-Account Support — Multiple WhatsApp Business numbers with a default account
- Real-time Updates — Messages and delivery status update live via Frappe's realtime engine
- Webhook Handling — Processes incoming messages, media, reactions, and delivery receipts
📋 Requirements
- Frappe / ERPNext v16
- A Meta Developer App with WhatsApp product enabled
- A verified WhatsApp Business phone number
- Meta API token with
whatsapp_business_messagingpermission (addwhatsapp_business_managementto sync/create templates)
🚀 Installation
cd /path/to/frappe-bench
bench get-app https://github.com/shihab0020/dlwhatsapp --branch main
bench --site your-site install-app dlwhatsapp
bench migrate
⚙️ Setup
- DL WhatsApp Account — Add your Meta Phone Number ID, WABA ID, and API token
- Register Phone — Use the Register Phone Number button to activate the Cloud API
- Webhook — Point your Meta App webhook to:
https://your-site.com/api/method/dlwhatsapp.dlwhatsapp.api.webhook.handle - DL WhatsApp Settings — Enable notifications, set a default welcome template
- Sync Templates — Pull your approved Meta templates into the system
📬 Sending Messages
From the Chat Page
Navigate to DL WhatsApp → Chat. Select a contact and type freely (within 24h session) or use templates.
From any ERPNext form
Add a Send WhatsApp button to any form using the global helper:
dlwhatsapp.open_send_dialog(frm.doc.mobile_no, frm.doc.customer_name);
Send Document as PDF
The Send Document PDF button in the chat generates a PDF of any document and sends it — optionally with a template header to bypass the 24h session requirement.
🔔 Notifications & Workflows
Create rules in DL WhatsApp Notification — no code required:
| Event | Description |
|---|---|
after_insert |
When a document is created |
on_update |
When a document is saved |
on_submit |
When a document is submitted |
on_workflow_action |
When workflow state changes (filter by state) |
on_assign |
When a document is assigned to a user |
Recipient types: Phone Field · Static Number · User Field (looks up User mobile_no) · Role (sends to all users with that role)
📁 Project Structure
dlwhatsapp/
├── dlwhatsapp/
│ ├── api/
│ │ ├── send.py # Whitelisted API endpoints (send, templates, contacts)
│ │ └── webhook.py # Meta webhook handler
│ ├── doctype/
│ │ ├── dl_whatsapp_account/ # WhatsApp Business account config
│ │ ├── dl_whatsapp_contact/ # Contact management with ERPNext lookup
│ │ ├── dl_whatsapp_message/ # Message send/receive with Meta API
│ │ ├── dl_whatsapp_notification/ # Notification rules engine
│ │ ├── dl_whatsapp_settings/ # Global settings singleton
│ │ └── dl_whatsapp_template/ # Template management & sync
│ └── page/
│ └── dlwhatsapp_chat/ # Full chat page UI
└── public/
├── css/dlwhatsapp.css
└── js/dlwhatsapp.js
📄 License
MIT — see license.txt
Built by DLITS — شركة دلتس للحلول التقنية
Related Integrations apps for Frappe & ERPNext
- Insights — Open Source Business Intelligence Tool
- Raven — Simple, open source team messaging platform
- Frappe Whatsapp — WhatsApp cloud integration for frappe
- Frappe Assistant Core — Infrastructure that connects LLMs to ERPNext. Frappe Assistant Core works with the Model Context Protocol (MCP) to expose ERPNext functionality to any compatible Language Model
- Biometric Attendance Sync Tool — A simple tool for syncing Biometric Attendance data with your ERPNext server
- Frappe React Sdk — React hooks for Frappe
- Frappe Js Sdk — TypeScript/JavaScript library for Frappe REST API
- Mcp — Frappe MCP allows Frappe apps to function as MCP servers