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. Enter a name for your flow.
  6. 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 V3beta1
REST Flow resource
RPC Flow interface
Java FlowsClient
Node.js FlowsClient
Python FlowsClient

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 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 V3beta1
REST Flow resource
RPC Flow interface
Java FlowsClient
Node.js FlowsClient
Python FlowsClient
For pages, see the get and patch/update methods for the Page type.

Select a protocol and version for the Page reference:

Protocol V3beta1
REST Page resource
RPC Page interface
Java PagesClient
Node.js PagesClient
Python PagesClient

The following data is associated with flows:

Flow 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 settings 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 V3beta1
REST Flow resource
RPC Flow interface
Java FlowsClient
Node.js FlowsClient
Python FlowsClient

Settings applied to flows are also accessed and described in agent ML settings.

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 V3beta1
REST Flow resource
RPC Flow interface
Java FlowsClient
Node.js FlowsClient
Python FlowsClient

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 V3beta1
REST Flow resource
RPC Flow interface
Java FlowsClient
Node.js FlowsClient
Python FlowsClient