Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Create a new release with new and updated Plugins


So, you've already created a Release that contains a few Plugin Versions. This guide takes you through the steps of how to roll out a new version of a plugin that is already active on your contact center or introduce a new plugin in your Flex contact center.

The recommended flow involves retrieving the currently active Release and the configuration associated with it. You can copy the list of current Plugins from the Configuration, and make your desired updates to the list. You need to then create a new Configuration, and finally, cut a new Release.

All of these steps can be accomplished via API - read on to get more detailed instructions.


Fetch The Active Release

fetch-the-active-release page anchor

Start by fetching the active Release. This will show you the current Configuration SID.

Fetch the Active Release

fetch-the-active-release-1 page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_18
// Download the helper library from https://www.twilio.com/docs/node/install
_18
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_18
_18
// Find your Account SID and Auth Token at twilio.com/console
_18
// and set the environment variables. See http://twil.io/secure
_18
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_18
const authToken = process.env.TWILIO_AUTH_TOKEN;
_18
const client = twilio(accountSid, authToken);
_18
_18
async function fetchPluginRelease() {
_18
const pluginRelease = await client.flexApi.v1
_18
.pluginReleases("Active")
_18
.fetch();
_18
_18
console.log(pluginRelease.sid);
_18
}
_18
_18
fetchPluginRelease();

Output

_10
{
_10
"sid": "Active",
_10
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10
"configuration_sid": "FJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10
"date_created": "2020-01-10T20:00:00Z",
_10
"url": "https://flex-api.twilio.com/v1/PluginService/Releases/FKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_10
}


Read the list of Plugins active on your Contact Center

read-the-list-of-plugins-active-on-your-contact-center page anchor

Start by fetching the active Release. This will show you the current Configuration SID. You can read the plugins active on Flex, by looking up the configuration by the Configuration SID

Fetch the Configuration associated with the Release

fetch-the-configuration-associated-with-the-release page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_18
// Download the helper library from https://www.twilio.com/docs/node/install
_18
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_18
_18
// Find your Account SID and Auth Token at twilio.com/console
_18
// and set the environment variables. See http://twil.io/secure
_18
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_18
const authToken = process.env.TWILIO_AUTH_TOKEN;
_18
const client = twilio(accountSid, authToken);
_18
_18
async function fetchPluginConfiguration() {
_18
const pluginConfiguration = await client.flexApi.v1
_18
.pluginConfigurations("FJXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
_18
.fetch();
_18
_18
console.log(pluginConfiguration.sid);
_18
}
_18
_18
fetchPluginConfiguration();

Output

_12
{
_12
"sid": "FJXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_12
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_12
"name": "some name",
_12
"description": "description",
_12
"archived": false,
_12
"date_created": "2020-01-10T20:00:00Z",
_12
"url": "https://flex-api.twilio.com/v1/PluginService/Configurations/FJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_12
"links": {
_12
"plugins": "https://flex-api.twilio.com/v1/PluginService/Configurations/FJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Plugins"
_12
}
_12
}

Retrieve List of Plugins

retrieve-list-of-plugins page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_18
// Download the helper library from https://www.twilio.com/docs/node/install
_18
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_18
_18
// Find your Account SID and Auth Token at twilio.com/console
_18
// and set the environment variables. See http://twil.io/secure
_18
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_18
const authToken = process.env.TWILIO_AUTH_TOKEN;
_18
const client = twilio(accountSid, authToken);
_18
_18
async function listConfiguredPlugin() {
_18
const plugins = await client.flexApi.v1
_18
.pluginConfigurations("FJ10000000000000000000000000000000")
_18
.plugins.list({ limit: 20 });
_18
_18
plugins.forEach((p) => console.log(p.accountSid));
_18
}
_18
_18
listConfiguredPlugin();

Output

_12
{
_12
"plugins": [],
_12
"meta": {
_12
"page": 0,
_12
"page_size": 50,
_12
"first_page_url": "https://flex-api.twilio.com/v1/PluginService/Configurations/FJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Plugins?PageSize=50&Page=0",
_12
"previous_page_url": null,
_12
"url": "https://flex-api.twilio.com/v1/PluginService/Configurations/FJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Plugins?PageSize=50&Page=0",
_12
"next_page_url": null,
_12
"key": "plugins"
_12
}
_12
}


Create a new Configuration

create-a-new-configuration page anchor

Use the information from the old configuration to create a new Configuration. In this case, add the new Plugin Version SID you want to roll out to your Flex account, to the list of existing SIDs.

You could also update or remove an existing Plugin Version from the list.

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_28
// Download the helper library from https://www.twilio.com/docs/node/install
_28
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_28
_28
// Find your Account SID and Auth Token at twilio.com/console
_28
// and set the environment variables. See http://twil.io/secure
_28
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_28
const authToken = process.env.TWILIO_AUTH_TOKEN;
_28
const client = twilio(accountSid, authToken);
_28
_28
async function createPluginConfiguration() {
_28
const pluginConfiguration =
_28
await client.flexApi.v1.pluginConfigurations.create({
_28
description: "This is a new configuration",
_28
name: "Name",
_28
plugins: [
_28
{
_28
plugin_version: "FV00000000000000000000000000000000",
_28
},
_28
{
_28
plugin_version: "FV10000000000000000000000000000001",
_28
},
_28
],
_28
});
_28
_28
console.log(pluginConfiguration.sid);
_28
}
_28
_28
createPluginConfiguration();

Output

_12
{
_12
"sid": "FJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_12
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_12
"name": "Name",
_12
"description": "This is a new configuration",
_12
"archived": false,
_12
"date_created": "2020-01-10T20:00:00Z",
_12
"url": "https://flex-api.twilio.com/v1/PluginService/Configurations/FJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_12
"links": {
_12
"plugins": "https://flex-api.twilio.com/v1/PluginService/Configurations/FJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Plugins"
_12
}
_12
}

Finally, you're ready to create a new Release.

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_18
// Download the helper library from https://www.twilio.com/docs/node/install
_18
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_18
_18
// Find your Account SID and Auth Token at twilio.com/console
_18
// and set the environment variables. See http://twil.io/secure
_18
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_18
const authToken = process.env.TWILIO_AUTH_TOKEN;
_18
const client = twilio(accountSid, authToken);
_18
_18
async function createPluginRelease() {
_18
const pluginRelease = await client.flexApi.v1.pluginReleases.create({
_18
configurationId: "FJ10000000000000000000000000000001",
_18
});
_18
_18
console.log(pluginRelease.sid);
_18
}
_18
_18
createPluginRelease();

Output

_10
{
_10
"sid": "FKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10
"configuration_sid": "FJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10
"date_created": "2020-01-10T20:00:00Z",
_10
"url": "https://flex-api.twilio.com/v1/PluginService/Releases/FKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_10
}

Congratulations - you've successfully rolled out new changes to your contact center, and should see your updated Plugins on the Developer Setup Page in Flex.


Learn how to roll back your Release to an older Release


Rate this page: