Flows

Complex dialogs often involve multiple conversation topics.For example, a pizza delivery agent may havefood order,customer information, andconfirmationas distinct topics.Each topic requires multiple conversational turns for an agentto acquire the relevant information from the end-user.

Flowsare used to define these topics and the associated conversational paths.Every agent has one flow called theDefault Start Flow.This single flow may be all you need for a simple agent.More complicated agents may require additional flows,and different development team members can be responsible for buildingand maintaining these flows.For example, the flows of a pizza delivery agent may look like the following:

Example multi-flow diagram.

Default start flow

When you create an agent,theDefault Start Flow is created automatically.For a simple agent,you can use this flow as your only flow.For more complex agents,you can add more flows,and the default start flow can be usedas a simple entry point to the conversation.

Note: TheDefault Start Flow cannot be deleted.

When using the API,you can reference the default start flow with the following flow ID:

00000000-0000-0000-0000-000000000000

Flow start page

Every flow has a special page namedStart in the console.When a flow is selected in the console,the start page is shown as a node on the graph.When a flow initially becomes active,this page becomes the current, active page.

A start page does not have parameters or responses messages like normal pages.However, you can send a message by using one of the following approaches:

Reference start page in API requests

To reference a flow's start page in runtime API requests, useSTART_PAGE as apage ID.

To make design-time changes to a start page through the API, use theget andpatch/update API methods for theFlow type.

Select a protocol and version for the Flow reference:

ProtocolV3V3beta1
RESTFlow resourceFlow resource
RPCFlow interfaceFlow interface
C++FlowsClient Not available
C#FlowsClient Not available
GoFlowsClient Not available
JavaFlowsClientFlowsClient
Node.jsFlowsClientFlowsClient
PHP Not available Not available
PythonFlowsClientFlowsClient
Ruby Not available Not available

Create a flow

To create a flow:

Console

  1. Open theDialogflow CX console.
  2. Choose your Google Cloud project.
  3. Select your agent.
  4. Click the addbutton in theFlows section.
  5. SelectCreate flow.
  6. Enter a display name for your flow.
  7. Click the flow you just created.

API

See thecreate method for theFlow type.

Select a protocol and version for the Flow reference:

ProtocolV3V3beta1
RESTFlow resourceFlow resource
RPCFlow interfaceFlow interface
C++FlowsClient Not available
C#FlowsClient Not available
GoFlowsClient Not available
JavaFlowsClientFlowsClient
Node.jsFlowsClientFlowsClient
PHP Not available Not available
PythonFlowsClientFlowsClient
Ruby Not available Not available

Flow data

To access a flow's data:

Console

  1. Open theDialogflow CX console.
  2. Choose the Google Cloud project for the agent.
  3. Find the agent in the list.
  4. Click the agent display name.
  5. Click the flow in theFlows section.
  6. The flow's pages are populated in thePages section.See thepages guidefor information on editing pages.
  7. Click the flow in the graph.
  8. A flow edit panel appears.Use this panel to browse and edit additional flow data.
  9. ClickSave to save any changes.

API

For flows, see theget andpatch/update for theFlow type.

Select a protocol and version for the Flow reference:

ProtocolV3V3beta1
RESTFlow resourceFlow resource
RPCFlow interfaceFlow interface
C++FlowsClient Not available
C#FlowsClient Not available
GoFlowsClient Not available
JavaFlowsClientFlowsClient
Node.jsFlowsClientFlowsClient
PHP Not available Not available
PythonFlowsClientFlowsClient
Ruby Not available Not available
For pages, see theget andpatch/update methods for thePage type.

Select a protocol and version for the Page reference:

ProtocolV3V3beta1
RESTPage resourcePage resource
RPCPage interfacePage interface
C++PagesClient Not available
C#PagesClient Not available
GoPagesClient Not available
JavaPagesClientPagesClient
Node.jsPagesClientPagesClient
PHP Not available Not available
PythonPagesClientPagesClient
Ruby Not available Not available

The following data is associated with flows:

For more information about how data is applied at varying levels, see thedata application levels.

Flow settings

The following settings are available for flows:

For more information about how data is applied at varying levels, see thedata application levels.

To access flow settings:

Console

  1. Open theDialogflow CX console.
  2. Choose your Google Cloud project.
  3. Select your agent.
  4. Hover your mouse over the flow in theFlows section.
  5. Click the optionsbutton.
  6. SelectFlow settings.
  7. Browse or edit settings.
  8. ClickSave to save any changes.

API

See theget andpatch/update methods for theFlow type.

Select a protocol and version for the Flow reference:

ProtocolV3V3beta1
RESTFlow resourceFlow resource
RPCFlow interfaceFlow interface
C++FlowsClient Not available
C#FlowsClient Not available
GoFlowsClient Not available
JavaFlowsClientFlowsClient
Node.jsFlowsClientFlowsClient
PHP Not available Not available
PythonFlowsClientFlowsClient
Ruby Not available Not available

Delete a flow

To delete a flow:

Console

  1. Open theDialogflow CX console.
  2. Choose your Google Cloud project.
  3. Select your agent.
  4. Hover your mouse over the flow in theFlows section.
  5. Click the settingsbutton.
  6. SelectDelete.

API

See thedelete method for theFlow type.

Select a protocol and version for the Flow reference:

ProtocolV3V3beta1
RESTFlow resourceFlow resource
RPCFlow interfaceFlow interface
C++FlowsClient Not available
C#FlowsClient Not available
GoFlowsClient Not available
JavaFlowsClientFlowsClient
Node.jsFlowsClientFlowsClient
PHP Not available Not available
PythonFlowsClientFlowsClient
Ruby Not available Not available

Train a flow

To train a flow:

Console

  1. Open theDialogflow CX console.
  2. Choose your Google Cloud project.
  3. Select your agent.
  4. ClickAgent Settings.
  5. Open theML tab.
  6. To train a single flow, clickTrain in the corresponding row.
  7. To train multiple flows, select them with checkboxs, thenclickTrain selected flow NLU model.

API

See thetrain method for theFlow type.

Select a protocol and version for the Flow reference:

ProtocolV3V3beta1
RESTFlow resourceFlow resource
RPCFlow interfaceFlow interface
C++FlowsClient Not available
C#FlowsClient Not available
GoFlowsClient Not available
JavaFlowsClientFlowsClient
Node.jsFlowsClientFlowsClient
PHP Not available Not available
PythonFlowsClientFlowsClient
Ruby Not available Not available

Export a flow

You can export a flow in two ways:

  • Data export:This exports your flow as raw data,so it can be imported to any agent.When you export a flow,the resources referenced by the flow (intents, entities, webhooks)are also exported.When following steps below,choose theraw data data format.

  • Diagram export (Preview):This exports your flow as a visual diagram.The export format is draw.io XML,so you can import the diagram inLucidchart,diagrams.net,or any other diagram tool that can import the draw.io format.When following steps below,choose theXML data format.

    Note:Diagram export is not available for agents usingCMEK.

You can export a flow with the following options:

  • Include referenced flows:Exports the target flow and all levels of referenced flows. Referenced flows include the flows that the target flow is referencing in addition to flows referenced by subsequent referenced flows, with no maximum depth.During import, all of the exported flows will be imported and the transitionsbetween these flows will be preserved.

To export a flow:

Console

  1. Open theDialogflow CX console.
  2. Choose your Google Cloud project.
  3. Select your agent.
  4. Hover your mouse over the flow in theFlows section.
  5. Click the optionsbutton.
  6. SelectExport flow.
  7. Follow instructions to complete.

API

See theexport method for theFlow type.

Select a protocol and version for the Flow reference:

ProtocolV3V3beta1
RESTFlow resourceFlow resource
RPCFlow interfaceFlow interface
C++FlowsClient Not available
C#FlowsClient Not available
GoFlowsClient Not available
JavaFlowsClientFlowsClient
Node.jsFlowsClientFlowsClient
PHP Not available Not available
PythonFlowsClientFlowsClient
Ruby Not available Not available

Import a flow

When you import a flow from a source agent to a target agent,the global resources referenced by the flow (intents, entities, webhooks)are imported along with the flow-specific data.If the target agent has any global resourceswith the same display names found in the source agent,Conversational Agents (Dialogflow CX) provides a summary of these resources,along with three options to resolve the conflictsfor these resources:

  • Replace existing resources:Source agent resources will overwrite target agent resources.
  • Import as new resources:Source agent resources will be added with a distinctive suffix in the name.
  • Keep original resources:Target agent resources will be unchanged.

To import a flow:

Console

  1. Open theDialogflow CX console.
  2. Choose your Google Cloud project.
  3. Select your agent.
  4. Click the addbutton in theFlows section.
  5. SelectImport flow.
  6. Follow instructions to complete.

API

See theimport method for theFlow type.

Select a protocol and version for the Flow reference:

ProtocolV3V3beta1
RESTFlow resourceFlow resource
RPCFlow interfaceFlow interface
C++FlowsClient Not available
C#FlowsClient Not available
GoFlowsClient Not available
JavaFlowsClientFlowsClient
Node.jsFlowsClientFlowsClient
PHP Not available Not available
PythonFlowsClientFlowsClient
Ruby Not available Not available

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-15 UTC.