Resource: 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.
JSON representation |
---|
{ "name": string, "displayName": string, "description": string, "transitionRoutes": [ { object ( |
Fields | |
---|---|
name |
The unique identifier of the flow. Format: |
display |
Required. The human-readable name of the flow. |
description |
The description of the flow. The maximum length is 500 characters. If exceeded, the request is rejected. |
transition |
A flow's transition routes serve two purposes:
TransitionRoutes are evalauted in the following order:
TransitionRoutes with intent specified are inherited by pages in the flow. |
event |
A flow's event handlers serve two purposes:
Unlike |
transition |
A flow's transition route group serve two purposes:
Format: |
nlu |
NLU related settings of the flow. |
advanced |
Hierarchical advanced settings for this flow. The settings exposed at the lower level overrides the settings exposed at the higher level. |
knowledge |
Optional. Knowledge connector configuration. |
multi |
Optional. Multi-lingual agent settings for this flow. |
locked |
Indicates whether the flow is locked for changes. If the flow is locked, modifications to the flow will be rejected. |
MultiLanguageSettings
Settings for multi-lingual agents.
JSON representation |
---|
{ "enableMultiLanguageDetection": boolean, "supportedResponseLanguageCodes": [ string ] } |
Fields | |
---|---|
enable |
Optional. Enable multi-language detection for this flow. This can be set only if [agent level multi language setting][Agent.enable_multi_language_training] is enabled. |
supported |
Optional. Agent will respond in the detected language if the detected language code is in the supported resolved languages for this flow. This will be used only if multi-language training is enabled in the |
Methods |
|
---|---|
|
Creates a flow in the specified agent. |
|
Deletes a specified flow. |
|
Exports the specified flow to a binary file. |
|
Retrieves the specified flow. |
|
Gets the latest flow validation result. |
|
Imports the specified flow to the specified agent from a binary file. |
|
Returns the list of all flows in the specified agent. |
|
Updates the specified flow. |
|
Trains the specified flow. |
|
Validates the specified flow and creates or updates validation results. |