Migrating Power Virtual Agent Bots across environments

Introduction

A bot that has been created in one environment may need to be used in other tenants as well to enforce reusability or because we are moving it from the Dev to the Prod environment.

Power Platform provides the capability to export and import bots using Solutions so that bots can work across multiple tenants with almost zero rework.

Note: The bot maker will require the minimum System Customizer security roles to use this feature.

Add bots to Solution

We will be making use of Solutions which acts as a container for one or more bots. In effect, we won’t export the bot, but the entire solution is exported. Let’s create a solution by heading over to the Gear icon and select General.

Graphical user interface, text, application, email

Description automatically generated

Click on Go to Power Apps Solution which will take us to Power Apps. Click on New Solution and provide the details using which the solution will be created.

Graphical user interface, text, application

Description automatically generated

Once the solution is created, click on the “Add existing” drop-down and select Chatbot so that we can browse and add the bot that we are trying to export.

Graphical user interface, application

Description automatically generated

Select the bot and click on Add.

Table

Description automatically generated

Export the Solution

To export the Bot, we will go to the Solutions tab and select our Solution where the bot has been added and click on Export.

Graphical user interface, application

Description automatically generated

Based on the destination to which the bot is being exported select either manager or unmanaged option. Unmanaged solutions are used in development environments while you make changes to your application. Managed solutions are used to deploy to any environment that isn’t a development environment for that solution like UAT or Prod.

Graphical user interface, text, application

Description automatically generated

Import Solution

Now let’s head over to the new tenant where we want to import the solution. Visit make.powerapps.com and select the Import option from the Solutions tab

Graphical user interface, application

Description automatically generated

It will open a left pane from where you can browse and select the previously exported zip file. Click on Import.

Graphical user interface, text, application

Description automatically generated

We can see the bot in the imported solution in the new tenant

Graphical user interface, text, application

Description automatically generated

Now let’s head over to Power Virtual agents in the new tenant. Click on the Bot icon in the top right corner and it will list out the available bots here we can see the recently imported bot.

Graphical user interface, text, application

Description automatically generated

Test the Imported Bot

Doing a quick test of the bot, we can see that it works as expected even without making any further changes.

Graphical user interface, text, application, chat or text message

Description automatically generated

Summary

Thus, we saw how to export a bot using solutions and get it to work in another tenant by importing the bit along with the solution

Related Articles

Author

Author

Priyaranjan KS is a Modern Workplace Architect primarily focused on developing and architecting solutions around Office 365,Power Platform and Azure.He is also a Microsoft Most Valuable Professional(MVP) and a Microsoft Certified Trainer(MCT)

Latest Articles