Join the Dialogflow CX competition! Get trained in Dialogflow CX, work on open-source conversational components, get a free Dialogflow t-shirt and win cool prizes! Learn more.

Flows

Complex dialogs often involve multiple conversation topics. For example, a pizza delivery agent may have food order, customer information, and confirmation as distinct topics. Each topic requires multiple conversational turns for an agent to acquire the relevant information from the end-user.

Flows are used to define these topics and the associated conversational paths. Every agent has one flow called the Default 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 building and maintaining these flows. For example, the flows of a pizza delivery agent may look like the following:

Example multi-flow diagram.

Dialogflow CX flows serve a similar purpose as sub-agents for Dialogflow ES mega agents. Flows provide better conversation control, and they do not incur additional cost.

Default start flow

When you create an agent, the Default 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 used as a simple entry point to the conversation.

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 named Start 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:

When using the API, you can reference a flow's start page with the following page ID:

START_PAGE

Create a flow

To create a flow:

Console

  1. Open the Dialogflow CX Console.
  2. Choose your GCP project.
  3. Select your agent.
  4. Click the add button in the Flows section.
  5. Select Create flow.
  6. Enter a display name for your flow.
  7. Click the flow you just created.

API

See the create method for the Flow type.

Select a protocol and version for the Flow reference:

Protocol V3 V3beta1
REST Flow resource Flow resource
RPC Flow interface Flow interface
C# Not available Not available
Go Not available Not available
Java FlowsClient FlowsClient
Node.js FlowsClient FlowsClient
PHP Not available Not available
Python FlowsClient FlowsClient
Ruby Not available Not available

Flow data

To access a flow's data:

Console

  1. Open the Dialogflow CX Console.
  2. Choose the GCP project for the agent.
  3. Find the agent in the list.
  4. Click the agent display name.
  5. Click the flow in the Flows section.
  6. The flow's pages are populated in the Pages section. See the pages guide for 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. Click Save to save any changes.

API

For flows, see the get and patch/update for the Flow type.

Select a protocol and version for the Flow reference:

Protocol V3 V3beta1
REST Flow resource Flow resource
RPC Flow interface Flow interface
C# Not available Not available
Go Not available Not available
Java FlowsClient FlowsClient
Node.js FlowsClient FlowsClient
PHP Not available Not available
Python FlowsClient FlowsClient
Ruby Not available Not available
For pages, see the get and patch/update methods for the Page type.

Select a protocol and version for the Page reference:

Protocol V3 V3beta1
REST Page resource Page resource
RPC Page interface Page interface
C# Not available Not available
Go Not available Not available
Java PagesClient PagesClient
Node.js PagesClient PagesClient
PHP Not available Not available
Python PagesClient PagesClient
Ruby Not available Not available

The following data is associated with flows:

Flow settings

The following settings are available for flows:

  • Display name: A human-readable name for the flow.
  • Description: A description for the flow.
  • ML settings Flow ML settings are also accessed and described in agent ML settings.
  • Advanced speech settings: These speech settings can optionally override the same agent speech settings.

To access flow settings:

Console

  1. Open the Dialogflow CX Console.
  2. Choose your GCP project.
  3. Select your agent.
  4. Hover your mouse over the flow in the Flows section.
  5. Click the options button.
  6. Select Flow settings.
  7. Browse or edit settings.
  8. Click Save to save any changes.

API

See the get and patch/update methods for the Flow type.

Select a protocol and version for the Flow reference:

Protocol V3 V3beta1
REST Flow resource Flow resource
RPC Flow interface Flow interface
C# Not available Not available
Go Not available Not available
Java FlowsClient FlowsClient
Node.js FlowsClient FlowsClient
PHP Not available Not available
Python FlowsClient FlowsClient
Ruby Not available Not available

Delete a flow

To delete a flow:

Console

  1. Open the Dialogflow CX Console.
  2. Choose your GCP project.
  3. Select your agent.
  4. Hover your mouse over the flow in the Flows section.
  5. Click the settings button.
  6. Select Delete.

API

See the delete method for the Flow type.

Select a protocol and version for the Flow reference:

Protocol V3 V3beta1
REST Flow resource Flow resource
RPC Flow interface Flow interface
C# Not available Not available
Go Not available Not available
Java FlowsClient FlowsClient
Node.js FlowsClient FlowsClient
PHP Not available Not available
Python FlowsClient FlowsClient
Ruby Not available Not available

Train a flow

To train a flow:

Console

  1. Open the Dialogflow CX Console.
  2. Choose your GCP project.
  3. Select your agent.
  4. Click Agent Settings.
  5. Open the ML tab.
  6. To train a single flow, click Train in the corresponding row.
  7. To train multiple flows, select them with checkboxs, then click Train selected flow NLU model.

API

See the train method for the Flow type.

Select a protocol and version for the Flow reference:

Protocol V3 V3beta1
REST Flow resource Flow resource
RPC Flow interface Flow interface
C# Not available Not available
Go Not available Not available
Java FlowsClient FlowsClient
Node.js FlowsClient FlowsClient
PHP Not available Not available
Python FlowsClient FlowsClient
Ruby Not available Not available

Export a flow

To export a flow:

Console

  1. Open the Dialogflow CX Console.
  2. Choose your GCP project.
  3. Select your agent.
  4. Hover your mouse over the flow in the Flows section.
  5. Click the options button.
  6. Select Export flow.
  7. Follow instructions to complete.

API

See the export method for the Flow type.

Select a protocol and version for the Flow reference:

Protocol V3 V3beta1
REST Flow resource Flow resource
RPC Flow interface Flow interface
C# Not available Not available
Go Not available Not available
Java FlowsClient FlowsClient
Node.js FlowsClient FlowsClient
PHP Not available Not available
Python FlowsClient FlowsClient
Ruby Not available Not available

Import a flow

To import a flow:

Console

  1. Open the Dialogflow CX Console.
  2. Choose your GCP project.
  3. Select your agent.
  4. Click the add button in the Flows section.
  5. Select Import flow.
  6. Follow instructions to complete.

API

See the import method for the Flow type.

Select a protocol and version for the Flow reference:

Protocol V3 V3beta1
REST Flow resource Flow resource
RPC Flow interface Flow interface
C# Not available Not available
Go Not available Not available
Java FlowsClient FlowsClient
Node.js FlowsClient FlowsClient
PHP Not available Not available
Python FlowsClient FlowsClient
Ruby Not available Not available