ERPNext is open-source, self-hostable ERP built on the Frappe Framework. Unlike Tally, it has a proper REST API and built-in outgoing webhooks, so connecting it to WhatsApp is straightforward: submit an invoice, the customer gets a WhatsApp. No bridge required.
Unlike Tally (which needs a tunnel to expose a local port), ERPNext runs on a reachable URL, either yoursite.erpnext.com (cloud hosted) or your own domain. WA.Expert can call its REST API directly, and ERPNext can POST webhooks to WA.Expert without any extra setup.
ERPNext's Authorization header uses the word token in lowercase: Authorization: token api_key:api_secret. Using Bearer or capitalising Token causes a 401. The token is your API key and API secret joined by a colon.
API_KEY:API_SECRET
(key first, colon, then secret).Token: YOUR_API_KEY:YOUR_API_SECRET
Header: Authorization: token YOUR_API_KEY:YOUR_API_SECRET
(lowercase 'token', space, then the colon-joined pair)
Example:
Authorization: token 8d3a1f2c4e6b:7a9f1d2e3b4c5a6d7e8fERPNext REST API: docs.frappe.io
The cleanest integration: configure a webhook in ERPNext for a DocType event, and WA.Expert receives the payload and sends the WhatsApp automatically.
on_submit, on_update, or after_insert.| DocType | Doc Event | WhatsApp trigger |
|---|---|---|
| Sales Invoice | on_submit | Invoice sent to customer: invoice number, total, due date. |
| Payment Entry | on_submit | Payment received confirmation to customer or internal team. |
| Sales Order | after_insert | Order confirmation to customer: order number and summary. |
| Delivery Note | on_submit | Dispatch notification with tracking details. |
| Purchase Order | on_submit | PO alert to internal procurement or to the supplier. |
Any ERPNext DocType can be a webhook trigger. Use on_submit for approval-gated documents and after_insert for immediate notifications.
{
"doctype": "Sales Invoice",
"name": "SINV-2026-00142",
"customer": "Priya Textiles",
"customer_mobile": "9820012345",
"grand_total": 48500.00,
"due_date": "2026-07-07",
"status": "Submitted",
"posting_date": "2026-06-23"
}
Map to WA.Expert variables:
customer -> party_name
"+91" + customer_mobile -> wa_phone <- PREPEND +91 if needed
name -> invoice_number
grand_total -> invoice_amount
due_date -> payment_dueThe customer_mobile field is present in Sales Invoice if it was set on the Customer master. If it is missing from the payload, do a secondary GET to /api/resource/Contact?filters=[[Contact,link_name,=,CUSTOMER_NAME]]&fields=[mobile_no] to look up the number from the Contact record. Prepend +91 to bare 10-digit Indian numbers.
Use WA.Expert's External API Request step to read data from ERPNext (payment outstanding, order status) or to create records (new Lead from WhatsApp enquiry).
GET https://yoursite.erpnext.com/api/resource/Sales%20Invoice
?filters=[["Sales Invoice","customer","=","Priya Textiles"],
["Sales Invoice","outstanding_amount",">",0]]
&fields=["name","grand_total","outstanding_amount","due_date"]
Authorization: token YOUR_API_KEY:YOUR_API_SECRET
Response:
{
"data": [
{"name":"SINV-2026-00142","grand_total":48500,"outstanding_amount":48500,"due_date":"2026-07-07"},
{"name":"SINV-2026-00138","grand_total":22000,"outstanding_amount":22000,"due_date":"2026-06-30"}
]
}POST https://yoursite.erpnext.com/api/resource/Lead
Authorization: token YOUR_API_KEY:YOUR_API_SECRET
Content-Type: application/json
Body:
{
"lead_name": "{{customer_name}}",
"mobile_no": "{{customer_phone}}",
"source": "WhatsApp",
"status": "New",
"notes": "{{customer_message}}"
}
Response:
{
"data": {
"name": "CRM-LEAD-2026-00241",
"lead_name": "Priya Sharma",
"status": "New"
}
}1. Accountant submits Sales Invoice SINV-2026-00142 in ERPNext.
2. ERPNext fires the on_submit webhook to WA.Expert:
{"name":"SINV-2026-00142","customer":"Priya Textiles",
"customer_mobile":"9820012345","grand_total":48500,"due_date":"2026-07-07"}
3. WA.Expert automation:
wa_phone = "+91" + "9820012345" = "+919820012345"
4. WA.Expert sends the customer WhatsApp:
'Hi Priya Textiles! Invoice SINV-2026-00142 for Rs. 48,500
has been raised. Payment due: 7 July 2026.
Reply to this message for any queries.'| Symptom | Likely cause | Fix |
|---|---|---|
| 401 on API calls | Wrong auth header format | Use lowercase 'token': Authorization: token api_key:api_secret. Not 'Bearer', not 'Token' (capitalised). |
| API Secret lost | Secret shown only once at generation | Delete the existing keys and Generate Keys again. The new secret will appear in the popup. Update all integrations that used the old key. |
| Webhook not firing | DocType event not matching or webhook disabled | Check the webhook record in ERPNext: ensure Enabled is checked, the Doc Event matches what you expect (on_submit vs after_insert), and the DocType name is exact. |
| Mobile number missing from payload | Not set on Customer master | Open the Customer record and enter the mobile number. Alternatively, fetch from the Contact DocType with a secondary GET. |
| Filter returning no results | Field name or operator wrong | ERPNext filters use the format [[DocType,field,operator,value]]. The DocType in the filter must match the resource DocType exactly. Test the URL in a browser while logged in to see the raw response. |
| POST creating duplicate records | Submitting the same payload twice | ERPNext auto-names most DocTypes. Sending POST twice creates two records. Check for the record first with a GET if you want to avoid duplicates. |
Tally's XML-over-HTTP gateway: the complete bridge and payment-reminder guide.
Read guideZoho Books: cloud accounting with OAuth and invoice webhooks.
Read guideFree trial, no credit card. If you get stuck, we answer live on WhatsApp.