This Twilio Flex Plugin enables your agents to write a summary on task. The summary will be saved into interactions timeline and shown to agents on the next customer contact. To save a big portion of time on writing summary we use GPT Chat API providing the chat transcript and asking to summarise the chat in once sentence.
To learn more about developing plugins on your Flex instance, refer to the getting started guide.
This Plugin uses following Twilio Products. It is easy to have it running quickly!
- It uses Twilio Functions to run the code to generate summary and update/get timeline;
- It uses Twilio Sync to store the timeline for each contact;
- It uses the new Twilio Paste - a UI library from Twilio which is the base for all future Flex Plugins;
To generate the summary plugin uses OpenAI GPT3 chat SDK.
You need to enable Flex UI 2.0, the newest version of Flex!
We have to install 2 assets:
- The Twilio Functions (back-end)
- The Flex Plugin (front-end)
- clone this repo;
- execute
cd ./functions
to go to the Twilio Functions folder. npm install
to install the packages into your computer.- rename
.env-example
from this folder to.env
and follow the instructions in the.env
file. npm run deploy
to deploy the functions to your Twilio environment.- Note the functions' domain in the output, you will need it to configure Plugin env.
- execute
cd ..
to go to the Plugin folder root. npm install
to install the packages into your computer.- rename
.env-example
from this folder to.env
and follow the instructions in the.env
file. - You need to have the Twilio CLI. Type
twilio
in your terminal to see if you have it, if not, install it now. - You need the Flex Plugins CLI . Type
twilio plugins
to make sure you have it, if not, install it. - You need to create a new profile for your Twilio CLI, type
twilio profiles:list
to check if you are using it correctly. If not, add a new profile with the cmdtwilio profiles:add
. npm run deploy -- --changelog "first deployment!"
to deploy this Plugin.- Once step 7 is finished, it will show the next steps, you will have to run the command mentioned there (something like
twilio flex:plugins:release ... etc etc
) - We are done! Go to https://flex.twilio.com - Once chat is ended should see a new component with generated summary. On the right side you will also see the Interactions Timeline for the contact.
Contributions of all kinds are welcome!