The Flex DID plugin provides two features:
- Agents can see their assigned phone number (
worker.phone_number
) - Agents can initiate calls from their assigned phone number
Make sure you have Node.js as well as npm
installed.
Afterwards, install the dependencies by running npm install
:
$ npm install
In order to develop locally, you can use the Webpack Dev Server by running:
$ twilio flex:plugins:start
This will automatically start up the Webpack Dev Server and open the browser for you. Your app will run on http://localhost:3000
. If you want to change that you can do this by setting the PORT
environment variable:
PORT=3001 npm start
When you make changes to your code, the browser window will be automatically refreshed.
When you are ready to deploy your plugin, in your terminal run:
$ twilio flex:plugins:deploy --changelog "Deploying flex-did"
$ twilio flex:plugins:release --plugin plugin-flex-did@0.0.1 --name "Flex DID" --description "Provides direct inward dial functionality."
For more details on deploying your plugin, refer to the deploying your plugin guide.
Note: Common packages like React
, ReactDOM
, Redux
and ReactRedux
are not bundled with the build because they are treated as external dependencies so the plugin will depend on Flex to provide them globally.