Loading

Deployment Strategy for Flows Containing Agent Actions

Publish Date: May 18, 2026
Description

Users may encounter validation errors when attempting to deploy a Flow containing an Agent Action across environments (e.g., from a Development org to a QA org). Specifically, the deployment halts with an error message indicating a restricted picklist field issue associated with the Agentforce Agent, ultimately causing the entire deployment package to fail.

Root Cause: 

This deployment failure occurs because the Flow references an Agentforce Agent that is not currently active in the destination environment. During the metadata deployment process, Salesforce enforces strict platform validation rules. If a Flow contains an Agent Action, the system verifies the status of the referenced Agent. If the associated Agent is either missing or inactive in the target org at the time of the Flow's metadata validation, the system cannot resolve the dependency, resulting in a failed deployment.

Crucially, attempting to deploy both the Agentforce Agent and the dependent Flow in the same deployment package will also result in this exact error. By default, Agentforce Agent metadata is deployed to the target environment in an inactive state. Therefore, during a combined deployment transaction, the Flow validation occurs while the newly deployed Agent is still inactive, instantly triggering the restricted picklist validation failure.

Resolution

To resolve this issue and successfully deploy Flows containing Agent Actions, you must separate the components and execute a sequential, two-phase deployment approach:

  1. Deploy and Activate the Agent: First, deploy only the Agentforce Agent metadata to the target organization. Once deployed, log in to the target org and manually change the Agent's status to Active.

  2. Deploy the Flow: After confirming the Agent is in an active state within the target organization, proceed to deploy the Flow containing the associated Agent Actions in a subsequent deployment. Because the active Agent now exists in the target environment, the platform validation requirements will be met, and the Flow deployment will succeed.

Knowledge Article Number

005384467

 
Loading
Salesforce Help | Article