Skip to content

Latest commit

 

History

History

plugin-flex-did

Flex DID Plugin

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

Screen Shot 2021-01-10 at 11 02 48 PM

Setup

Make sure you have Node.js as well as npm installed.

Afterwards, install the dependencies by running npm install:

$ npm install

Development

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.

Deploy

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.