This plugin enables supervisors to not only listen in to calls, but optionally also speak to the agent without the customer noticing.
Twilio Flex Plugins allow you to customize the appearance and behavior of Twilio Flex. If you want to learn more about the capabilities and how to use the API, check out our Flex documentation.
Make sure you have Node.js as well as npm
. We support Node >= 10.12 (and recommend the even versions of Node). Afterwards, install the dependencies by running npm install
:
# for both the subfolders functions and plugin-coaching
cd
# If you use npm
npm install
Next, please install the Twilio CLI by running:
brew tap twilio/brew && brew install twilio
Finally, install the Flex Plugin extension and the Flex Serverless extension for the Twilio CLI:
twilio plugins:install @twilio-labs/plugin-flex@beta
twilio plugins:install @twilio-labs/plugin-serverless
This repo consists of two parts:
- a Twilio Function, which modifies the conference to enable/disable whispering
- a Twilio Flex Plugin to give supervisors an interface to trigger the function
- Rename
/functions/.env.example
to.env
and add your Twilio AccountSid and AuthToken - Run
twilio serverless:deploy
in your console - Keep the function URI (looks like https://functions-12345.twil.io/coachControl)
- Rename
/plugin-coaching/.env.example
to.env
and setCOACHING_FUNCTION
to the URI copied from step 3 of deploying your Twilio Function - Run
twilio flex:plugins:deploy --changelog "Initial release"
and follow the instructions to release the plugin
This plugin was written as an example to quickstart other developers with their own project. This plugin has not been tested extensively, especially not in a production environment, and should be treated as such. No guarantees are given, no liability is assumed.