Use Google Cloud Dialogflow environments in Architect
Google Cloud Dialogflow environments enable you to create multiple versions of your Dialogflow agent and then publish them to separate environments. To call a Google Cloud Dialogflow environment at runtime, depending on your implementation choose it within an Architect Call Dialogflow Bot action or Call Dialogflow CX action. A Draft environment is always available for a Dialogflow agent. If you do not create another environment for a Cloud Dialogflow agent, then Draft is the only selectable environment. If other environments exist, then those published environments, in addition to Draft, appear in the list. For more information, see Google Cloud Versions and Environments (ES) and Google Cloud Versions and environments (CX).
During design time, Architect always uses the intents and slots that are associated with the Draft environment, even if you choose an environment that has different intents and slots defined within Dialogflow. Therefore, depending on the selected environment, removing intents from the draft version of an agent can have implications.
Implications of removing intents for a Google Cloud Dialogflow ES agent
If you choose an environment in the Call Dialogflow bot action and remove intents from the draft version of the agent, then the flow takes the failure path. This action occurs because the flow cannot reach the deleted intents. Therefore, even though the agent fulfills the intent, the flow takes the failure path.
To ensure that the Draft environment always includes the entire set of intents in the published environment, only add intents during the life cycle of an agent throughout various environments. Do not remove them. You can also export the agent configuration into a new agent and then set the intents as appropriate. Then, update the Architect flow to reference the new agent.
For example, if you treat Dialogflow ES agents in an add-only manner but want to remove an intent, create a new agent. Export the current agent’s configuration into a new Google Cloud Dialogflow ES agent, then remove intents and slots as appropriate. Then, reference the new agent from the Architect flow instead. Going forward, follow the add-only approach described previously.