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.
This plugin replaces the native flex WorkerSkills component, adds audit feature (user who last updated a worker skills) and bulk skills management functionality. Two new worker attributes skillsUpdatedBy and skillsUpdatedTimestamp are used track who last updated the worker skills. The bulk skills mamangement feature, allows a user a select a worker, and copy their skills to other workers in the same workspace.
If you only want to grant a selected number of users (say users with specific roles e.g. admins) access/ability to edit worker skills, then you replace editable component with a Display only component.
plugin-worker-skills/src/WorkerskillsPlugin.js
Lines 35 to 40 in f9d8c17
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:
cd
# If you use npm
npm installNext, please install the Twilio CLI by running:
brew tap twilio/brew && brew install twilioFinally, install the Flex Plugin extension for the Twilio CLI:
twilio plugins:install @twilio-labs/plugin-flexCreate the Serverless config file by copying .env.example to .env.
cd serverless
cp .env.example .envEdit .env and set the WORKSPACE_SID (Twilio TaskRouter Workspace Sid),, RETRY_COUNT (number of times to retry when there is a conflict or error when updating worker attributes). Next, deploy the Serverless functions:
cd serverless
twilio serverless:deployAfter successfully deploying your function, you should see at least the following:
✔ Serverless project successfully deployed
Deployment Details
Domain: worker-skills-xxxx-dev.twil.io
Functions:
https://worker-skills-xxxx-dev.twil.io/workers-bulk-skills-updateYour functions will now be present in the Twilio Functions Console and be part of the "worker-functions" service. Copy the base URL from the function.
Create the plugin config file by copying .env.example to .env.
cd plugin-worker-skills
cp .env.example .envEdit .env, set the FLEX_APP_FUNCTIONS_BASE variable to your Twilio Functions base URL (like https://worker-skills-xxxx-dev.twil.io), BULKSKILLS_BATCH_SIZE to batch size for bulk worker skills update .
Run twilio flex:plugins --help to see all the commands we currently support. For further details on Flex Plugins refer to our documentation on the Twilio Docs page.

