- DarkLight
Twilio Flex CLI Plug-in
- DarkLight
The Twilio Flex Command Line Interface (CLI) allows users to manage Twilio resources from a terminal or command prompt. For the Workspace to load the Campaign Manager widgets and work as expected, you have to deploy the non-tethered plug-in using this CLI. This section deals with the end-to-end deployment of this plug-in.
Notes:
Twilio Flex integration with Campaign Manager is only in a non-tethered model.
If you have any other plug-in to integrate, combine the deployment with the Twilio Flex CLI plug-in.
Deploying the Twilio Flex CLI
For Non-Tethered calls, deploy the Twilio Flex CLI plug-in to support Preview Dialing.
Perform the following steps:
Install Visual Studio Code or Cygwin Terminal to run the Twilio Flex commands.
Download the Non-Tethered Simple Plugin and the Non-Tethered Functions from the Amazon S3 folder or any other Source shared with you.
If you are using Campaign Manager Simple Plug-in for Non-Tethered, download the plugin-AcqueonNon-Tethered folder and save it on the local disk.
Open the Cygwin Terminal in Administrator Mode.
Point to the directory where the plug-in is saved.
Set the Twilio Flex Account SID and Twilio Flex Auth Token using the following commands:
export TWILIO_ACCOUNT_SID=YourTwilioAccountSID export TWILIO_AUTH_TOKEN=YourTwilioAuthToken
Install the Twilio Flex CLI using the following command to ensure that you point to the folder where these functions are available:
npm install twilio-cli -g
Install the node modules using the following command:
npm install
Point Twilio Flex account SID and auth Token in the following .env file:
REACT_APP_TWILIO_ACCOUNT_SID=<Your Twilio account sid>
REACT_APP_TWILIO_AUTH_TOKEN=<Your Twilio auth token>
REACT_APP_TWILIO_WORKSPACE_SID=<Your Workspace sid>
REACT_APP_SERVICE_ADAPTER_URL=<Your Application Adaptor URL>
REACT_APP_SERVICE_AGENTCLIENT_URL=<Your Application Agent Client URL>
REACT_APP_SERVICE_CLEARSCREENPOP=false
REACT_APP_SERVICE_PLUGINAUTOACCEPTCALL=true
Notes:
If the value is true, the plug-in auto accepts the calls. If the value is false, see Progressive and Predictive calls.
Auto Accept Using Functions is the recommended model.
Run the build Twilio Flex command:
twilio flex:plugins:build
Run the Deploy command to deploy the plugin:
twilio flex:plugins:deploy --major --changelog "NonTetheredPlugin" --description "NonTetheredPlugin"
Release the Plugin using the release command. After successful deployment of plugin with the serverless functions, launch Flex and verify that calls are dialed out as expected.