Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Deploy agents in sandbox or test environments before deploying them in production. This approach ensures they function correctly and helps you avoid potential disruptions to your business operations.
In Dynamics 365 Sales, use the Application Lifecycle Management (ALM) capabilities of Power Platform to export and import agent solutions across environments. Export the agent solution from a source environment, like a sandbox or test environment, and then import it into the target environment, typically production.
Use this procedure to import a sales agent solution such as Sales Qualification Agent, Sales Opportunity Agent, Sales Close Agent, or Data Enrichment Agent into a target environment.
Best practices
Create one solution per agent profile to ensure each profile can be packaged and deployed independently. Including multiple profiles in a single solution might result in exporting unintended or untested changes.
Use organization-agnostic filters in selection criteria so profiles continue to work after migration to another environment. Otherwise, you might need to manually update the filters after import.
Export the agent as a solution
Export the agent from the source environment as a solution. During the export process, you can choose to include all the components of the agent or select specific components to include in the solution. After the export is complete, you have a solution file to import into the target environment.
In the source environment, go to the Power Apps maker portal.
Select the environment that contains the agent you want to export.
In the left navigation pane, select Solutions.
Select New solution to create a solution and enter the necessary details such as name, publisher, and version.
Add required components.
Select Add existing > More > Other and then add the following components:- SalesAgentProfile. When you create the agent, a corresponding agent profile is automatically created. In the Add existing SalesAgentProfile pane, select the agent profile from the list of existing agent profiles.
- SalesAgentConfigurationV2. When you create the agent, corresponding agent configurations are automatically created with the same name as the agent profile. In the Add existing SalesAgentConfigurationV2 pane, select the agent configuration that has the same name as the agent profile you selected.
- Sequence (for Sales Qualification Agent only). When you create the Sales Qualification Agent, a corresponding sequence record is automatically created in the sequence component. In the Add existing Sequence pane, select the sequence record with the name AgenticSequence.
Add knowledge sources.
Note
This step isn't applicable for Data Enrichment Agent.
Select Add existing > Agent > Agent and then add agents that contain knowledge sources relevant to the agent you want to export. For example, if you're exporting the Sales Opportunity Agent - Account Research, knowledge sources related to account research are automatically added as part of the agent component. Each agent type requires a specific set of agents in the solution. The following table shows the agents you need to add for each agent solution.
Sales agent solution type Agents to add Sales Qualification Agent D365 Sales Agent - Research
D365 Sales Agent - Competitor
D365 Sales Agent - Custom Research
D365 Sales Agent - Readiness
D365 Sales Agent - Email Validation
D365 Sales Agent - Outreach
D365 Sales Agent - Engage Autonomous
D365 Sales Agent - TCP Prefill Agent
D365 Sales Agent - Stakeholder Research
D365 Sales Agent - Engage Autonomous
D365 Sales Agent - Summary SynthesizerSales Opportunity Agent Sales Opportunity Agent
Sales Opportunity Agent - Account Research
Sales Opportunity Agent - Compete Research
Sales Opportunity Agent - Custom Research
Sales Opportunity Agent - StakeholderSales Close Agent Sales Close Agent The following image shows an example of the added components for Sales Qualification Agent.
Save and publish the customizations.
Select Export to export the solution and save it to a location on your computer.
During the export process, choose the solution as managed solution. A managed solution is typically used for production environments. For more information about exporting solutions, see Export solutions.
Import the agent solution into the target environment
Import the exported solution file into the target environment. During the import process, you can choose to overwrite any existing components in the target environment that have the same name as those in the solution. After the import is complete, the agent is available in the target environment.
Note
- The agent is always imported in draft state.
- When you open the imported agent, select Apply changes to ensure that all the components of the agent are correctly applied in the target environment.
Import the solution
- Go to the Power Apps maker portal in the target environment.
- Select the target environment where you want to import the agent solution.
- In the left navigation pane, select Solutions.
- Select Import solution and upload the solution file you exported from the source environment.
For more information, see Import solutions. - Follow the prompts to complete the import process. During the import, choose to overwrite any existing components in the target environment that have the same name as those in the solution. This option ensures that the agent components are updated with the ones from the source environment. The solution is imported to the target environment and is listed in the AI agents page in your environment.
Configure and start the agent
After you import the solution, the agent is imported in draft state. Open the agent and configure environment‑specific settings before starting the agent. Configuring and starting the agent is different for Sales Qualification Agent, Sales Opportunity Agent, Sales Close Agent, and Data Enrichment Agent. Follow the corresponding steps based on the type of agent you imported:
For Sales Qualification Agent, Sales Opportunity Agent, and Sales Close Agent
Create the following components manually in the target environment, as they're environment-specific and aren't included in the exported solution:
- Dataverse application user
- Required application registrations
Configure the prerequisites. The exported solution doesn't include prerequisites because they often contain environment‑specific values that might differ between source and target environments.
- For Sales Qualification Agent, see Configure requirements for Sales Qualification Agent.
- For Sales Opportunity Agent, see Configure requirements for Sales Opportunity Agent.
- For Sales Close Agent, see Configure requirements for Sales Close Agent.
Select the application user. Application users differ between source and target environments.
- Go to the imported agent configuration page.
- In the agent profile settings page, select the Dataverse application user created for this agent.
Review assignment rules or selection criteria. Some assignment‑related values configured in the source environment might not resolve correctly in the target environment. For example, if the assignment rule is based on a team or user that doesn't exist in the target environment, update the rule to ensure it functions correctly.
- Open the Assignment rules settings page.
- Update any unresolved or incorrect values and text to ensure the assignment rules work as expected in the target environment.
Verify knowledge sources. Knowledge sources automatically appear after solution import if they were added to the corresponding bots in the source environment. However, the content within those knowledge sources might differ between environments. For example, if a SharePoint document library was used as a knowledge source in the source environment, the same document library might not be available in the target environment. Update the knowledge sources to point to the correct content in the target environment.
- Open the Knowledge sources settings page.
- Verify that all configured knowledge sources are available. If any knowledge source is missing or not correctly configured, update it to ensure the agent has access to the necessary information.
Activate the agent. After updating the environment‑specific settings, save and start the agent.
For Data Enrichment Agent
Configure the prerequisites. The exported solution doesn't include prerequisites because they often contain environment‑specific values that might differ between source and target environments. See Configure prerequisites for more information.
Review record selection rules. Some values in the record selection rules might not resolve correctly in the target environment. For example, if the rule is based on a team or user that doesn't exist in the target environment, update the rule to ensure it functions correctly.
- In the configuration page, go to the Record selection settings page.
- Update any unresolved or incorrect values to ensure the record selection rules work as expected in the target environment.
To learn more about record selection, see Select records for enrichment.
Verify user access. User access to the agent might differ between source and target environments. Ensure that users in the target environment have the necessary permissions to access and use the agent.
- In the configuration page, go to the User access settings page.
- Verify that all users who need access to the agent have the appropriate permissions.
To learn more about user access, see Configure user access.
Verify field scope. The fields selected for enrichment in the source environment might not be the same as those in the target environment. Review the selected fields to ensure they align with the requirements in the target environment.
- In the configuration page, go to the Agent behavior settings page.
- In the Field scope section, review the selected fields and update them if necessary to ensure the agent enriches the correct data in the target environment.
To learn more about field scope, see Configure agent behavior.
Activate the agent. After updating the environment‑specific settings, save and start the agent.