Skip to content

DonnC/frappe_pywce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Frappe Pywce

A WhatsApp chatbot engine in frappe powered by pywce

workspace

Features

  • 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

Setup

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

Configure

Navigate to app settings > Configs to add your whatsapp configs

configs

Create templates

You can add any templates of your choice, example templates below

Message bodies are the json representation of the supported YAML message templates.

btn templates

text templates

Create triggers

Create your conversation starters or triggers. These enable you to listen to specific user input which results in showing user a specific template

trigger

Create business logic

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

Editor Script

All editor scripts should have a single function named hook hook

Server side script

Add a dotted path to your server side script hook-server

Documentation

Visit the official wce documentation for a detailed guide.

Contributing

We welcome contributions! Please check out the Contributing Guide for details.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

WhatsApp chatbot engine in Frappe powered by pywce

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published