Menu

Releasing Flex plugins with the Plugins API

This document guides you through using the Plugins API to release Flex Plugins to your contact center.

Prerequisites

You must already have a plugin available and hosted somewhere. You will need its destination URL when creating a PluginVersion. For retrieving the destination URL of a plugin version already hosted, run the following command in the folder of your plugin.

This command will list all the versions of the Plugin you have deployed along with its destination URL.

$ npm run list

Our guide on configuring your local environment will help you use the Plugin Builder to build a plugin and deploy it using Twilio Assets.

Create a Plugin Resource

For a new plugin, you must first create a Plugin resource. We recommend using the same UniqueName that you used when creating your local plugin directory, such as plugin-sample. This Plugin entity will be used for all subsequent versions of the plugin that you plan to release.

Loading Code Sample...
        
        

        Create a Plugin Resource

        Create a Version

        Now, you can create a Version resource to indicate which version of the Plugin that you want to use in Flex. Use version 0.0.1, since that's the version of the deployed Sample Plugin.

        Loading Code Sample...
              
              

              Create a Version

              Create a Plugin Configuration

              You now have a Plugin with a Version. You can prepare to load it into Flex by including the returned Version SID in a Configuration. The Configuration describes all of the Plugins that we'll eventually want to release to Flex.

              Loading Code Sample...
                    
                    

                    Create a Configuration

                    Release the Configuration

                    For our purposes we're only deploying one plugin, but you could include many plugins in a single configuration. Once your configuration includes all of your plugins at the correct version, you can create a new Release.

                    Loading Code Sample...
                          
                          

                          Create a Release

                          Congratulations - your Plugin(s) should now be deployed!

                          You can confirm whether your plugin is enabled by logging into your Flex instance, navigating to the Developer Setup Page and seeing it listed under the Installed Plugins section. Or, just start playing around with the new Configuration in the Flex UI to see all of the Plugins you configured at work!

                          Next Steps

                          Rate this page:

                          Need some help?

                          We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.

                          Thank you for your feedback!

                          Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

                          Sending your feedback...
                          🎉 Thank you for your feedback!
                          Something went wrong. Please try again.

                          Thanks for your feedback!

                          thanks-feedback-gif