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.
To resolve this issue and successfully deploy Flows containing Agent Actions, you must separate the components and execute a sequential, two-phase deployment approach:
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.
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.
005384467

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.