Skip to main content

flows

Creates, updates, deletes, gets or lists a flows resource.

Overview

Nameflows
TypeResource
Idgoogle.dialogflow.flows

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringThe unique identifier of the flow. Format: projects//locations//agents//flows/.
advancedSettingsobjectHierarchical advanced settings for this flow. The settings exposed at the lower level overrides the settings exposed at the higher level. (id: GoogleCloudDialogflowCxV3AdvancedSettings)
descriptionstringThe description of the flow. The maximum length is 500 characters. If exceeded, the request is rejected.
displayNamestringRequired. The human-readable name of the flow.
eventHandlersarrayA 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.
inputParameterDefinitionsarrayOptional. Defined structured input parameters for this flow.
knowledgeConnectorSettingsobjectOptional. Knowledge connector configuration. (id: GoogleCloudDialogflowCxV3KnowledgeConnectorSettings)
lockedbooleanIndicates whether the flow is locked for changes. If the flow is locked, modifications to the flow will be rejected.
multiLanguageSettingsobjectOptional. Multi-lingual agent settings for this flow. (id: GoogleCloudDialogflowCxV3FlowMultiLanguageSettings)
nluSettingsobjectNLU related settings of the flow. (id: GoogleCloudDialogflowCxV3NluSettings)
outputParameterDefinitionsarrayOptional. Defined structured output parameters for this flow.
transitionRouteGroupsarrayA 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.
transitionRoutesarrayA 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:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_agents_flows_getselectprojectsId, locationsId, agentsId, flowsIdlanguageCodeRetrieves the specified flow.
projects_locations_agents_flows_listselectprojectsId, locationsId, agentsIdpageSize, pageToken, languageCodeReturns the list of all flows in the specified agent.
projects_locations_agents_flows_createinsertprojectsId, locationsId, agentsIdlanguageCodeCreates 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_patchupdateprojectsId, locationsId, agentsId, flowsIdupdateMask, languageCodeUpdates the specified flow. Note: You should always train a flow prior to sending it queries. See the training documentation.
projects_locations_agents_flows_deletedeleteprojectsId, locationsId, agentsId, flowsIdforceDeletes a specified flow.
projects_locations_agents_flows_trainexecprojectsId, locationsId, agentsId, flowsIdTrains 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_validateexecprojectsId, locationsId, agentsId, flowsIdValidates 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_importexecprojectsId, locationsId, agentsIdImports 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_exportexecprojectsId, locationsId, agentsId, flowsIdExports 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.

NameDatatypeDescription
agentsIdstring
flowsIdstring
locationsIdstring
projectsIdstring
forceboolean
languageCodestring
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)

SELECT examples

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 }}';

INSERT examples

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
;

UPDATE examples

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

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

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;