Skip to content

lehel-twilio/plugin-channelManagement

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Manage worker Capacity from Flex!

Channel Management

Setup

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

Afterwards install the dependencies by running npm install:

cd plugin-channelManagement

# If you use npm
npm install

# Enter your account sid and runtime domain
cp public/appConfig.example.js public/appConfig.js

Development

In order to develop locally, you can use the Webpack Dev Server by running:

npm start

This will automatically start up the Webpack Dev Server and open the browser for you. Your app will run on http://localhost:8080. If you want to change that you can do this by setting the PORT environment variable:

PORT=3000 npm start

When you make changes to your code, the browser window will be automatically refreshed.

Deploy

Once you are happy with your plugin, you have to bundle it, in order to deploy it to Twilio Flex.

Run the following command to start the bundling:

npm run build

Afterwards, you'll find in your project a build/ folder that contains a file with the name of your plugin project. For example plugin-example.js. Take this file and upload it into the Assets part of your Twilio Runtime. There are also a couple runtime functions under src/functions that you'll need to use to create new Functions with under your Twilio Runtime. Be sure to uncheck "Check for valid Twilio signature" since authentication is being handled with a separate JWT validation call. In order for these functions to work, you'll want to go to your Twilio Runtime Functions Configure page to enable ACCOUNT_SID and AUTH_TOKEN, as well as enter your TWILIO_WORKSPACE_SID (from Taskrouter) and add an npm module dependency for request 2.88.0.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published