playbooks
Creates, updates, deletes, gets or lists a playbooks resource.
Overview
| Name | playbooks |
| Type | Resource |
| Id | google.dialogflow.playbooks |
Fields
The following fields are returned by SELECT queries:
- projects_locations_agents_playbooks_get
- projects_locations_agents_playbooks_list
| Name | Datatype | Description |
|---|---|---|
name | string | |
codeBlock | object | (id: GoogleCloudDialogflowCxV3CodeBlock) |
createTime | string (google-datetime) | |
displayName | string | |
goal | string | |
handlers | array | |
inlineActions | array | |
inputParameterDefinitions | array | |
instruction | object | (id: GoogleCloudDialogflowCxV3PlaybookInstruction) |
llmModelSettings | object | (id: GoogleCloudDialogflowCxV3LlmModelSettings) |
outputParameterDefinitions | array | |
playbookType | string | (PLAYBOOK_TYPE_UNSPECIFIED, TASK, ROUTINE) |
referencedFlows | array | |
referencedPlaybooks | array | |
referencedTools | array | |
tokenCount | string (int64) | |
updateTime | string (google-datetime) |
| Name | Datatype | Description |
|---|---|---|
name | string | |
codeBlock | object | (id: GoogleCloudDialogflowCxV3CodeBlock) |
createTime | string (google-datetime) | |
displayName | string | |
goal | string | |
handlers | array | |
inlineActions | array | |
inputParameterDefinitions | array | |
instruction | object | (id: GoogleCloudDialogflowCxV3PlaybookInstruction) |
llmModelSettings | object | (id: GoogleCloudDialogflowCxV3LlmModelSettings) |
outputParameterDefinitions | array | |
playbookType | string | (PLAYBOOK_TYPE_UNSPECIFIED, TASK, ROUTINE) |
referencedFlows | array | |
referencedPlaybooks | array | |
referencedTools | array | |
tokenCount | string (int64) | |
updateTime | string (google-datetime) |
Methods
The following methods are available for this resource:
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 | |
locationsId | string | |
playbooksId | string | |
projectsId | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT examples
- projects_locations_agents_playbooks_get
- projects_locations_agents_playbooks_list
Successful response
SELECT
name,
codeBlock,
createTime,
displayName,
goal,
handlers,
inlineActions,
inputParameterDefinitions,
instruction,
llmModelSettings,
outputParameterDefinitions,
playbookType,
referencedFlows,
referencedPlaybooks,
referencedTools,
tokenCount,
updateTime
FROM google.dialogflow.playbooks
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND agentsId = '{{ agentsId }}' -- required
AND playbooksId = '{{ playbooksId }}' -- required
;
Successful response
SELECT
name,
codeBlock,
createTime,
displayName,
goal,
handlers,
inlineActions,
inputParameterDefinitions,
instruction,
llmModelSettings,
outputParameterDefinitions,
playbookType,
referencedFlows,
referencedPlaybooks,
referencedTools,
tokenCount,
updateTime
FROM google.dialogflow.playbooks
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND agentsId = '{{ agentsId }}' -- required
AND pageToken = '{{ pageToken }}'
AND pageSize = '{{ pageSize }}'
;
INSERT examples
- projects_locations_agents_playbooks_create
- Manifest
No description available.
INSERT INTO google.dialogflow.playbooks (
data__displayName,
data__llmModelSettings,
data__name,
data__instruction,
data__playbookType,
data__inputParameterDefinitions,
data__goal,
data__outputParameterDefinitions,
data__referencedTools,
data__handlers,
data__codeBlock,
projectsId,
locationsId,
agentsId
)
SELECT
'{{ displayName }}',
'{{ llmModelSettings }}',
'{{ name }}',
'{{ instruction }}',
'{{ playbookType }}',
'{{ inputParameterDefinitions }}',
'{{ goal }}',
'{{ outputParameterDefinitions }}',
'{{ referencedTools }}',
'{{ handlers }}',
'{{ codeBlock }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ agentsId }}'
RETURNING
name,
codeBlock,
createTime,
displayName,
goal,
handlers,
inlineActions,
inputParameterDefinitions,
instruction,
llmModelSettings,
outputParameterDefinitions,
playbookType,
referencedFlows,
referencedPlaybooks,
referencedTools,
tokenCount,
updateTime
;
# Description fields are for documentation purposes
- name: playbooks
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the playbooks resource.
- name: locationsId
value: "{{ locationsId }}"
description: Required parameter for the playbooks resource.
- name: agentsId
value: "{{ agentsId }}"
description: Required parameter for the playbooks resource.
- name: displayName
value: "{{ displayName }}"
- name: llmModelSettings
value:
model: "{{ model }}"
promptText: "{{ promptText }}"
- name: name
value: "{{ name }}"
- name: instruction
value:
guidelines: "{{ guidelines }}"
steps:
- steps: "{{ steps }}"
text: "{{ text }}"
- name: playbookType
value: "{{ playbookType }}"
valid_values: ['PLAYBOOK_TYPE_UNSPECIFIED', 'TASK', 'ROUTINE']
- name: inputParameterDefinitions
value:
- name: "{{ name }}"
type: "{{ type }}"
typeSchema:
schemaReference:
tool: "{{ tool }}"
schema: "{{ schema }}"
inlineSchema:
type: "{{ type }}"
items:
schemaReference:
tool: "{{ tool }}"
schema: "{{ schema }}"
inlineSchema:
type: "{{ type }}"
items: "{{ items }}"
description: "{{ description }}"
- name: goal
value: "{{ goal }}"
- name: outputParameterDefinitions
value:
- name: "{{ name }}"
type: "{{ type }}"
typeSchema:
schemaReference:
tool: "{{ tool }}"
schema: "{{ schema }}"
inlineSchema:
type: "{{ type }}"
items:
schemaReference:
tool: "{{ tool }}"
schema: "{{ schema }}"
inlineSchema:
type: "{{ type }}"
items: "{{ items }}"
description: "{{ description }}"
- name: referencedTools
value:
- "{{ referencedTools }}"
- name: handlers
value:
- eventHandler:
event: "{{ event }}"
condition: "{{ condition }}"
fulfillment:
returnPartialResponses: {{ returnPartialResponses }}
generators:
- inputParameters: "{{ inputParameters }}"
generator: "{{ generator }}"
outputParameter: "{{ outputParameter }}"
webhook: "{{ webhook }}"
enableGenerativeFallback: {{ enableGenerativeFallback }}
setParameterActions:
- parameter: "{{ parameter }}"
value: "{{ value }}"
tag: "{{ tag }}"
advancedSettings:
loggingSettings:
enableInteractionLogging: {{ enableInteractionLogging }}
enableConsentBasedRedaction: {{ enableConsentBasedRedaction }}
enableStackdriverLogging: {{ enableStackdriverLogging }}
audioExportGcsDestination:
uri: "{{ uri }}"
speechSettings:
useTimeoutBasedEndpointing: {{ useTimeoutBasedEndpointing }}
models: "{{ models }}"
endpointerSensitivity: {{ endpointerSensitivity }}
noSpeechTimeout: "{{ noSpeechTimeout }}"
dtmfSettings:
maxDigits: {{ maxDigits }}
finishDigit: "{{ finishDigit }}"
interdigitTimeoutDuration: "{{ interdigitTimeoutDuration }}"
enabled: {{ enabled }}
endpointingTimeoutDuration: "{{ endpointingTimeoutDuration }}"
messages:
- playAudio:
audioUri: "{{ audioUri }}"
allowPlaybackInterruption: {{ allowPlaybackInterruption }}
toolCall:
tool: "{{ tool }}"
action: "{{ action }}"
inputParameters: "{{ inputParameters }}"
knowledgeInfoCard: "{{ knowledgeInfoCard }}"
endInteraction: "{{ endInteraction }}"
conversationSuccess:
metadata: "{{ metadata }}"
channel: "{{ channel }}"
text:
text: "{{ text }}"
allowPlaybackInterruption: {{ allowPlaybackInterruption }}
telephonyTransferCall:
phoneNumber: "{{ phoneNumber }}"
responseType: "{{ responseType }}"
payload: "{{ payload }}"
outputAudioText:
text: "{{ text }}"
ssml: "{{ ssml }}"
allowPlaybackInterruption: {{ allowPlaybackInterruption }}
mixedAudio:
segments: "{{ segments }}"
liveAgentHandoff:
metadata: "{{ metadata }}"
conditionalCases:
- cases: "{{ cases }}"
lifecycleHandler:
lifecycleStage: "{{ lifecycleStage }}"
condition: "{{ condition }}"
fulfillment:
returnPartialResponses: {{ returnPartialResponses }}
generators:
- inputParameters: "{{ inputParameters }}"
generator: "{{ generator }}"
outputParameter: "{{ outputParameter }}"
webhook: "{{ webhook }}"
enableGenerativeFallback: {{ enableGenerativeFallback }}
setParameterActions:
- parameter: "{{ parameter }}"
value: "{{ value }}"
tag: "{{ tag }}"
advancedSettings:
loggingSettings:
enableInteractionLogging: {{ enableInteractionLogging }}
enableConsentBasedRedaction: {{ enableConsentBasedRedaction }}
enableStackdriverLogging: {{ enableStackdriverLogging }}
audioExportGcsDestination:
uri: "{{ uri }}"
speechSettings:
useTimeoutBasedEndpointing: {{ useTimeoutBasedEndpointing }}
models: "{{ models }}"
endpointerSensitivity: {{ endpointerSensitivity }}
noSpeechTimeout: "{{ noSpeechTimeout }}"
dtmfSettings:
maxDigits: {{ maxDigits }}
finishDigit: "{{ finishDigit }}"
interdigitTimeoutDuration: "{{ interdigitTimeoutDuration }}"
enabled: {{ enabled }}
endpointingTimeoutDuration: "{{ endpointingTimeoutDuration }}"
messages:
- playAudio:
audioUri: "{{ audioUri }}"
allowPlaybackInterruption: {{ allowPlaybackInterruption }}
toolCall:
tool: "{{ tool }}"
action: "{{ action }}"
inputParameters: "{{ inputParameters }}"
knowledgeInfoCard: "{{ knowledgeInfoCard }}"
endInteraction: "{{ endInteraction }}"
conversationSuccess:
metadata: "{{ metadata }}"
channel: "{{ channel }}"
text:
text: "{{ text }}"
allowPlaybackInterruption: {{ allowPlaybackInterruption }}
telephonyTransferCall:
phoneNumber: "{{ phoneNumber }}"
responseType: "{{ responseType }}"
payload: "{{ payload }}"
outputAudioText:
text: "{{ text }}"
ssml: "{{ ssml }}"
allowPlaybackInterruption: {{ allowPlaybackInterruption }}
mixedAudio:
segments: "{{ segments }}"
liveAgentHandoff:
metadata: "{{ metadata }}"
conditionalCases:
- cases: "{{ cases }}"
- name: codeBlock
value:
code: "{{ code }}"
UPDATE examples
- projects_locations_agents_playbooks_patch
No description available.
UPDATE google.dialogflow.playbooks
SET
data__displayName = '{{ displayName }}',
data__llmModelSettings = '{{ llmModelSettings }}',
data__name = '{{ name }}',
data__instruction = '{{ instruction }}',
data__playbookType = '{{ playbookType }}',
data__inputParameterDefinitions = '{{ inputParameterDefinitions }}',
data__goal = '{{ goal }}',
data__outputParameterDefinitions = '{{ outputParameterDefinitions }}',
data__referencedTools = '{{ referencedTools }}',
data__handlers = '{{ handlers }}',
data__codeBlock = '{{ codeBlock }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND agentsId = '{{ agentsId }}' --required
AND playbooksId = '{{ playbooksId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
codeBlock,
createTime,
displayName,
goal,
handlers,
inlineActions,
inputParameterDefinitions,
instruction,
llmModelSettings,
outputParameterDefinitions,
playbookType,
referencedFlows,
referencedPlaybooks,
referencedTools,
tokenCount,
updateTime;
DELETE examples
- projects_locations_agents_playbooks_delete
No description available.
DELETE FROM google.dialogflow.playbooks
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND agentsId = '{{ agentsId }}' --required
AND playbooksId = '{{ playbooksId }}' --required
;
Lifecycle Methods
- projects_locations_agents_playbooks_export
- projects_locations_agents_playbooks_import
Successful response
EXEC google.dialogflow.playbooks.projects_locations_agents_playbooks_export
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@agentsId='{{ agentsId }}' --required,
@playbooksId='{{ playbooksId }}' --required
@@json=
'{
"playbookUri": "{{ playbookUri }}",
"dataFormat": "{{ dataFormat }}"
}'
;
Successful response
EXEC google.dialogflow.playbooks.projects_locations_agents_playbooks_import
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@agentsId='{{ agentsId }}' --required
@@json=
'{
"importStrategy": "{{ importStrategy }}",
"playbookUri": "{{ playbookUri }}",
"playbookContent": "{{ playbookContent }}"
}'
;