Skip to contentSkip to navigationSkip to topbar
Page toolsOn this page
Looking for more inspiration?Visit the

Create a new release with new and updated Plugins


To roll out a new version of a plugin that is already active on your contact center, or to introduce a new plugin, retrieve the active Release and its Configuration, update the list of Plugin Versions, create a new Configuration, and create a new Release. This guide takes you through each step using the Plugins API.


Fetch the active Release

fetch-the-active-release page anchor

Fetch the active Release to find the current Configuration SID.

Fetch the Active ReleaseLink to code sample: Fetch the Active Release
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function fetchPluginRelease() {
11
const pluginRelease = await client.flexApi.v1
12
.pluginReleases("Active")
13
.fetch();
14
15
console.log(pluginRelease.sid);
16
}
17
18
fetchPluginRelease();

Response

Note about this response
1
{
2
"sid": "Active",
3
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4
"configuration_sid": "FJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5
"date_created": "2020-01-10T20:00:00Z",
6
"url": "https://flex-api.twilio.com/v1/PluginService/Releases/FKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
7
}

Read the list of Plugins active on your Contact Center

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

Read the plugins active on Flex by looking up the Configuration with the Configuration SID from the active Release.

Fetch the Configuration associated with the ReleaseLink to code sample: Fetch the Configuration associated with the Release
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function fetchPluginConfiguration() {
11
const pluginConfiguration = await client.flexApi.v1
12
.pluginConfigurations("FJXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
13
.fetch();
14
15
console.log(pluginConfiguration.sid);
16
}
17
18
fetchPluginConfiguration();

Response

Note about this response
1
{
2
"sid": "FJXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
3
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4
"name": "some name",
5
"description": "description",
6
"archived": false,
7
"date_created": "2020-01-10T20:00:00Z",
8
"url": "https://flex-api.twilio.com/v1/PluginService/Configurations/FJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
9
"links": {
10
"plugins": "https://flex-api.twilio.com/v1/PluginService/Configurations/FJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Plugins"
11
}
12
}
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function listConfiguredPlugin() {
11
const plugins = await client.flexApi.v1
12
.pluginConfigurations("FJ10000000000000000000000000000000")
13
.plugins.list({ limit: 20 });
14
15
plugins.forEach((p) => console.log(p.accountSid));
16
}
17
18
listConfiguredPlugin();

Response

Note about this response
1
{
2
"plugins": [],
3
"meta": {
4
"page": 0,
5
"page_size": 50,
6
"first_page_url": "https://flex-api.twilio.com/v1/PluginService/Configurations/FJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Plugins?PageSize=50&Page=0",
7
"previous_page_url": null,
8
"url": "https://flex-api.twilio.com/v1/PluginService/Configurations/FJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Plugins?PageSize=50&Page=0",
9
"next_page_url": null,
10
"key": "plugins"
11
}
12
}

Create a new Configuration

create-a-new-configuration page anchor

Create a new Configuration using the information from the old configuration. 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.

1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function createPluginConfiguration() {
11
const pluginConfiguration =
12
await client.flexApi.v1.pluginConfigurations.create({
13
description: "This is a new configuration",
14
name: "Miss Christine Morgan",
15
plugins: [
16
{
17
plugin_version: "FV00000000000000000000000000000000",
18
},
19
{
20
plugin_version: "FV10000000000000000000000000000001",
21
},
22
],
23
});
24
25
console.log(pluginConfiguration.sid);
26
}
27
28
createPluginConfiguration();

Response

Note about this response
1
{
2
"sid": "FJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4
"name": "Miss Christine Morgan",
5
"description": "This is a new configuration",
6
"archived": false,
7
"date_created": "2020-01-10T20:00:00Z",
8
"url": "https://flex-api.twilio.com/v1/PluginService/Configurations/FJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
9
"links": {
10
"plugins": "https://flex-api.twilio.com/v1/PluginService/Configurations/FJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Plugins"
11
}
12
}

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

1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function createPluginRelease() {
11
const pluginRelease = await client.flexApi.v1.pluginReleases.create({
12
configurationId: "FJ10000000000000000000000000000001",
13
});
14
15
console.log(pluginRelease.sid);
16
}
17
18
createPluginRelease();

Response

Note about this response
1
{
2
"sid": "FKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4
"configuration_sid": "FJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5
"date_created": "2020-01-10T20:00:00Z",
6
"url": "https://flex-api.twilio.com/v1/PluginService/Releases/FKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
7
}

You've rolled out new changes to your contact center. Your updated Plugins appear on the Developer Setup Page in Flex.


Learn how to roll back your Release to an older Release