Important
The rac-callback concept is now available in the Flex Plugin Library. You may now install the callback feature set in one of the following ways:
- Via the plugin library by navigating to Flex UI > Admin > Plugins and selecting "Queued Callback And Voicemail"
- Via the Flex Project Template, which allows you to orchestrate deployment of your entire Flex solution
This repository is now redundant and has been archived.
This plugin registers the RAC channel and customizes the TaskInfoPanel to allow for an outbound Voice channel call to be triggered from the RAC channel task.
To deploy this plugin, you will need:
- An active Twilio account with Flex provisioned. Refer to the Flex Quickstart to create one.
- npm version 6.0.0 or later installed (type
npm -v
in your terminal to check) - Node version 14.0.0 or later installed (type
node -v
in your terminal to check) - Twilio CLI along with the Flex CLI Plugin. Run the following commands to install them:
# Install the Twilio CLI
npm install twilio-cli -g
- A GitHub account
Before we begin, we need to collect all the config values we need to run the application:
Config Value | Description |
---|---|
Channel Unique Name | The Task Channel Unique Name for 'RAC' from TaskRouter > Flex Task Assignment Workspace > Task Channels |
Auto Accept | Whether to Auto Accept tasks in the 'RAC' channel (true or false) |
Auto Dial | Whether to automatically StartOutboundDial for the 'RAC' channel tasks (true or false) |
After the above requirements have been met:
- Clone this repository
git clone https://github.com/randyjohnston/plugin-rac-callback
- Change into the
public
subdirectory of the repo and run the following:
cd plugin-rac-callback/public && mv appConfig.example.js appConfig.js
- Install dependencies
npm install
- Run the application
twilio flex:plugins:start
See Twilio Account Settings to locate the necessary environment variables.
- Navigate to http://localhost:3000
Once you have deployed the function, it is time to deploy the plugin to your Flex instance.
Run the following commands in the plugin root directory. We will leverage the Twilio CLI to build and deploy the Plugin.
-
Rename
.env.example
to.env
. -
Open
.env
with your text editor and modify theREACT_APP_{OPTION}
properties similarly to the example below.
plugin-rac-callback$ mv .env.example .env
# .env
REACT_APP_CHANNEL_UNIQUE_NAME=rac
REACT_APP_CHANNEL_AUTO_ACCEPT=false
REACT_APP_CHANNEL_AUTO_DIAL=true
- When you are ready to deploy the plugin, run the following in a command shell:
plugin-rac-callback$ twilio flex:plugins:deploy --major --changelog "Updating to use the latest Twilio CLI Flex plugin" --description "plugin rac callback"
- To enable the plugin on your contact center, follow the suggested next step on the deployment confirmation. To enable it via the Flex UI, see the Plugins Dashboard documentation.
For the plugin to display and function, the following task attributes are expected:
name
: Name of the task, such as"Callback: +15553214321"
callerId
: Outbound caller ID to use for the outbound call, such as"callerId": "+13084705049"
callbackDestination
: RAC requester's phone number to receive the outbound call, such as"+15553214321"
mainTimeZone
: The main time zone for the unlocalized date-time of the original request, such asEtc/UTC
orAmerica/Los_Angeles
(displayed on TaskInfoPanel in addition to the agent-localized date-time)utcDateTimeReceived
: An ISO 8601, UTC date-time stamp when the RAC was originally requested on the origin server, such as2022-02-11T22:24:49.427Z
direction
: This should beinbound
. The equivalentoutbound
task will be linked to the originalinbound
task for Insights reporting.
No warranty expressed or implied. Software is as is.