Skip to main content

flows

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

Overview

Nameflows
TypeResource
Idgoogle.dialogflow.flows

Fields

NameDatatypeDescription
namestringThe unique identifier of the flow. Format: projects//locations//agents//flows/.
descriptionstringThe description of the flow. The maximum length is 500 characters. If exceeded, the request is rejected.
advancedSettingsobjectHierarchical advanced settings for agent/flow/page/fulfillment/parameter. Settings exposed at lower level overrides the settings exposed at higher level. Overriding occurs at the sub-setting level. For example, the playback_interruption_settings at fulfillment level only overrides the playback_interruption_settings at the agent level, leaving other settings at the agent level unchanged. DTMF settings does not override each other. DTMF settings set at different levels define DTMF detections running in parallel. Hierarchy: Agent->Flow->Page->Fulfillment/Parameter.
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.
knowledgeConnectorSettingsobjectThe Knowledge Connector settings for this page or flow. This includes information such as the attached Knowledge Bases, and the way to execute fulfillment.
lockedbooleanIndicates whether the flow is locked for changes. If the flow is locked, modifications to the flow will be rejected.
multiLanguageSettingsobjectSettings for multi-lingual agents.
nluSettingsobjectSettings related to NLU.
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 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.

Methods

NameAccessible byRequired ParamsDescription
projects_locations_agents_flows_getSELECTagentsId, flowsId, locationsId, projectsIdRetrieves the specified flow.
projects_locations_agents_flows_listSELECTagentsId, locationsId, projectsIdReturns the list of all flows in the specified agent.
projects_locations_agents_flows_createINSERTagentsId, locationsId, projectsIdCreates 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_deleteDELETEagentsId, flowsId, locationsId, projectsIdDeletes a specified flow.
projects_locations_agents_flows_patchUPDATEagentsId, flowsId, locationsId, projectsIdUpdates the specified flow. Note: You should always train a flow prior to sending it queries. See the training documentation.
projects_locations_agents_flows_exportEXECagentsId, flowsId, locationsId, projectsIdExports 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.
projects_locations_agents_flows_importEXECagentsId, locationsId, projectsIdImports 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_trainEXECagentsId, flowsId, locationsId, projectsIdTrains 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_validateEXECagentsId, flowsId, locationsId, projectsIdValidates the specified flow and creates or updates validation results. Please call this API after the training is completed to get the complete validation results.

SELECT examples

Returns the list of all flows in the specified agent.

SELECT
name,
description,
advancedSettings,
displayName,
eventHandlers,
knowledgeConnectorSettings,
locked,
multiLanguageSettings,
nluSettings,
transitionRouteGroups,
transitionRoutes
FROM google.dialogflow.flows
WHERE agentsId = '{{ agentsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new flows resource.

/*+ create */
INSERT INTO google.dialogflow.flows (
agentsId,
locationsId,
projectsId,
name,
displayName,
description,
transitionRoutes,
eventHandlers,
transitionRouteGroups,
nluSettings,
advancedSettings,
knowledgeConnectorSettings,
multiLanguageSettings,
locked
)
SELECT
'{{ agentsId }}',
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ displayName }}',
'{{ description }}',
'{{ transitionRoutes }}',
'{{ eventHandlers }}',
'{{ transitionRouteGroups }}',
'{{ nluSettings }}',
'{{ advancedSettings }}',
'{{ knowledgeConnectorSettings }}',
'{{ multiLanguageSettings }}',
{{ locked }}
;

UPDATE example

Updates a flows resource.

/*+ update */
UPDATE google.dialogflow.flows
SET
name = '{{ name }}',
displayName = '{{ displayName }}',
description = '{{ description }}',
transitionRoutes = '{{ transitionRoutes }}',
eventHandlers = '{{ eventHandlers }}',
transitionRouteGroups = '{{ transitionRouteGroups }}',
nluSettings = '{{ nluSettings }}',
advancedSettings = '{{ advancedSettings }}',
knowledgeConnectorSettings = '{{ knowledgeConnectorSettings }}',
multiLanguageSettings = '{{ multiLanguageSettings }}',
locked = true|false
WHERE
agentsId = '{{ agentsId }}'
AND flowsId = '{{ flowsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified flows resource.

/*+ delete */
DELETE FROM google.dialogflow.flows
WHERE agentsId = '{{ agentsId }}'
AND flowsId = '{{ flowsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';