Export and import bots using solutions
There is additional information available for people using Power Virtual Agents (preview).
Select the version of Power Virtual Agents you're using here:
This can be useful if you use different environments for different purposes, or you employ ring-deployment methodologies. For example, you might have a specific environment where you internally test and validate bots, another environment where you test bots for only a subset of users, and a final production environment where you share bots with customers and end users.
You can't export topic-level or node-level comments when you export a bot.
- Learn more about what you can do with Power Virtual Agents.
- A maker will require the minimum System Customizer security roles to use this feature. Learn more about configuring user security to resources in an environment.
Add a bot to a solution
You use solutions to export bots from one environment and import them into another. The solution acts as a "carrier" for the bots, and you can import multiple bots in one solution.
Create a solution to manage export and import
Sign in to the Power Virtual Agents bot you want to export.
Select Settings, and then select General settings.
Under Export/import bot, select Go to Power Apps Solutions.
Sign in to Power Apps, go to the Solutions tab, and select New solution. Enter the information for each of the fields as described in this table, then select Create.
Field Description Display name The name that is shown in the list of solutions. You can change this later. Name The unique name of the solution. This is generated using the value you enter in the Display name field. You can edit this before you save the solution, but after you save the solution, you can’t change it. Publisher You can select the default publisher or create a new publisher. We recommend that you create a publisher that you can use consistently across the environments where you'll use the solution. For more information, go to Solution publisher overview. Version Enter a number for the version of your solution. This is only important if you export your solution. The version number will be included in the file name when you export the solution.
Add your bot to the solution
Select the solution you just created.
Select Add existing and choose Chatbot.
On the Add existing chatbots pane, select the bot (or bots) you want to export. Select Add.
If you're using skills, remove the skill's environment variables Current Value by selecting Remove from this solution.
Removing a bot from a solution doesn't remove its components from a solution. Removal of the components should be done separately.
Do not remove any unmanaged chatbot subcomponents (such as bot topics) directly from the Power Apps portal, unless you have removed the bot itself from the solution.
You should only make changes to topics from within the Power Virtual Agents portal.
Removing or changing the chatbot subcomponents from within Power Apps will cause the export and import to fail.
Export and import bots
You export and import bots by exporting and importing their containing solutions from one environment to another.
Export the solution with your bot
In the list of solutions, select the solution that contains the bot you want to export. Select Export.
You can't export managed solutions. When you create a solution, by default it will not be managed. If you change it to a managed solution you won't be able to export it, and will need to create a new solution.
If your bot has a large number of components (for example, more than 250 topics or more than 100 entities), export the bot using classic Power Apps portal instead.
Select Next in the Before you export pane.
The Export this solution pane appears. Enter or select from the following options, and then select Export:
Option Description Version number Power Virtual Agents automatically increments your solution version while displaying the current version. You can accept the default version or enter your own. Export as Select the package type, either Managed or Unmanaged. Learn more about managed and unmanaged solutions.
The export can take several minutes to complete. Once finished, a .zip file will be downloaded by your web browser. The file will be in the format
Import the solution with your bot
On the top menu, select the environment name and select the environment where you want to import your bot.
Go to the Solutions tab, and on the command bar, select Import.
In the Select Solution Package window, select Choose File and locate the .zip file that contains the solution with the bot you want to import.
Information about the solution is displayed. Select Import.
You might need to wait a few moments while the import completes. View the results and then select Close.
If the import isn’t successful, you'll see a report showing any errors or warnings that were captured. Select Download Log File to capture details about what caused the import to fail in an XML file.
The most common cause for an import to fail is that the solution didn't contain some required components. For example, you might not have any upgraded bots in the environment.
If your bot has any of the following, you need to configure them after importing for the first time:
End-user authentication: Configure end-user authentication in the bot so it can take actions on the user’s behalf. The bot can be set up with any OAuth2 identity provider, such as Azure Active Directory (Azure AD), a Microsoft account, or Facebook.
Customer service hand-off: Configure external services that hand off bot escalations to a human agent.
Multichannel: Configure external channels, such as Facebook and Microsoft Teams:
Use the filter menu to select Chatbot. You can then select the bot's name to open the bot in the Power Virtual Agents portal. You can also navigate to the Power Virtual Agents web app directly and open the imported bot under the environment you imported to. You will also see the bot’s current solution name for easy access to solutions.
- You must publish your newly imported bot before it can be shared.
- It may take up to 24 hours for your bot's icon to appear everywhere.
Add new components to a chatbot custom solution
If you add new bot components (such as new topics or flows) to your bot in Power Virtual Agents, you will also need to add those components to the bot in your unmanaged solution.
Go to your unmanaged solution in the Power Apps portal.
Select Chatbots and find your bot in the list.
Select the vertical three dots, then select Add required objects.
Upgrade or update a solution with a chatbot
To update or upgrade an existing managed solution, go to Upgrade or update a solution.
Remove an unmanaged layer from a managed chatbot
Managed and unmanaged solutions exist at different levels within a Microsoft Dataverse environment. To learn more, go to Solution layers.
A managed component (for example, a topic or flow) gets an unmanaged "Active" layer when you edit it, which means you won't see the latest changes after you deploy the solution.
To show the latest updates, you'll need to remove the unmanaged "Active" layer.
Use the See solution layers option to see all solutions that a component is a part of. You can also see one "Active" solution on top of all other solutions if you have changed something directly.
Select See solution layers from the contextual ... menu next to the component name.
In the Solution layer page, select the unmanaged layer and then select Remove unmanaged layer to remove the layer.
Submit and view feedback for