Integration with Saudi.support WhatsApp for ERPNext.
mit# whatsapp_saudi
This app integrates ERPNext with 4Whats.net , Global Whatsapp provider. The provider site can be accessed here (https://4whats.net/)
Follow these steps to install Whatsapp Saudi and integrate it with ERPNext:
- You must have ERPNext installed and running.
- Install Python (>=3.8) and Frappe Framework.
Open your terminal and run:
git clone https://github.com/ERPGulf/whatsapp_saudi.git
cd whatsapp_saudiRun the following command inside the project directory:
pip install -r requirements.txtInside your ERPNext environment, install the app:
bench get-app whatsapp_saudi
bench --site your-site-name install-app whatsapp_saudibench --site your-site-name migrate
bench restart- Whatsapp Saudi now supports multiple WhatsApp providers, making it flexible and scalable for different business requirements.
1- 4Whats.net
2- Bevatel
3- Rasayel
More providers can be added in future versions.
- Add your API Key and Instance ID in ERPNext settings.
1-Send PDFs & Documents
- You can now send PDF documents directly via WhatsApp.
2-Error logs
- Errors are now logged under error logs.
3-incoming Messages
- We have set up a webhook in 4Whats.net to handle incoming messages.
- Incoming messages are automatically stored in the WhatsApp Response Doctype in ERPNext for tracking and further processing.
- Instance ID
- API Token
- Webhook URL
Supports:
✅ Text Messages
✅ File Sending
✅ Incoming Webhook Handling
- After the entry of data click on the button(send test message) then message will send to whatsapp number.
- In 4Whats.net, set up a webhook to receive incoming messages.
- Use the following Base URL for the webhook:
https://your-erpnext-instance.com/api/method/whatsapp_saudi.receive_whatsapp_message(Replace your-erpnext-instance.com with your actual ERPNext URL.)
- This webhook ensures that all incoming messages are stored in the WhatsApp Response Doctype in ERPNext.
Bevatel credentials are taken from your Bevatel profile.
-
API Account ID
-
API Access Token
-
Inbox ID
-
Base API URL
These credentials must be configured inside:
ERPNext → WhatsApp Saudi → Provider Settings
✅ Template-based messages
✅ Text messages
Rasayel credentials are taken from your Rasayel dashboard.
-
API Token
-
Base URL
-
Template Name
-
Language Code
ERPNext → WhatsApp Saudi → Provider Settings
if you are using geo-fencing, for IPs or countries, you need to exclude meta-whatsapp IPs , following are the IPs as of now, it may change. In case it changes, track the IPs through nginx or apache log
173.252.64.0/18 1; 31.13.24.0/21 1; 31.13.64.0/18 1; 66.220.144.0/20 1; 69.63.176.0/20 1; 129.134.0.0/16 1;
Whatsapp Saudi supports dynamic template mapping.
Templates can include variables like:
Hello {{customer_name}},
Your invoice {{invoice_no}} is ready.These variables are automatically fetched from ERPNext documents (Sales Invoice, Quotation, etc.) and mapped dynamically before sending.
🔹 Separate Template Structure
-
Each provider may have different template formats.
-
The app automatically formats the payload according to the selected provider.
-
Language selection is supported (e.g., en, ar).
Supported (Provider Dependent):
-
PDF files (Invoices, Quotations)
-
Attachments from ERPNext
-
Static documents
Currently:
-
✅ Rasayel → Fully supported
-
✅ 4Whats → Supported
-
🚧 Bevatel → Based on API capability
Aysha Sithara.




