Dialogflow v3 API - Class Flow (2.11.0)

public sealed class Flow : IMessage<Flow>, IEquatable<Flow>, IDeepCloneable<Flow>, IBufferMessage, IMessage

Reference documentation and code samples for the Dialogflow v3 API class Flow.

Flows represents the conversation flows when you build your chatbot agent.

A flow consists of many pages connected by the transition routes. Conversations always start with the built-in Start Flow (with an all-0 ID). Transition routes can direct the conversation session from the current flow (parent flow) to another flow (sub flow). When the sub flow is finished, Dialogflow will bring the session back to the parent flow, where the sub flow is started.

Usually, when a transition route is followed by a matched intent, the intent will be "consumed". This means the intent won't activate more transition routes. However, when the followed transition route moves the conversation session into a different flow, the matched intent can be carried over and to be consumed in the target flow.

Inheritance

object > Flow

Namespace

Google.Cloud.Dialogflow.Cx.V3

Assembly

Google.Cloud.Dialogflow.Cx.V3.dll

Constructors

Flow()

public Flow()

Flow(Flow)

public Flow(Flow other)
Parameter
NameDescription
otherFlow

Properties

Description

public string Description { get; set; }

The description of the flow. The maximum length is 500 characters. If exceeded, the request is rejected.

Property Value
TypeDescription
string

DisplayName

public string DisplayName { get; set; }

Required. The human-readable name of the flow.

Property Value
TypeDescription
string

EventHandlers

public RepeatedField<EventHandler> EventHandlers { get; }

A flow's event handlers serve two purposes:

  • They are responsible for handling events (e.g. no match, webhook errors) in the flow.
  • They are inherited by every page's [event handlers][Page.event_handlers], which can be used to handle common events regardless of the current page. Event handlers defined in the page have higher priority than those defined in the flow.

Unlike [transition_routes][google.cloud.dialogflow.cx.v3.Flow.transition_routes], these handlers are evaluated on a first-match basis. The first one that matches the event get executed, with the rest being ignored.

Property Value
TypeDescription
RepeatedFieldEventHandler

FlowName

public FlowName FlowName { get; set; }

FlowName-typed view over the Name resource name property.

Property Value
TypeDescription
FlowName

KnowledgeConnectorSettings

public KnowledgeConnectorSettings KnowledgeConnectorSettings { get; set; }

Optional. Knowledge connector configuration.

Property Value
TypeDescription
KnowledgeConnectorSettings

Name

public string Name { get; set; }

The unique identifier of the flow. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>.

Property Value
TypeDescription
string

NluSettings

public NluSettings NluSettings { get; set; }

NLU related settings of the flow.

Property Value
TypeDescription
NluSettings

TransitionRouteGroups

public RepeatedField<string> TransitionRouteGroups { get; }

A flow's transition route group serve two purposes:

  • They are responsible for matching the user's first utterances in the flow.
  • They are inherited by every page's [transition route groups][Page.transition_route_groups]. Transition route groups defined in the page have higher priority than those defined in the flow.

Format:projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID> or projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/transitionRouteGroups/<TransitionRouteGroup ID> for agent-level groups.

Property Value
TypeDescription
RepeatedFieldstring

TransitionRouteGroupsAsTransitionRouteGroupNames

public ResourceNameList<TransitionRouteGroupName> TransitionRouteGroupsAsTransitionRouteGroupNames { get; }

TransitionRouteGroupName-typed view over the TransitionRouteGroups resource name property.

Property Value
TypeDescription
ResourceNameListTransitionRouteGroupName

TransitionRoutes

public RepeatedField<TransitionRoute> TransitionRoutes { get; }

A flow's transition routes serve two purposes:

  • They are responsible for matching the user's first utterances in the flow.
  • They are inherited by every page's [transition routes][Page.transition_routes] and can support use cases such as the user saying "help" or "can I talk to a human?", which can be handled in a common way regardless of the current page. Transition routes defined in the page have higher priority than those defined in the flow.

TransitionRoutes are evalauted in the following order:

  • TransitionRoutes with intent specified.
  • TransitionRoutes with only condition specified.

TransitionRoutes with intent specified are inherited by pages in the flow.

Property Value
TypeDescription
RepeatedFieldTransitionRoute