With the Chatbot Builder, organizations can easily automate responses to time-consuming and frequently asked questions. The process is simple:
That’s it! The chatbot is ready to handle user queries. Users are identified by their username or phone number, and responses are personalized based on the template and server script combination.
Currently, the chatbot integrates with Telegram (TG), with support for WhatsApp and Slack coming soon.
You can visualize the chatbot conversation as a tree structure. Each branch represents a conversation, starting from the root (initial question) to the leaf (final response). Each node in the tree is a message linked to a template, which may contain variables. These variables are filled using custom functions or server scripts, making each conversation dynamic and interactive.
Clone the Chatbot App
Run the following command to clone the Chatbot app into your bench's apps directory:
bench get-app https://github.com/aerele/chatbot
Install the App on Your Site
Install the Chatbot app on your Frappe site using:
bench --site your-site-name install-app chatbot
Replace your-site-name
with the actual name of your Frappe site.
Access Chatbot Setup
In your Frappe instance, navigate to Chatbot Setup.
Configure Telegram Settings
Set the Webhook URL
In the Webhook URL field, input the root URL of your site, for example:
https://erp.yourcompany.com
Note: Ensure your site URL is accessible over the internet and uses HTTPS, as required by Telegram.
Navigate to Chatbot Party Type
Go to Chatbot Party Type in your Frappe instance.
Add Party Types
Add the party types you want the chatbot to manage, such as Employee, Customer, or Supplier.
Update Party Doctype
Upon adding a party type, a new tab with a field for the Telegram username will be added to the corresponding party doctype. This allows you to input the Telegram username for each party, enabling personalized interactions.
You are now ready to design your Chatbot Flow and start automating your interactions with users.