A WhatsApp chatbot engine in frappe powered by pywce
- Create a chatbot from frappe desk UI
- Doctype driven chatbot
- Chatbot changes reflect instantly on WhatsApp
- Improved performance via background processing using
frappe.enqueue(...)
- Create template logic using server side scripts or directly on UI
- Add default hooks
- Save chat history
- Support doc events
- Work with this frappe whatsapp templates app
- *Expose session data
Install app
$ bench get-app --branch main frappe_pywce https://github.com/DonnC/frappe_pywce.git
# install on site
$ bench --site `site-name` install-app frappe_pywce
Navigate to app settings > Configs
to add your whatsapp configs
You can add any templates of your choice, example templates below
Message bodies are the json representation of the supported YAML message templates.
Create your conversation starters or triggers. These enable you to listen to specific user input which results in showing user a specific template
To define business logic on a template, you create a hook.
E.g fetch a user sales invoices when they request for one.
A hook is defined as either a editor script (in the desk ui like creating frappe server scripts) or as server side scripts (on the server).
All hooks takes a Hook Arg object as a parameter
All editor scripts should have a single function named hook
Add a dotted path to your server side script
Visit the official wce documentation for a detailed guide.
We welcome contributions! Please check out the Contributing Guide for details.
This project is licensed under the MIT License. See the LICENSE file for details.