flows
Creates, updates, deletes, gets or lists a flows
resource.
Overview
Name | flows |
Type | Resource |
Id | google.dialogflow.flows |
Fields
Name | Datatype | Description |
---|---|---|
name | string | The unique identifier of the flow. Format: projects//locations//agents//flows/ . |
description | string | The description of the flow. The maximum length is 500 characters. If exceeded, the request is rejected. |
advancedSettings | object | Hierarchical 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. |
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. |
knowledgeConnectorSettings | object | The Knowledge Connector settings for this page or flow. This includes information such as the attached Knowledge Bases, and the way to execute fulfillment. |
locked | boolean | Indicates whether the flow is locked for changes. If the flow is locked, modifications to the flow will be rejected. |
multiLanguageSettings | object | Settings for multi-lingual agents. |
nluSettings | object | Settings related to NLU. |
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 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
Name | Accessible by | Required Params | Description |
---|---|---|---|
projects_locations_agents_flows_get | SELECT | agentsId, flowsId, locationsId, projectsId | Retrieves the specified flow. |
projects_locations_agents_flows_list | SELECT | agentsId, locationsId, projectsId | Returns the list of all flows in the specified agent. |
projects_locations_agents_flows_create | INSERT | agentsId, locationsId, projectsId | 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_delete | DELETE | agentsId, flowsId, locationsId, projectsId | Deletes a specified flow. |
projects_locations_agents_flows_patch | UPDATE | agentsId, flowsId, locationsId, projectsId | Updates the specified flow. Note: You should always train a flow prior to sending it queries. See the training documentation. |
projects_locations_agents_flows_export | EXEC | agentsId, flowsId, locationsId, projectsId | 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. |
projects_locations_agents_flows_import | EXEC | agentsId, locationsId, projectsId | 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_train | EXEC | agentsId, flowsId, locationsId, projectsId | 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 | agentsId, flowsId, locationsId, projectsId | 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. |
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.
- All Properties
- Manifest
/*+ 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 }}
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: displayName
value: string
- name: description
value: string
- name: transitionRoutes
value:
- - name: name
value: string
- name: description
value: string
- name: intent
value: string
- name: condition
value: string
- name: triggerFulfillment
value:
- name: messages
value:
- - name: text
value:
- name: text
value:
- string
- name: allowPlaybackInterruption
value: boolean
- name: payload
value: object
- name: conversationSuccess
value:
- name: metadata
value: object
- name: outputAudioText
value:
- name: text
value: string
- name: ssml
value: string
- name: allowPlaybackInterruption
value: boolean
- name: liveAgentHandoff
value:
- name: metadata
value: object
- name: endInteraction
value: []
- name: playAudio
value:
- name: audioUri
value: string
- name: allowPlaybackInterruption
value: boolean
- name: mixedAudio
value:
- name: segments
value:
- - name: audio
value: string
- name: uri
value: string
- name: allowPlaybackInterruption
value: boolean
- name: telephonyTransferCall
value:
- name: phoneNumber
value: string
- name: knowledgeInfoCard
value: []
- name: responseType
value: string
- name: channel
value: string
- name: webhook
value: string
- name: returnPartialResponses
value: boolean
- name: tag
value: string
- name: setParameterActions
value:
- - name: parameter
value: string
- name: value
value: any
- name: conditionalCases
value:
- - name: cases
value:
- - name: condition
value: string
- name: caseContent
value:
- - name: message
value:
- name: payload
value: object
- name: responseType
value: string
- name: channel
value: string
- name: additionalCases
value:
- name: cases
value:
- - name: condition
value: string
- name: caseContent
value:
- []
- name: advancedSettings
value:
- name: audioExportGcsDestination
value:
- name: uri
value: string
- name: speechSettings
value:
- name: endpointerSensitivity
value: integer
- name: noSpeechTimeout
value: string
- name: useTimeoutBasedEndpointing
value: boolean
- name: models
value: object
- name: dtmfSettings
value:
- name: enabled
value: boolean
- name: maxDigits
value: integer
- name: finishDigit
value: string
- name: interdigitTimeoutDuration
value: string
- name: endpointingTimeoutDuration
value: string
- name: loggingSettings
value:
- name: enableStackdriverLogging
value: boolean
- name: enableInteractionLogging
value: boolean
- name: enableConsentBasedRedaction
value: boolean
- name: enableGenerativeFallback
value: boolean
- name: targetPage
value: string
- name: targetFlow
value: string
- name: eventHandlers
value:
- - name: name
value: string
- name: event
value: string
- name: targetPage
value: string
- name: targetFlow
value: string
- name: targetPlaybook
value: string
- name: transitionRouteGroups
value:
- string
- name: nluSettings
value:
- name: modelType
value: string
- name: classificationThreshold
value: number
- name: modelTrainingMode
value: string
- name: knowledgeConnectorSettings
value:
- name: enabled
value: boolean
- name: targetPage
value: string
- name: targetFlow
value: string
- name: dataStoreConnections
value:
- - name: dataStoreType
value: string
- name: dataStore
value: string
- name: multiLanguageSettings
value:
- name: enableMultiLanguageDetection
value: boolean
- name: supportedResponseLanguageCodes
value:
- string
- name: locked
value: boolean
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 }}';