Custom Frappe Application for Twilio Integration
- Users can make outgoing voice calls by clicking at the phone icon that shows up next to the phone number.
- Users can send notifications through whatsapp.
To authorise Twilio integration go to Twilio Settings Doctype and provide Account SID
and Auth Token
. Make sure Twilio Settings are enabled to use Twilio in the system.
Once user clicks the phone icon next to the phone number, user will see a phone popup with a call button. Make sure that area code is included in the phone number(ex: +91) before using the call button to make outgoing calls.
Users can send notifications through WhatsApp channel. While creating/editing a notification please Select Channel as WhatsApp
and Twilio number from dropdown if you want to send whatsapp notification.
- ERPNext
- Twilio account (More details from
Configure Twilio
section)
- You need to create a new project in Twilio account to use communication features like whatsapp, voice calls etc through ERPNext.
- From your Twilio console you can go to a programmable voice section and get a Twilio number to use for calls(make sure that the number is voice capable).
- Create a TwiML App by passing voice request url as
you_project_domain_name/api/method/twilio_integration.twilio_integration.doctype.twilio_settings.twilio_settings.voice
. Usengrok
to get public domain for your project in case it is running locally.
- From your Twilio console you can go to a Programmable Messaging section and get a Twilio number to use for whatsapp.
Once you have created a site with ERPNext app installed, you can download and install twilio-integration app using
bench get-app https://github.com/frappe/twilio-integration.git
bench --site site_name install-app twilio-integration
Use bench start
command to run the project.
- For Whatsapp communication you need to set
Account SID
andAuth Token
inTwilio Settings
(You can get those from Twilio console). - For calls you need to pass
TwiML SID
(Get it from TwiML app you have created) andOutgoing Voice Medium
along withAccount SID
andAuth Token
inTwilio Settings
- Make sure that you enabled twilio by clicking
Enabled
checkbox in settings.
NOTE: While creating a new communication medium
for Outgoing Voice Medium
pass twilio number(including area code(ex:+91)) as Name, Twilio
as communication channel and Voice
as Communication Medium Type.
MIT