flows
Creates, updates, deletes, gets or lists a flows
resource.
Overview
Name | flows |
Type | Resource |
Id | google.dialogflow.flows |
Fields
The following fields are returned by SELECT
queries:
- projects_locations_agents_flows_get
- projects_locations_agents_flows_list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | The unique identifier of the flow. Format: projects//locations//agents//flows/ . |
advancedSettings | object | Hierarchical advanced settings for this flow. The settings exposed at the lower level overrides the settings exposed at the higher level. (id: GoogleCloudDialogflowCxV3AdvancedSettings) |
description | string | The description of the flow. The maximum length is 500 characters. If exceeded, the request is rejected. |
displayName | string | Required. The human-readable name of the flow. |
eventHandlers | array | 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, 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, these handlers are evaluated on a first-match basis. The first one that matches the event get executed, with the rest being ignored. |
inputParameterDefinitions | array | Optional. Defined structured input parameters for this flow. |
knowledgeConnectorSettings | object | Optional. Knowledge connector configuration. (id: GoogleCloudDialogflowCxV3KnowledgeConnectorSettings) |
locked | boolean | Indicates whether the flow is locked for changes. If the flow is locked, modifications to the flow will be rejected. |
multiLanguageSettings | object | Optional. Multi-lingual agent settings for this flow. (id: GoogleCloudDialogflowCxV3FlowMultiLanguageSettings) |
nluSettings | object | NLU related settings of the flow. (id: GoogleCloudDialogflowCxV3NluSettings) |
outputParameterDefinitions | array | Optional. Defined structured output parameters for this flow. |
transitionRouteGroups | array | 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. Transition route groups defined in the page have higher priority than those defined in the flow. Format: projects//locations//agents//flows//transitionRouteGroups/ or projects//locations//agents//transitionRouteGroups/ for agent-level groups. |
transitionRoutes | array | 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 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 evaluated in the following order: * TransitionRoutes with intent specified. * TransitionRoutes with only condition specified. TransitionRoutes with intent specified are inherited by pages in the flow. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | The unique identifier of the flow. Format: projects//locations//agents//flows/ . |
advancedSettings | object | Hierarchical advanced settings for this flow. The settings exposed at the lower level overrides the settings exposed at the higher level. (id: GoogleCloudDialogflowCxV3AdvancedSettings) |
description | string | The description of the flow. The maximum length is 500 characters. If exceeded, the request is rejected. |
displayName | string | Required. The human-readable name of the flow. |
eventHandlers | array | 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, 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, these handlers are evaluated on a first-match basis. The first one that matches the event get executed, with the rest being ignored. |
inputParameterDefinitions | array | Optional. Defined structured input parameters for this flow. |
knowledgeConnectorSettings | object | Optional. Knowledge connector configuration. (id: GoogleCloudDialogflowCxV3KnowledgeConnectorSettings) |
locked | boolean | Indicates whether the flow is locked for changes. If the flow is locked, modifications to the flow will be rejected. |
multiLanguageSettings | object | Optional. Multi-lingual agent settings for this flow. (id: GoogleCloudDialogflowCxV3FlowMultiLanguageSettings) |
nluSettings | object | NLU related settings of the flow. (id: GoogleCloudDialogflowCxV3NluSettings) |
outputParameterDefinitions | array | Optional. Defined structured output parameters for this flow. |
transitionRouteGroups | array | 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. Transition route groups defined in the page have higher priority than those defined in the flow. Format: projects//locations//agents//flows//transitionRouteGroups/ or projects//locations//agents//transitionRouteGroups/ for agent-level groups. |
transitionRoutes | array | 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 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 evaluated in the following order: * TransitionRoutes with intent specified. * TransitionRoutes with only condition specified. TransitionRoutes with intent specified are inherited by pages in the flow. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
projects_locations_agents_flows_get | select | projectsId , locationsId , agentsId , flowsId | languageCode | Retrieves the specified flow. |
projects_locations_agents_flows_list | select | projectsId , locationsId , agentsId | pageSize , pageToken , languageCode | Returns the list of all flows in the specified agent. |
projects_locations_agents_flows_create | insert | projectsId , locationsId , agentsId | languageCode | Creates a flow in the specified agent. Note: You should always train a flow prior to sending it queries. See the training documentation. |
projects_locations_agents_flows_patch | update | projectsId , locationsId , agentsId , flowsId | updateMask , languageCode | Updates the specified flow. Note: You should always train a flow prior to sending it queries. See the training documentation. |
projects_locations_agents_flows_delete | delete | projectsId , locationsId , agentsId , flowsId | force | Deletes a specified flow. |
projects_locations_agents_flows_train | exec | projectsId , locationsId , agentsId , flowsId | Trains the specified flow. Note that only the flow in 'draft' environment is trained. This method is a long-running operation. The returned Operation type has the following method-specific fields: - metadata : An empty Struct message - response : An Empty message Note: You should always train a flow prior to sending it queries. See the training documentation. | |
projects_locations_agents_flows_validate | exec | projectsId , locationsId , agentsId , flowsId | Validates the specified flow and creates or updates validation results. Please call this API after the training is completed to get the complete validation results. | |
projects_locations_agents_flows_import | exec | projectsId , locationsId , agentsId | Imports the specified flow to the specified agent from a binary file. This method is a long-running operation. The returned Operation type has the following method-specific fields: - metadata : An empty Struct message - response : ImportFlowResponse Note: You should always train a flow prior to sending it queries. See the training documentation. | |
projects_locations_agents_flows_export | exec | projectsId , locationsId , agentsId , flowsId | Exports the specified flow to a binary file. This method is a long-running operation. The returned Operation type has the following method-specific fields: - metadata : An empty Struct message - response : ExportFlowResponse Note that resources (e.g. intents, entities, webhooks) that the flow references will also be exported. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
agentsId | string | |
flowsId | string | |
locationsId | string | |
projectsId | string | |
force | boolean | |
languageCode | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- projects_locations_agents_flows_get
- projects_locations_agents_flows_list
Retrieves the specified flow.
SELECT
name,
advancedSettings,
description,
displayName,
eventHandlers,
inputParameterDefinitions,
knowledgeConnectorSettings,
locked,
multiLanguageSettings,
nluSettings,
outputParameterDefinitions,
transitionRouteGroups,
transitionRoutes
FROM google.dialogflow.flows
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND agentsId = '{{ agentsId }}' -- required
AND flowsId = '{{ flowsId }}' -- required
AND languageCode = '{{ languageCode }}';
Returns the list of all flows in the specified agent.
SELECT
name,
advancedSettings,
description,
displayName,
eventHandlers,
inputParameterDefinitions,
knowledgeConnectorSettings,
locked,
multiLanguageSettings,
nluSettings,
outputParameterDefinitions,
transitionRouteGroups,
transitionRoutes
FROM google.dialogflow.flows
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND agentsId = '{{ agentsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND languageCode = '{{ languageCode }}';
INSERT
examples
- projects_locations_agents_flows_create
- Manifest
Creates a flow in the specified agent. Note: You should always train a flow prior to sending it queries. See the training documentation.
INSERT INTO google.dialogflow.flows (
data__name,
data__displayName,
data__description,
data__transitionRoutes,
data__eventHandlers,
data__transitionRouteGroups,
data__nluSettings,
data__advancedSettings,
data__knowledgeConnectorSettings,
data__inputParameterDefinitions,
data__outputParameterDefinitions,
data__multiLanguageSettings,
data__locked,
projectsId,
locationsId,
agentsId,
languageCode
)
SELECT
'{{ name }}',
'{{ displayName }}',
'{{ description }}',
'{{ transitionRoutes }}',
'{{ eventHandlers }}',
'{{ transitionRouteGroups }}',
'{{ nluSettings }}',
'{{ advancedSettings }}',
'{{ knowledgeConnectorSettings }}',
'{{ inputParameterDefinitions }}',
'{{ outputParameterDefinitions }}',
'{{ multiLanguageSettings }}',
{{ locked }},
'{{ projectsId }}',
'{{ locationsId }}',
'{{ agentsId }}',
'{{ languageCode }}'
RETURNING
name,
advancedSettings,
description,
displayName,
eventHandlers,
inputParameterDefinitions,
knowledgeConnectorSettings,
locked,
multiLanguageSettings,
nluSettings,
outputParameterDefinitions,
transitionRouteGroups,
transitionRoutes
;
# Description fields are for documentation purposes
- name: flows
props:
- name: projectsId
value: string
description: Required parameter for the flows resource.
- name: locationsId
value: string
description: Required parameter for the flows resource.
- name: agentsId
value: string
description: Required parameter for the flows resource.
- name: name
value: string
description: >
The unique identifier of the flow. Format: `projects//locations//agents//flows/`.
- name: displayName
value: string
description: >
Required. The human-readable name of the flow.
- name: description
value: string
description: >
The description of the flow. The maximum length is 500 characters. If exceeded, the request is rejected.
- name: transitionRoutes
value: array
description: >
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 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 evaluated in the following order: * TransitionRoutes with intent specified. * TransitionRoutes with only condition specified. TransitionRoutes with intent specified are inherited by pages in the flow.
- name: eventHandlers
value: array
description: >
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, 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, these handlers are evaluated on a first-match basis. The first one that matches the event get executed, with the rest being ignored.
- name: transitionRouteGroups
value: array
description: >
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. Transition route groups defined in the page have higher priority than those defined in the flow. Format: `projects//locations//agents//flows//transitionRouteGroups/` or `projects//locations//agents//transitionRouteGroups/` for agent-level groups.
- name: nluSettings
value: object
description: >
NLU related settings of the flow.
- name: advancedSettings
value: object
description: >
Hierarchical advanced settings for this flow. The settings exposed at the lower level overrides the settings exposed at the higher level.
- name: knowledgeConnectorSettings
value: object
description: >
Optional. Knowledge connector configuration.
- name: inputParameterDefinitions
value: array
description: >
Optional. Defined structured input parameters for this flow.
- name: outputParameterDefinitions
value: array
description: >
Optional. Defined structured output parameters for this flow.
- name: multiLanguageSettings
value: object
description: >
Optional. Multi-lingual agent settings for this flow.
- name: locked
value: boolean
description: >
Indicates whether the flow is locked for changes. If the flow is locked, modifications to the flow will be rejected.
- name: languageCode
value: string
UPDATE
examples
- projects_locations_agents_flows_patch
Updates the specified flow. Note: You should always train a flow prior to sending it queries. See the training documentation.
UPDATE google.dialogflow.flows
SET
data__name = '{{ name }}',
data__displayName = '{{ displayName }}',
data__description = '{{ description }}',
data__transitionRoutes = '{{ transitionRoutes }}',
data__eventHandlers = '{{ eventHandlers }}',
data__transitionRouteGroups = '{{ transitionRouteGroups }}',
data__nluSettings = '{{ nluSettings }}',
data__advancedSettings = '{{ advancedSettings }}',
data__knowledgeConnectorSettings = '{{ knowledgeConnectorSettings }}',
data__inputParameterDefinitions = '{{ inputParameterDefinitions }}',
data__outputParameterDefinitions = '{{ outputParameterDefinitions }}',
data__multiLanguageSettings = '{{ multiLanguageSettings }}',
data__locked = {{ locked }}
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND agentsId = '{{ agentsId }}' --required
AND flowsId = '{{ flowsId }}' --required
AND updateMask = '{{ updateMask}}'
AND languageCode = '{{ languageCode}}'
RETURNING
name,
advancedSettings,
description,
displayName,
eventHandlers,
inputParameterDefinitions,
knowledgeConnectorSettings,
locked,
multiLanguageSettings,
nluSettings,
outputParameterDefinitions,
transitionRouteGroups,
transitionRoutes;
DELETE
examples
- projects_locations_agents_flows_delete
Deletes a specified flow.
DELETE FROM google.dialogflow.flows
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND agentsId = '{{ agentsId }}' --required
AND flowsId = '{{ flowsId }}' --required
AND force = '{{ force }}';
Lifecycle Methods
- projects_locations_agents_flows_train
- projects_locations_agents_flows_validate
- projects_locations_agents_flows_import
- projects_locations_agents_flows_export
Trains the specified flow. Note that only the flow in 'draft' environment is trained. This method is a long-running operation. The returned Operation
type has the following method-specific fields: - metadata
: An empty Struct message - response
: An Empty message Note: You should always train a flow prior to sending it queries. See the training documentation.
EXEC google.dialogflow.flows.projects_locations_agents_flows_train
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@agentsId='{{ agentsId }}' --required,
@flowsId='{{ flowsId }}' --required;
Validates the specified flow and creates or updates validation results. Please call this API after the training is completed to get the complete validation results.
EXEC google.dialogflow.flows.projects_locations_agents_flows_validate
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@agentsId='{{ agentsId }}' --required,
@flowsId='{{ flowsId }}' --required
@@json=
'{
"languageCode": "{{ languageCode }}"
}';
Imports the specified flow to the specified agent from a binary file. This method is a long-running operation. The returned Operation
type has the following method-specific fields: - metadata
: An empty Struct message - response
: ImportFlowResponse Note: You should always train a flow prior to sending it queries. See the training documentation.
EXEC google.dialogflow.flows.projects_locations_agents_flows_import
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@agentsId='{{ agentsId }}' --required
@@json=
'{
"flowUri": "{{ flowUri }}",
"flowContent": "{{ flowContent }}",
"importOption": "{{ importOption }}",
"flowImportStrategy": "{{ flowImportStrategy }}"
}';
Exports the specified flow to a binary file. This method is a long-running operation. The returned Operation
type has the following method-specific fields: - metadata
: An empty Struct message - response
: ExportFlowResponse Note that resources (e.g. intents, entities, webhooks) that the flow references will also be exported.
EXEC google.dialogflow.flows.projects_locations_agents_flows_export
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@agentsId='{{ agentsId }}' --required,
@flowsId='{{ flowsId }}' --required
@@json=
'{
"flowUri": "{{ flowUri }}",
"includeReferencedFlows": {{ includeReferencedFlows }}
}';