| --- |
| # ---------------------------------------------------------------------------- |
| # |
| # *** AUTO GENERATED CODE *** Type: MMv1 *** |
| # |
| # ---------------------------------------------------------------------------- |
| # |
| # This file is automatically generated by Magic Modules and manual |
| # changes will be clobbered when the file is regenerated. |
| # |
| # Please read more about how to change this file in |
| # .github/CONTRIBUTING.md. |
| # |
| # ---------------------------------------------------------------------------- |
| subcategory: "Dialogflow CX" |
| description: |- |
| A Dialogflow CX conversation (session) can be described and visualized as a state machine. |
| --- |
| |
| # google\_dialogflow\_cx\_page |
| |
| A Dialogflow CX conversation (session) can be described and visualized as a state machine. The states of a CX session are represented by pages. |
| |
| |
| To get more information about Page, see: |
| |
| * [API documentation](https://cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.flows.pages) |
| * How-to Guides |
| * [Official Documentation](https://cloud.google.com/dialogflow/cx/docs) |
| |
| <div class = "oics-button" style="float: right; margin: 0 0 -15px"> |
| <a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_working_dir=dialogflowcx_page_full&cloudshell_image=gcr.io%2Fcloudshell-images%2Fcloudshell%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md" target="_blank"> |
| <img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;"> |
| </a> |
| </div> |
| ## Example Usage - Dialogflowcx Page Full |
| |
| |
| ```hcl |
| resource "google_dialogflow_cx_agent" "agent" { |
| display_name = "dialogflowcx-agent" |
| location = "global" |
| default_language_code = "en" |
| supported_language_codes = ["fr", "de", "es"] |
| time_zone = "America/New_York" |
| description = "Example description." |
| avatar_uri = "https://cloud.google.com/_static/images/cloud/icons/favicons/onecloud/super_cloud.png" |
| enable_stackdriver_logging = true |
| enable_spell_correction = true |
| speech_to_text_settings { |
| enable_speech_adaptation = true |
| } |
| } |
| |
| |
| resource "google_dialogflow_cx_page" "basic_page" { |
| parent = google_dialogflow_cx_agent.agent.start_flow |
| display_name = "MyPage" |
| |
| entry_fulfillment { |
| messages { |
| channel = "some-channel" |
| text { |
| text = ["Welcome to page"] |
| } |
| } |
| messages { |
| payload = <<EOF |
| {"some-key": "some-value", "other-key": ["other-value"]} |
| EOF |
| } |
| messages { |
| conversation_success { |
| metadata = <<EOF |
| {"some-metadata-key": "some-value", "other-metadata-key": 1234} |
| EOF |
| } |
| } |
| messages { |
| output_audio_text { |
| text = "some output text" |
| } |
| } |
| messages { |
| output_audio_text { |
| ssml = <<EOF |
| <speak>Some example <say-as interpret-as="characters">SSML XML</say-as></speak> |
| EOF |
| } |
| } |
| messages { |
| live_agent_handoff { |
| metadata = <<EOF |
| {"some-metadata-key": "some-value", "other-metadata-key": 1234} |
| EOF |
| } |
| } |
| messages { |
| play_audio { |
| audio_uri = "http://example.com/some-audio-file.mp3" |
| } |
| } |
| messages { |
| telephony_transfer_call { |
| phone_number = "1-234-567-8901" |
| } |
| } |
| |
| set_parameter_actions { |
| parameter = "some-param" |
| value = "123.45" |
| } |
| set_parameter_actions { |
| parameter = "another-param" |
| value = jsonencode("abc") |
| } |
| set_parameter_actions { |
| parameter = "other-param" |
| value = jsonencode(["foo"]) |
| } |
| |
| conditional_cases { |
| cases = jsonencode([ |
| { |
| condition = "$sys.func.RAND() < 0.5", |
| caseContent = [ |
| { |
| message = { text = { text = ["First case"] } } |
| }, |
| { |
| additionalCases = { |
| cases = [ |
| { |
| condition = "$sys.func.RAND() < 0.2" |
| caseContent = [ |
| { |
| message = { text = { text = ["Nested case"] } } |
| } |
| ] |
| } |
| ] |
| } |
| } |
| ] |
| }, |
| { |
| caseContent = [ |
| { |
| message = { text = { text = ["Final case"] } } |
| } |
| ] |
| }, |
| ]) |
| } |
| } |
| |
| event_handlers { |
| event = "some-event" |
| trigger_fulfillment { |
| return_partial_responses = true |
| messages { |
| channel = "some-channel" |
| text { |
| text = ["Some text"] |
| } |
| } |
| messages { |
| payload = <<EOF |
| {"some-key": "some-value", "other-key": ["other-value"]} |
| EOF |
| } |
| messages { |
| conversation_success { |
| metadata = <<EOF |
| {"some-metadata-key": "some-value", "other-metadata-key": 1234} |
| EOF |
| } |
| } |
| messages { |
| output_audio_text { |
| text = "some output text" |
| } |
| } |
| messages { |
| output_audio_text { |
| ssml = <<EOF |
| <speak>Some example <say-as interpret-as="characters">SSML XML</say-as></speak> |
| EOF |
| } |
| } |
| messages { |
| live_agent_handoff { |
| metadata = <<EOF |
| {"some-metadata-key": "some-value", "other-metadata-key": 1234} |
| EOF |
| } |
| } |
| messages { |
| play_audio { |
| audio_uri = "http://example.com/some-audio-file.mp3" |
| } |
| } |
| messages { |
| telephony_transfer_call { |
| phone_number = "1-234-567-8901" |
| } |
| } |
| |
| set_parameter_actions { |
| parameter = "some-param" |
| value = "123.45" |
| } |
| set_parameter_actions { |
| parameter = "another-param" |
| value = jsonencode("abc") |
| } |
| set_parameter_actions { |
| parameter = "other-param" |
| value = jsonencode(["foo"]) |
| } |
| |
| conditional_cases { |
| cases = jsonencode([ |
| { |
| condition = "$sys.func.RAND() < 0.5", |
| caseContent = [ |
| { |
| message = { text = { text = ["First case"] } } |
| }, |
| { |
| additionalCases = { |
| cases = [ |
| { |
| condition = "$sys.func.RAND() < 0.2" |
| caseContent = [ |
| { |
| message = { text = { text = ["Nested case"] } } |
| } |
| ] |
| } |
| ] |
| } |
| } |
| ] |
| }, |
| { |
| caseContent = [ |
| { |
| message = { text = { text = ["Final case"] } } |
| } |
| ] |
| }, |
| ]) |
| } |
| } |
| } |
| |
| form { |
| parameters { |
| display_name = "param1" |
| entity_type = "projects/-/locations/-/agents/-/entityTypes/sys.date" |
| default_value = jsonencode("2000-01-01") |
| fill_behavior { |
| initial_prompt_fulfillment { |
| messages { |
| channel = "some-channel" |
| text { |
| text = ["Please provide param1"] |
| } |
| } |
| messages { |
| payload = <<EOF |
| {"some-key": "some-value", "other-key": ["other-value"]} |
| EOF |
| } |
| messages { |
| conversation_success { |
| metadata = <<EOF |
| {"some-metadata-key": "some-value", "other-metadata-key": 1234} |
| EOF |
| } |
| } |
| messages { |
| output_audio_text { |
| text = "some output text" |
| } |
| } |
| messages { |
| output_audio_text { |
| ssml = <<EOF |
| <speak>Some example <say-as interpret-as="characters">SSML XML</say-as></speak> |
| EOF |
| } |
| } |
| messages { |
| live_agent_handoff { |
| metadata = <<EOF |
| {"some-metadata-key": "some-value", "other-metadata-key": 1234} |
| EOF |
| } |
| } |
| messages { |
| play_audio { |
| audio_uri = "http://example.com/some-audio-file.mp3" |
| } |
| } |
| messages { |
| telephony_transfer_call { |
| phone_number = "1-234-567-8901" |
| } |
| } |
| |
| set_parameter_actions { |
| parameter = "some-param" |
| value = "123.45" |
| } |
| set_parameter_actions { |
| parameter = "another-param" |
| value = jsonencode("abc") |
| } |
| set_parameter_actions { |
| parameter = "other-param" |
| value = jsonencode(["foo"]) |
| } |
| |
| conditional_cases { |
| cases = jsonencode([ |
| { |
| condition = "$sys.func.RAND() < 0.5", |
| caseContent = [ |
| { |
| message = { text = { text = ["First case"] } } |
| }, |
| { |
| additionalCases = { |
| cases = [ |
| { |
| condition = "$sys.func.RAND() < 0.2" |
| caseContent = [ |
| { |
| message = { text = { text = ["Nested case"] } } |
| } |
| ] |
| } |
| ] |
| } |
| } |
| ] |
| }, |
| { |
| caseContent = [ |
| { |
| message = { text = { text = ["Final case"] } } |
| } |
| ] |
| }, |
| ]) |
| } |
| } |
| reprompt_event_handlers { |
| event = "sys.no-match-1" |
| trigger_fulfillment { |
| return_partial_responses = true |
| webhook = google_dialogflow_cx_webhook.my_webhook.id |
| tag = "some-tag" |
| |
| messages { |
| channel = "some-channel" |
| text { |
| text = ["Please provide param1"] |
| } |
| } |
| messages { |
| payload = <<EOF |
| {"some-key": "some-value", "other-key": ["other-value"]} |
| EOF |
| } |
| messages { |
| conversation_success { |
| metadata = <<EOF |
| {"some-metadata-key": "some-value", "other-metadata-key": 1234} |
| EOF |
| } |
| } |
| messages { |
| output_audio_text { |
| text = "some output text" |
| } |
| } |
| messages { |
| output_audio_text { |
| ssml = <<EOF |
| <speak>Some example <say-as interpret-as="characters">SSML XML</say-as></speak> |
| EOF |
| } |
| } |
| messages { |
| live_agent_handoff { |
| metadata = <<EOF |
| {"some-metadata-key": "some-value", "other-metadata-key": 1234} |
| EOF |
| } |
| } |
| messages { |
| play_audio { |
| audio_uri = "http://example.com/some-audio-file.mp3" |
| } |
| } |
| messages { |
| telephony_transfer_call { |
| phone_number = "1-234-567-8901" |
| } |
| } |
| |
| set_parameter_actions { |
| parameter = "some-param" |
| value = "123.45" |
| } |
| set_parameter_actions { |
| parameter = "another-param" |
| value = jsonencode("abc") |
| } |
| set_parameter_actions { |
| parameter = "other-param" |
| value = jsonencode(["foo"]) |
| } |
| |
| conditional_cases { |
| cases = jsonencode([ |
| { |
| condition = "$sys.func.RAND() < 0.5", |
| caseContent = [ |
| { |
| message = { text = { text = ["First case"] } } |
| }, |
| { |
| additionalCases = { |
| cases = [ |
| { |
| condition = "$sys.func.RAND() < 0.2" |
| caseContent = [ |
| { |
| message = { text = { text = ["Nested case"] } } |
| } |
| ] |
| } |
| ] |
| } |
| } |
| ] |
| }, |
| { |
| caseContent = [ |
| { |
| message = { text = { text = ["Final case"] } } |
| } |
| ] |
| }, |
| ]) |
| } |
| } |
| } |
| reprompt_event_handlers { |
| event = "sys.no-match-2" |
| target_flow = google_dialogflow_cx_agent.agent.start_flow |
| } |
| reprompt_event_handlers { |
| event = "sys.no-match-3" |
| target_page = google_dialogflow_cx_page.my_page2.id |
| } |
| } |
| required = "true" |
| redact = "true" |
| advanced_settings { |
| dtmf_settings { |
| enabled = true |
| max_digits = 1 |
| finish_digit = "#" |
| } |
| } |
| } |
| } |
| |
| transition_routes { |
| condition = "$page.params.status = 'FINAL'" |
| trigger_fulfillment { |
| messages { |
| channel = "some-channel" |
| text { |
| text = ["information completed, navigating to page 2"] |
| } |
| } |
| messages { |
| payload = <<EOF |
| {"some-key": "some-value", "other-key": ["other-value"]} |
| EOF |
| } |
| messages { |
| conversation_success { |
| metadata = <<EOF |
| {"some-metadata-key": "some-value", "other-metadata-key": 1234} |
| EOF |
| } |
| } |
| messages { |
| output_audio_text { |
| text = "some output text" |
| } |
| } |
| messages { |
| output_audio_text { |
| ssml = <<EOF |
| <speak>Some example <say-as interpret-as="characters">SSML XML</say-as></speak> |
| EOF |
| } |
| } |
| messages { |
| live_agent_handoff { |
| metadata = <<EOF |
| {"some-metadata-key": "some-value", "other-metadata-key": 1234} |
| EOF |
| } |
| } |
| messages { |
| play_audio { |
| audio_uri = "http://example.com/some-audio-file.mp3" |
| } |
| } |
| messages { |
| telephony_transfer_call { |
| phone_number = "1-234-567-8901" |
| } |
| } |
| |
| set_parameter_actions { |
| parameter = "some-param" |
| value = "123.45" |
| } |
| set_parameter_actions { |
| parameter = "another-param" |
| value = jsonencode("abc") |
| } |
| set_parameter_actions { |
| parameter = "other-param" |
| value = jsonencode(["foo"]) |
| } |
| |
| conditional_cases { |
| cases = jsonencode([ |
| { |
| condition = "$sys.func.RAND() < 0.5", |
| caseContent = [ |
| { |
| message = { text = { text = ["First case"] } } |
| }, |
| { |
| additionalCases = { |
| cases = [ |
| { |
| condition = "$sys.func.RAND() < 0.2" |
| caseContent = [ |
| { |
| message = { text = { text = ["Nested case"] } } |
| } |
| ] |
| } |
| ] |
| } |
| } |
| ] |
| }, |
| { |
| caseContent = [ |
| { |
| message = { text = { text = ["Final case"] } } |
| } |
| ] |
| }, |
| ]) |
| } |
| } |
| target_page = google_dialogflow_cx_page.my_page2.id |
| } |
| |
| advanced_settings { |
| dtmf_settings { |
| enabled = true |
| max_digits = 1 |
| finish_digit = "#" |
| } |
| } |
| } |
| |
| resource "google_dialogflow_cx_page" "my_page2" { |
| parent = google_dialogflow_cx_agent.agent.start_flow |
| display_name = "MyPage2" |
| } |
| |
| resource "google_dialogflow_cx_webhook" "my_webhook" { |
| parent = google_dialogflow_cx_agent.agent.id |
| display_name = "MyWebhook" |
| generic_web_service { |
| uri = "https://example.com" |
| } |
| } |
| ``` |
| |
| ## Argument Reference |
| |
| The following arguments are supported: |
| |
| |
| * `display_name` - |
| (Required) |
| The human-readable name of the page, unique within the agent. |
| |
| |
| - - - |
| |
| |
| * `entry_fulfillment` - |
| (Optional) |
| The fulfillment to call when the session is entering the page. |
| Structure is [documented below](#nested_entry_fulfillment). |
| |
| * `form` - |
| (Optional) |
| The form associated with the page, used for collecting parameters relevant to the page. |
| Structure is [documented below](#nested_form). |
| |
| * `transition_route_groups` - |
| (Optional) |
| Ordered list of TransitionRouteGroups associated with the page. Transition route groups must be unique within a page. |
| If multiple transition routes within a page scope refer to the same intent, then the precedence order is: page's transition route -> page's transition route group -> flow's transition routes. |
| If multiple transition route groups within a page contain the same intent, then the first group in the ordered list takes precedence. |
| Format:projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>. |
| |
| * `transition_routes` - |
| (Optional) |
| A list of transitions for the transition rules of this page. They route the conversation to another page in the same flow, or another flow. |
| When we are in a certain page, the TransitionRoutes are evalauted in the following order: |
| TransitionRoutes defined in the page with intent specified. |
| TransitionRoutes defined in the transition route groups with intent specified. |
| TransitionRoutes defined in flow with intent specified. |
| TransitionRoutes defined in the transition route groups with intent specified. |
| TransitionRoutes defined in the page with only condition specified. |
| TransitionRoutes defined in the transition route groups with only condition specified. |
| Structure is [documented below](#nested_transition_routes). |
| |
| * `event_handlers` - |
| (Optional) |
| Handlers associated with the page to handle events such as webhook errors, no match or no input. |
| Structure is [documented below](#nested_event_handlers). |
| |
| * `advanced_settings` - |
| (Optional) |
| Hierarchical advanced settings for this page. The settings exposed at the lower level overrides the settings exposed at the higher level. |
| Hierarchy: Agent->Flow->Page->Fulfillment/Parameter. |
| Structure is [documented below](#nested_advanced_settings). |
| |
| * `parent` - |
| (Optional) |
| The flow to create a page for. |
| Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>. |
| |
| * `language_code` - |
| (Optional) |
| The language of the following fields in page: |
| Page.entry_fulfillment.messages |
| Page.entry_fulfillment.conditional_cases |
| Page.event_handlers.trigger_fulfillment.messages |
| Page.event_handlers.trigger_fulfillment.conditional_cases |
| Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages |
| Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases |
| Page.form.parameters.fill_behavior.reprompt_event_handlers.messages |
| Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases |
| Page.transition_routes.trigger_fulfillment.messages |
| Page.transition_routes.trigger_fulfillment.conditional_cases |
| If not specified, the agent's default language is used. Many languages are supported. Note: languages must be enabled in the agent before they can be used. |
| |
| |
| <a name="nested_entry_fulfillment"></a>The `entry_fulfillment` block supports: |
| |
| * `messages` - |
| (Optional) |
| The list of rich message responses to present to the user. |
| Structure is [documented below](#nested_messages). |
| |
| * `webhook` - |
| (Optional) |
| The webhook to call. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/webhooks/<Webhook ID>. |
| |
| * `return_partial_responses` - |
| (Optional) |
| Whether Dialogflow should return currently queued fulfillment response messages in streaming APIs. If a webhook is specified, it happens before Dialogflow invokes webhook. Warning: 1) This flag only affects streaming API. Responses are still queued and returned once in non-streaming API. 2) The flag can be enabled in any fulfillment but only the first 3 partial responses will be returned. You may only want to apply it to fulfillments that have slow webhooks. |
| |
| * `tag` - |
| (Optional) |
| The tag used by the webhook to identify which fulfillment is being called. This field is required if webhook is specified. |
| |
| * `set_parameter_actions` - |
| (Optional) |
| Set parameter values before executing the webhook. |
| Structure is [documented below](#nested_set_parameter_actions). |
| |
| * `conditional_cases` - |
| (Optional) |
| Conditional cases for this fulfillment. |
| Structure is [documented below](#nested_conditional_cases). |
| |
| |
| <a name="nested_messages"></a>The `messages` block supports: |
| |
| * `channel` - |
| (Optional) |
| The channel which the response is associated with. Clients can specify the channel via QueryParameters.channel, and only associated channel response will be returned. |
| |
| * `text` - |
| (Optional) |
| The text response message. |
| Structure is [documented below](#nested_text). |
| |
| * `payload` - |
| (Optional) |
| A custom, platform-specific payload. |
| |
| * `conversation_success` - |
| (Optional) |
| Indicates that the conversation succeeded, i.e., the bot handled the issue that the customer talked to it about. |
| Dialogflow only uses this to determine which conversations should be counted as successful and doesn't process the metadata in this message in any way. Note that Dialogflow also considers conversations that get to the conversation end page as successful even if they don't return ConversationSuccess. |
| You may set this, for example: |
| * In the entryFulfillment of a Page if entering the page indicates that the conversation succeeded. |
| * In a webhook response when you determine that you handled the customer issue. |
| Structure is [documented below](#nested_conversation_success). |
| |
| * `output_audio_text` - |
| (Optional) |
| A text or ssml response that is preferentially used for TTS output audio synthesis, as described in the comment on the ResponseMessage message. |
| Structure is [documented below](#nested_output_audio_text). |
| |
| * `live_agent_handoff` - |
| (Optional) |
| Indicates that the conversation should be handed off to a live agent. |
| Dialogflow only uses this to determine which conversations were handed off to a human agent for measurement purposes. What else to do with this signal is up to you and your handoff procedures. |
| You may set this, for example: |
| * In the entryFulfillment of a Page if entering the page indicates something went extremely wrong in the conversation. |
| * In a webhook response when you determine that the customer issue can only be handled by a human. |
| Structure is [documented below](#nested_live_agent_handoff). |
| |
| * `play_audio` - |
| (Optional) |
| Specifies an audio clip to be played by the client as part of the response. |
| Structure is [documented below](#nested_play_audio). |
| |
| * `telephony_transfer_call` - |
| (Optional) |
| Represents the signal that telles the client to transfer the phone call connected to the agent to a third-party endpoint. |
| Structure is [documented below](#nested_telephony_transfer_call). |
| |
| |
| <a name="nested_text"></a>The `text` block supports: |
| |
| * `text` - |
| (Optional) |
| A collection of text responses. |
| |
| * `allow_playback_interruption` - |
| (Output) |
| Whether the playback of this message can be interrupted by the end user's speech and the client can then starts the next Dialogflow request. |
| |
| <a name="nested_conversation_success"></a>The `conversation_success` block supports: |
| |
| * `metadata` - |
| (Optional) |
| Custom metadata. Dialogflow doesn't impose any structure on this. |
| |
| <a name="nested_output_audio_text"></a>The `output_audio_text` block supports: |
| |
| * `allow_playback_interruption` - |
| (Output) |
| Whether the playback of this message can be interrupted by the end user's speech and the client can then starts the next Dialogflow request. |
| |
| * `text` - |
| (Optional) |
| The raw text to be synthesized. |
| |
| * `ssml` - |
| (Optional) |
| The SSML text to be synthesized. For more information, see SSML. |
| |
| <a name="nested_live_agent_handoff"></a>The `live_agent_handoff` block supports: |
| |
| * `metadata` - |
| (Optional) |
| Custom metadata. Dialogflow doesn't impose any structure on this. |
| |
| <a name="nested_play_audio"></a>The `play_audio` block supports: |
| |
| * `audio_uri` - |
| (Required) |
| URI of the audio clip. Dialogflow does not impose any validation on this value. It is specific to the client that reads it. |
| |
| * `allow_playback_interruption` - |
| (Output) |
| Whether the playback of this message can be interrupted by the end user's speech and the client can then starts the next Dialogflow request. |
| |
| <a name="nested_telephony_transfer_call"></a>The `telephony_transfer_call` block supports: |
| |
| * `phone_number` - |
| (Required) |
| Transfer the call to a phone number in E.164 format. |
| |
| <a name="nested_set_parameter_actions"></a>The `set_parameter_actions` block supports: |
| |
| * `parameter` - |
| (Optional) |
| Display name of the parameter. |
| |
| * `value` - |
| (Optional) |
| The new JSON-encoded value of the parameter. A null value clears the parameter. |
| |
| <a name="nested_conditional_cases"></a>The `conditional_cases` block supports: |
| |
| * `cases` - |
| (Optional) |
| A JSON encoded list of cascading if-else conditions. Cases are mutually exclusive. The first one with a matching condition is selected, all the rest ignored. |
| See [Case](https://cloud.google.com/dialogflow/cx/docs/reference/rest/v3/Fulfillment#case) for the schema. |
| |
| <a name="nested_form"></a>The `form` block supports: |
| |
| * `parameters` - |
| (Optional) |
| Parameters to collect from the user. |
| Structure is [documented below](#nested_parameters). |
| |
| |
| <a name="nested_parameters"></a>The `parameters` block supports: |
| |
| * `display_name` - |
| (Optional) |
| The human-readable name of the parameter, unique within the form. |
| |
| * `required` - |
| (Optional) |
| Indicates whether the parameter is required. Optional parameters will not trigger prompts; however, they are filled if the user specifies them. |
| Required parameters must be filled before form filling concludes. |
| |
| * `entity_type` - |
| (Optional) |
| The entity type of the parameter. |
| Format: projects/-/locations/-/agents/-/entityTypes/<System Entity Type ID> for system entity types (for example, projects/-/locations/-/agents/-/entityTypes/sys.date), or projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/entityTypes/<Entity Type ID> for developer entity types. |
| |
| * `is_list` - |
| (Optional) |
| Indicates whether the parameter represents a list of values. |
| |
| * `fill_behavior` - |
| (Optional) |
| Defines fill behavior for the parameter. |
| Structure is [documented below](#nested_fill_behavior). |
| |
| * `default_value` - |
| (Optional) |
| The default value of an optional parameter. If the parameter is required, the default value will be ignored. |
| |
| * `redact` - |
| (Optional) |
| Indicates whether the parameter content should be redacted in log. |
| If redaction is enabled, the parameter content will be replaced by parameter name during logging. Note: the parameter content is subject to redaction if either parameter level redaction or entity type level redaction is enabled. |
| |
| * `advanced_settings` - |
| (Optional) |
| Hierarchical advanced settings for this parameter. The settings exposed at the lower level overrides the settings exposed at the higher level. |
| Hierarchy: Agent->Flow->Page->Fulfillment/Parameter. |
| Structure is [documented below](#nested_advanced_settings). |
| |
| |
| <a name="nested_fill_behavior"></a>The `fill_behavior` block supports: |
| |
| * `initial_prompt_fulfillment` - |
| (Optional) |
| The fulfillment to provide the initial prompt that the agent can present to the user in order to fill the parameter. |
| Structure is [documented below](#nested_initial_prompt_fulfillment). |
| |
| * `reprompt_event_handlers` - |
| (Optional) |
| The handlers for parameter-level events, used to provide reprompt for the parameter or transition to a different page/flow. The supported events are: |
| * sys.no-match-<N>, where N can be from 1 to 6 |
| * sys.no-match-default |
| * sys.no-input-<N>, where N can be from 1 to 6 |
| * sys.no-input-default |
| * sys.invalid-parameter |
| [initialPromptFulfillment][initialPromptFulfillment] provides the first prompt for the parameter. |
| If the user's response does not fill the parameter, a no-match/no-input event will be triggered, and the fulfillment associated with the sys.no-match-1/sys.no-input-1 handler (if defined) will be called to provide a prompt. The sys.no-match-2/sys.no-input-2 handler (if defined) will respond to the next no-match/no-input event, and so on. |
| A sys.no-match-default or sys.no-input-default handler will be used to handle all following no-match/no-input events after all numbered no-match/no-input handlers for the parameter are consumed. |
| A sys.invalid-parameter handler can be defined to handle the case where the parameter values have been invalidated by webhook. For example, if the user's response fill the parameter, however the parameter was invalidated by webhook, the fulfillment associated with the sys.invalid-parameter handler (if defined) will be called to provide a prompt. |
| If the event handler for the corresponding event can't be found on the parameter, initialPromptFulfillment will be re-prompted. |
| Structure is [documented below](#nested_reprompt_event_handlers). |
| |
| |
| <a name="nested_initial_prompt_fulfillment"></a>The `initial_prompt_fulfillment` block supports: |
| |
| * `messages` - |
| (Optional) |
| The list of rich message responses to present to the user. |
| Structure is [documented below](#nested_messages). |
| |
| * `webhook` - |
| (Optional) |
| The webhook to call. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/webhooks/<Webhook ID>. |
| |
| * `return_partial_responses` - |
| (Optional) |
| Whether Dialogflow should return currently queued fulfillment response messages in streaming APIs. If a webhook is specified, it happens before Dialogflow invokes webhook. Warning: 1) This flag only affects streaming API. Responses are still queued and returned once in non-streaming API. 2) The flag can be enabled in any fulfillment but only the first 3 partial responses will be returned. You may only want to apply it to fulfillments that have slow webhooks. |
| |
| * `tag` - |
| (Optional) |
| The tag used by the webhook to identify which fulfillment is being called. This field is required if webhook is specified. |
| |
| * `set_parameter_actions` - |
| (Optional) |
| Set parameter values before executing the webhook. |
| Structure is [documented below](#nested_set_parameter_actions). |
| |
| * `conditional_cases` - |
| (Optional) |
| Conditional cases for this fulfillment. |
| Structure is [documented below](#nested_conditional_cases). |
| |
| |
| <a name="nested_messages"></a>The `messages` block supports: |
| |
| * `channel` - |
| (Optional) |
| The channel which the response is associated with. Clients can specify the channel via QueryParameters.channel, and only associated channel response will be returned. |
| |
| * `text` - |
| (Optional) |
| The text response message. |
| Structure is [documented below](#nested_text). |
| |
| * `payload` - |
| (Optional) |
| A custom, platform-specific payload. |
| |
| * `conversation_success` - |
| (Optional) |
| Indicates that the conversation succeeded, i.e., the bot handled the issue that the customer talked to it about. |
| Dialogflow only uses this to determine which conversations should be counted as successful and doesn't process the metadata in this message in any way. Note that Dialogflow also considers conversations that get to the conversation end page as successful even if they don't return ConversationSuccess. |
| You may set this, for example: |
| * In the entryFulfillment of a Page if entering the page indicates that the conversation succeeded. |
| * In a webhook response when you determine that you handled the customer issue. |
| Structure is [documented below](#nested_conversation_success). |
| |
| * `output_audio_text` - |
| (Optional) |
| A text or ssml response that is preferentially used for TTS output audio synthesis, as described in the comment on the ResponseMessage message. |
| Structure is [documented below](#nested_output_audio_text). |
| |
| * `live_agent_handoff` - |
| (Optional) |
| Indicates that the conversation should be handed off to a live agent. |
| Dialogflow only uses this to determine which conversations were handed off to a human agent for measurement purposes. What else to do with this signal is up to you and your handoff procedures. |
| You may set this, for example: |
| * In the entryFulfillment of a Page if entering the page indicates something went extremely wrong in the conversation. |
| * In a webhook response when you determine that the customer issue can only be handled by a human. |
| Structure is [documented below](#nested_live_agent_handoff). |
| |
| * `play_audio` - |
| (Optional) |
| Specifies an audio clip to be played by the client as part of the response. |
| Structure is [documented below](#nested_play_audio). |
| |
| * `telephony_transfer_call` - |
| (Optional) |
| Represents the signal that telles the client to transfer the phone call connected to the agent to a third-party endpoint. |
| Structure is [documented below](#nested_telephony_transfer_call). |
| |
| |
| <a name="nested_text"></a>The `text` block supports: |
| |
| * `text` - |
| (Optional) |
| A collection of text responses. |
| |
| * `allow_playback_interruption` - |
| (Output) |
| Whether the playback of this message can be interrupted by the end user's speech and the client can then starts the next Dialogflow request. |
| |
| <a name="nested_conversation_success"></a>The `conversation_success` block supports: |
| |
| * `metadata` - |
| (Optional) |
| Custom metadata. Dialogflow doesn't impose any structure on this. |
| |
| <a name="nested_output_audio_text"></a>The `output_audio_text` block supports: |
| |
| * `allow_playback_interruption` - |
| (Output) |
| Whether the playback of this message can be interrupted by the end user's speech and the client can then starts the next Dialogflow request. |
| |
| * `text` - |
| (Optional) |
| The raw text to be synthesized. |
| |
| * `ssml` - |
| (Optional) |
| The SSML text to be synthesized. For more information, see SSML. |
| |
| <a name="nested_live_agent_handoff"></a>The `live_agent_handoff` block supports: |
| |
| * `metadata` - |
| (Optional) |
| Custom metadata. Dialogflow doesn't impose any structure on this. |
| |
| <a name="nested_play_audio"></a>The `play_audio` block supports: |
| |
| * `audio_uri` - |
| (Required) |
| URI of the audio clip. Dialogflow does not impose any validation on this value. It is specific to the client that reads it. |
| |
| * `allow_playback_interruption` - |
| (Output) |
| Whether the playback of this message can be interrupted by the end user's speech and the client can then starts the next Dialogflow request. |
| |
| <a name="nested_telephony_transfer_call"></a>The `telephony_transfer_call` block supports: |
| |
| * `phone_number` - |
| (Required) |
| Transfer the call to a phone number in E.164 format. |
| |
| <a name="nested_set_parameter_actions"></a>The `set_parameter_actions` block supports: |
| |
| * `parameter` - |
| (Optional) |
| Display name of the parameter. |
| |
| * `value` - |
| (Optional) |
| The new JSON-encoded value of the parameter. A null value clears the parameter. |
| |
| <a name="nested_conditional_cases"></a>The `conditional_cases` block supports: |
| |
| * `cases` - |
| (Optional) |
| A JSON encoded list of cascading if-else conditions. Cases are mutually exclusive. The first one with a matching condition is selected, all the rest ignored. |
| See [Case](https://cloud.google.com/dialogflow/cx/docs/reference/rest/v3/Fulfillment#case) for the schema. |
| |
| <a name="nested_reprompt_event_handlers"></a>The `reprompt_event_handlers` block supports: |
| |
| * `name` - |
| (Output) |
| The unique identifier of this event handler. |
| |
| * `event` - |
| (Optional) |
| The name of the event to handle. |
| |
| * `trigger_fulfillment` - |
| (Optional) |
| The fulfillment to call when the event occurs. Handling webhook errors with a fulfillment enabled with webhook could cause infinite loop. It is invalid to specify such fulfillment for a handler handling webhooks. |
| Structure is [documented below](#nested_trigger_fulfillment). |
| |
| * `target_page` - |
| (Optional) |
| The target page to transition to. |
| Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>/pages/<Page ID>. |
| |
| * `target_flow` - |
| (Optional) |
| The target flow to transition to. |
| Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>. |
| |
| |
| <a name="nested_trigger_fulfillment"></a>The `trigger_fulfillment` block supports: |
| |
| * `messages` - |
| (Optional) |
| The list of rich message responses to present to the user. |
| Structure is [documented below](#nested_messages). |
| |
| * `webhook` - |
| (Optional) |
| The webhook to call. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/webhooks/<Webhook ID>. |
| |
| * `return_partial_responses` - |
| (Optional) |
| Whether Dialogflow should return currently queued fulfillment response messages in streaming APIs. If a webhook is specified, it happens before Dialogflow invokes webhook. Warning: 1) This flag only affects streaming API. Responses are still queued and returned once in non-streaming API. 2) The flag can be enabled in any fulfillment but only the first 3 partial responses will be returned. You may only want to apply it to fulfillments that have slow webhooks. |
| |
| * `tag` - |
| (Optional) |
| The tag used by the webhook to identify which fulfillment is being called. This field is required if webhook is specified. |
| |
| * `set_parameter_actions` - |
| (Optional) |
| Set parameter values before executing the webhook. |
| Structure is [documented below](#nested_set_parameter_actions). |
| |
| * `conditional_cases` - |
| (Optional) |
| Conditional cases for this fulfillment. |
| Structure is [documented below](#nested_conditional_cases). |
| |
| |
| <a name="nested_messages"></a>The `messages` block supports: |
| |
| * `channel` - |
| (Optional) |
| The channel which the response is associated with. Clients can specify the channel via QueryParameters.channel, and only associated channel response will be returned. |
| |
| * `text` - |
| (Optional) |
| The text response message. |
| Structure is [documented below](#nested_text). |
| |
| * `payload` - |
| (Optional) |
| A custom, platform-specific payload. |
| |
| * `conversation_success` - |
| (Optional) |
| Indicates that the conversation succeeded, i.e., the bot handled the issue that the customer talked to it about. |
| Dialogflow only uses this to determine which conversations should be counted as successful and doesn't process the metadata in this message in any way. Note that Dialogflow also considers conversations that get to the conversation end page as successful even if they don't return ConversationSuccess. |
| You may set this, for example: |
| * In the entryFulfillment of a Page if entering the page indicates that the conversation succeeded. |
| * In a webhook response when you determine that you handled the customer issue. |
| Structure is [documented below](#nested_conversation_success). |
| |
| * `output_audio_text` - |
| (Optional) |
| A text or ssml response that is preferentially used for TTS output audio synthesis, as described in the comment on the ResponseMessage message. |
| Structure is [documented below](#nested_output_audio_text). |
| |
| * `live_agent_handoff` - |
| (Optional) |
| Indicates that the conversation should be handed off to a live agent. |
| Dialogflow only uses this to determine which conversations were handed off to a human agent for measurement purposes. What else to do with this signal is up to you and your handoff procedures. |
| You may set this, for example: |
| * In the entryFulfillment of a Page if entering the page indicates something went extremely wrong in the conversation. |
| * In a webhook response when you determine that the customer issue can only be handled by a human. |
| Structure is [documented below](#nested_live_agent_handoff). |
| |
| * `play_audio` - |
| (Optional) |
| Specifies an audio clip to be played by the client as part of the response. |
| Structure is [documented below](#nested_play_audio). |
| |
| * `telephony_transfer_call` - |
| (Optional) |
| Represents the signal that telles the client to transfer the phone call connected to the agent to a third-party endpoint. |
| Structure is [documented below](#nested_telephony_transfer_call). |
| |
| |
| <a name="nested_text"></a>The `text` block supports: |
| |
| * `text` - |
| (Optional) |
| A collection of text responses. |
| |
| * `allow_playback_interruption` - |
| (Output) |
| Whether the playback of this message can be interrupted by the end user's speech and the client can then starts the next Dialogflow request. |
| |
| <a name="nested_conversation_success"></a>The `conversation_success` block supports: |
| |
| * `metadata` - |
| (Optional) |
| Custom metadata. Dialogflow doesn't impose any structure on this. |
| |
| <a name="nested_output_audio_text"></a>The `output_audio_text` block supports: |
| |
| * `allow_playback_interruption` - |
| (Output) |
| Whether the playback of this message can be interrupted by the end user's speech and the client can then starts the next Dialogflow request. |
| |
| * `text` - |
| (Optional) |
| The raw text to be synthesized. |
| |
| * `ssml` - |
| (Optional) |
| The SSML text to be synthesized. For more information, see SSML. |
| |
| <a name="nested_live_agent_handoff"></a>The `live_agent_handoff` block supports: |
| |
| * `metadata` - |
| (Optional) |
| Custom metadata. Dialogflow doesn't impose any structure on this. |
| |
| <a name="nested_play_audio"></a>The `play_audio` block supports: |
| |
| * `audio_uri` - |
| (Required) |
| URI of the audio clip. Dialogflow does not impose any validation on this value. It is specific to the client that reads it. |
| |
| * `allow_playback_interruption` - |
| (Output) |
| Whether the playback of this message can be interrupted by the end user's speech and the client can then starts the next Dialogflow request. |
| |
| <a name="nested_telephony_transfer_call"></a>The `telephony_transfer_call` block supports: |
| |
| * `phone_number` - |
| (Required) |
| Transfer the call to a phone number in E.164 format. |
| |
| <a name="nested_set_parameter_actions"></a>The `set_parameter_actions` block supports: |
| |
| * `parameter` - |
| (Optional) |
| Display name of the parameter. |
| |
| * `value` - |
| (Optional) |
| The new JSON-encoded value of the parameter. A null value clears the parameter. |
| |
| <a name="nested_conditional_cases"></a>The `conditional_cases` block supports: |
| |
| * `cases` - |
| (Optional) |
| A JSON encoded list of cascading if-else conditions. Cases are mutually exclusive. The first one with a matching condition is selected, all the rest ignored. |
| See [Case](https://cloud.google.com/dialogflow/cx/docs/reference/rest/v3/Fulfillment#case) for the schema. |
| |
| <a name="nested_advanced_settings"></a>The `advanced_settings` block supports: |
| |
| * `dtmf_settings` - |
| (Optional) |
| Define behaviors for DTMF (dual tone multi frequency). DTMF settings does not override each other. DTMF settings set at different levels define DTMF detections running in parallel. Exposed at the following levels: |
| * Agent level |
| * Flow level |
| * Page level |
| * Parameter level |
| Structure is [documented below](#nested_dtmf_settings). |
| |
| |
| <a name="nested_dtmf_settings"></a>The `dtmf_settings` block supports: |
| |
| * `enabled` - |
| (Optional) |
| If true, incoming audio is processed for DTMF (dual tone multi frequency) events. For example, if the caller presses a button on their telephone keypad and DTMF processing is enabled, Dialogflow will detect the event (e.g. a "3" was pressed) in the incoming audio and pass the event to the bot to drive business logic (e.g. when 3 is pressed, return the account balance). |
| |
| * `max_digits` - |
| (Optional) |
| Max length of DTMF digits. |
| |
| * `finish_digit` - |
| (Optional) |
| The digit that terminates a DTMF digit sequence. |
| |
| <a name="nested_transition_routes"></a>The `transition_routes` block supports: |
| |
| * `name` - |
| (Output) |
| The unique identifier of this transition route. |
| |
| * `intent` - |
| (Optional) |
| The unique identifier of an Intent. |
| Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/intents/<Intent ID>. Indicates that the transition can only happen when the given intent is matched. At least one of intent or condition must be specified. When both intent and condition are specified, the transition can only happen when both are fulfilled. |
| |
| * `condition` - |
| (Optional) |
| The condition to evaluate against form parameters or session parameters. |
| At least one of intent or condition must be specified. When both intent and condition are specified, the transition can only happen when both are fulfilled. |
| |
| * `trigger_fulfillment` - |
| (Optional) |
| The fulfillment to call when the condition is satisfied. At least one of triggerFulfillment and target must be specified. When both are defined, triggerFulfillment is executed first. |
| Structure is [documented below](#nested_trigger_fulfillment). |
| |
| * `target_page` - |
| (Optional) |
| The target page to transition to. |
| Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>/pages/<Page ID>. |
| |
| * `target_flow` - |
| (Optional) |
| The target flow to transition to. |
| Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>. |
| |
| |
| <a name="nested_trigger_fulfillment"></a>The `trigger_fulfillment` block supports: |
| |
| * `messages` - |
| (Optional) |
| The list of rich message responses to present to the user. |
| Structure is [documented below](#nested_messages). |
| |
| * `webhook` - |
| (Optional) |
| The webhook to call. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/webhooks/<Webhook ID>. |
| |
| * `return_partial_responses` - |
| (Optional) |
| Whether Dialogflow should return currently queued fulfillment response messages in streaming APIs. If a webhook is specified, it happens before Dialogflow invokes webhook. Warning: 1) This flag only affects streaming API. Responses are still queued and returned once in non-streaming API. 2) The flag can be enabled in any fulfillment but only the first 3 partial responses will be returned. You may only want to apply it to fulfillments that have slow webhooks. |
| |
| * `tag` - |
| (Optional) |
| The tag used by the webhook to identify which fulfillment is being called. This field is required if webhook is specified. |
| |
| * `set_parameter_actions` - |
| (Optional) |
| Set parameter values before executing the webhook. |
| Structure is [documented below](#nested_set_parameter_actions). |
| |
| * `conditional_cases` - |
| (Optional) |
| Conditional cases for this fulfillment. |
| Structure is [documented below](#nested_conditional_cases). |
| |
| |
| <a name="nested_messages"></a>The `messages` block supports: |
| |
| * `channel` - |
| (Optional) |
| The channel which the response is associated with. Clients can specify the channel via QueryParameters.channel, and only associated channel response will be returned. |
| |
| * `text` - |
| (Optional) |
| The text response message. |
| Structure is [documented below](#nested_text). |
| |
| * `payload` - |
| (Optional) |
| A custom, platform-specific payload. |
| |
| * `conversation_success` - |
| (Optional) |
| Indicates that the conversation succeeded, i.e., the bot handled the issue that the customer talked to it about. |
| Dialogflow only uses this to determine which conversations should be counted as successful and doesn't process the metadata in this message in any way. Note that Dialogflow also considers conversations that get to the conversation end page as successful even if they don't return ConversationSuccess. |
| You may set this, for example: |
| * In the entryFulfillment of a Page if entering the page indicates that the conversation succeeded. |
| * In a webhook response when you determine that you handled the customer issue. |
| Structure is [documented below](#nested_conversation_success). |
| |
| * `output_audio_text` - |
| (Optional) |
| A text or ssml response that is preferentially used for TTS output audio synthesis, as described in the comment on the ResponseMessage message. |
| Structure is [documented below](#nested_output_audio_text). |
| |
| * `live_agent_handoff` - |
| (Optional) |
| Indicates that the conversation should be handed off to a live agent. |
| Dialogflow only uses this to determine which conversations were handed off to a human agent for measurement purposes. What else to do with this signal is up to you and your handoff procedures. |
| You may set this, for example: |
| * In the entryFulfillment of a Page if entering the page indicates something went extremely wrong in the conversation. |
| * In a webhook response when you determine that the customer issue can only be handled by a human. |
| Structure is [documented below](#nested_live_agent_handoff). |
| |
| * `play_audio` - |
| (Optional) |
| Specifies an audio clip to be played by the client as part of the response. |
| Structure is [documented below](#nested_play_audio). |
| |
| * `telephony_transfer_call` - |
| (Optional) |
| Represents the signal that telles the client to transfer the phone call connected to the agent to a third-party endpoint. |
| Structure is [documented below](#nested_telephony_transfer_call). |
| |
| |
| <a name="nested_text"></a>The `text` block supports: |
| |
| * `text` - |
| (Optional) |
| A collection of text responses. |
| |
| * `allow_playback_interruption` - |
| (Output) |
| Whether the playback of this message can be interrupted by the end user's speech and the client can then starts the next Dialogflow request. |
| |
| <a name="nested_conversation_success"></a>The `conversation_success` block supports: |
| |
| * `metadata` - |
| (Optional) |
| Custom metadata. Dialogflow doesn't impose any structure on this. |
| |
| <a name="nested_output_audio_text"></a>The `output_audio_text` block supports: |
| |
| * `allow_playback_interruption` - |
| (Output) |
| Whether the playback of this message can be interrupted by the end user's speech and the client can then starts the next Dialogflow request. |
| |
| * `text` - |
| (Optional) |
| The raw text to be synthesized. |
| |
| * `ssml` - |
| (Optional) |
| The SSML text to be synthesized. For more information, see SSML. |
| |
| <a name="nested_live_agent_handoff"></a>The `live_agent_handoff` block supports: |
| |
| * `metadata` - |
| (Optional) |
| Custom metadata. Dialogflow doesn't impose any structure on this. |
| |
| <a name="nested_play_audio"></a>The `play_audio` block supports: |
| |
| * `audio_uri` - |
| (Required) |
| URI of the audio clip. Dialogflow does not impose any validation on this value. It is specific to the client that reads it. |
| |
| * `allow_playback_interruption` - |
| (Output) |
| Whether the playback of this message can be interrupted by the end user's speech and the client can then starts the next Dialogflow request. |
| |
| <a name="nested_telephony_transfer_call"></a>The `telephony_transfer_call` block supports: |
| |
| * `phone_number` - |
| (Required) |
| Transfer the call to a phone number in E.164 format. |
| |
| <a name="nested_set_parameter_actions"></a>The `set_parameter_actions` block supports: |
| |
| * `parameter` - |
| (Optional) |
| Display name of the parameter. |
| |
| * `value` - |
| (Optional) |
| The new JSON-encoded value of the parameter. A null value clears the parameter. |
| |
| <a name="nested_conditional_cases"></a>The `conditional_cases` block supports: |
| |
| * `cases` - |
| (Optional) |
| A JSON encoded list of cascading if-else conditions. Cases are mutually exclusive. The first one with a matching condition is selected, all the rest ignored. |
| See [Case](https://cloud.google.com/dialogflow/cx/docs/reference/rest/v3/Fulfillment#case) for the schema. |
| |
| <a name="nested_event_handlers"></a>The `event_handlers` block supports: |
| |
| * `name` - |
| (Output) |
| The unique identifier of this event handler. |
| |
| * `event` - |
| (Optional) |
| The name of the event to handle. |
| |
| * `trigger_fulfillment` - |
| (Optional) |
| The fulfillment to call when the event occurs. Handling webhook errors with a fulfillment enabled with webhook could cause infinite loop. It is invalid to specify such fulfillment for a handler handling webhooks. |
| Structure is [documented below](#nested_trigger_fulfillment). |
| |
| * `target_page` - |
| (Optional) |
| The target page to transition to. |
| Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>/pages/<Page ID>. |
| |
| * `target_flow` - |
| (Optional) |
| The target flow to transition to. |
| Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>. |
| |
| |
| <a name="nested_trigger_fulfillment"></a>The `trigger_fulfillment` block supports: |
| |
| * `messages` - |
| (Optional) |
| The list of rich message responses to present to the user. |
| Structure is [documented below](#nested_messages). |
| |
| * `webhook` - |
| (Optional) |
| The webhook to call. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/webhooks/<Webhook ID>. |
| |
| * `return_partial_responses` - |
| (Optional) |
| Whether Dialogflow should return currently queued fulfillment response messages in streaming APIs. If a webhook is specified, it happens before Dialogflow invokes webhook. Warning: 1) This flag only affects streaming API. Responses are still queued and returned once in non-streaming API. 2) The flag can be enabled in any fulfillment but only the first 3 partial responses will be returned. You may only want to apply it to fulfillments that have slow webhooks. |
| |
| * `tag` - |
| (Optional) |
| The tag used by the webhook to identify which fulfillment is being called. This field is required if webhook is specified. |
| |
| * `set_parameter_actions` - |
| (Optional) |
| Set parameter values before executing the webhook. |
| Structure is [documented below](#nested_set_parameter_actions). |
| |
| * `conditional_cases` - |
| (Optional) |
| Conditional cases for this fulfillment. |
| Structure is [documented below](#nested_conditional_cases). |
| |
| |
| <a name="nested_messages"></a>The `messages` block supports: |
| |
| * `channel` - |
| (Optional) |
| The channel which the response is associated with. Clients can specify the channel via QueryParameters.channel, and only associated channel response will be returned. |
| |
| * `text` - |
| (Optional) |
| The text response message. |
| Structure is [documented below](#nested_text). |
| |
| * `payload` - |
| (Optional) |
| A custom, platform-specific payload. |
| |
| * `conversation_success` - |
| (Optional) |
| Indicates that the conversation succeeded, i.e., the bot handled the issue that the customer talked to it about. |
| Dialogflow only uses this to determine which conversations should be counted as successful and doesn't process the metadata in this message in any way. Note that Dialogflow also considers conversations that get to the conversation end page as successful even if they don't return ConversationSuccess. |
| You may set this, for example: |
| * In the entryFulfillment of a Page if entering the page indicates that the conversation succeeded. |
| * In a webhook response when you determine that you handled the customer issue. |
| Structure is [documented below](#nested_conversation_success). |
| |
| * `output_audio_text` - |
| (Optional) |
| A text or ssml response that is preferentially used for TTS output audio synthesis, as described in the comment on the ResponseMessage message. |
| Structure is [documented below](#nested_output_audio_text). |
| |
| * `live_agent_handoff` - |
| (Optional) |
| Indicates that the conversation should be handed off to a live agent. |
| Dialogflow only uses this to determine which conversations were handed off to a human agent for measurement purposes. What else to do with this signal is up to you and your handoff procedures. |
| You may set this, for example: |
| * In the entryFulfillment of a Page if entering the page indicates something went extremely wrong in the conversation. |
| * In a webhook response when you determine that the customer issue can only be handled by a human. |
| Structure is [documented below](#nested_live_agent_handoff). |
| |
| * `play_audio` - |
| (Optional) |
| Specifies an audio clip to be played by the client as part of the response. |
| Structure is [documented below](#nested_play_audio). |
| |
| * `telephony_transfer_call` - |
| (Optional) |
| Represents the signal that telles the client to transfer the phone call connected to the agent to a third-party endpoint. |
| Structure is [documented below](#nested_telephony_transfer_call). |
| |
| |
| <a name="nested_text"></a>The `text` block supports: |
| |
| * `text` - |
| (Optional) |
| A collection of text responses. |
| |
| * `allow_playback_interruption` - |
| (Output) |
| Whether the playback of this message can be interrupted by the end user's speech and the client can then starts the next Dialogflow request. |
| |
| <a name="nested_conversation_success"></a>The `conversation_success` block supports: |
| |
| * `metadata` - |
| (Optional) |
| Custom metadata. Dialogflow doesn't impose any structure on this. |
| |
| <a name="nested_output_audio_text"></a>The `output_audio_text` block supports: |
| |
| * `allow_playback_interruption` - |
| (Output) |
| Whether the playback of this message can be interrupted by the end user's speech and the client can then starts the next Dialogflow request. |
| |
| * `text` - |
| (Optional) |
| The raw text to be synthesized. |
| |
| * `ssml` - |
| (Optional) |
| The SSML text to be synthesized. For more information, see SSML. |
| |
| <a name="nested_live_agent_handoff"></a>The `live_agent_handoff` block supports: |
| |
| * `metadata` - |
| (Optional) |
| Custom metadata. Dialogflow doesn't impose any structure on this. |
| |
| <a name="nested_play_audio"></a>The `play_audio` block supports: |
| |
| * `audio_uri` - |
| (Required) |
| URI of the audio clip. Dialogflow does not impose any validation on this value. It is specific to the client that reads it. |
| |
| * `allow_playback_interruption` - |
| (Output) |
| Whether the playback of this message can be interrupted by the end user's speech and the client can then starts the next Dialogflow request. |
| |
| <a name="nested_telephony_transfer_call"></a>The `telephony_transfer_call` block supports: |
| |
| * `phone_number` - |
| (Required) |
| Transfer the call to a phone number in E.164 format. |
| |
| <a name="nested_set_parameter_actions"></a>The `set_parameter_actions` block supports: |
| |
| * `parameter` - |
| (Optional) |
| Display name of the parameter. |
| |
| * `value` - |
| (Optional) |
| The new JSON-encoded value of the parameter. A null value clears the parameter. |
| |
| <a name="nested_conditional_cases"></a>The `conditional_cases` block supports: |
| |
| * `cases` - |
| (Optional) |
| A JSON encoded list of cascading if-else conditions. Cases are mutually exclusive. The first one with a matching condition is selected, all the rest ignored. |
| See [Case](https://cloud.google.com/dialogflow/cx/docs/reference/rest/v3/Fulfillment#case) for the schema. |
| |
| <a name="nested_advanced_settings"></a>The `advanced_settings` block supports: |
| |
| * `dtmf_settings` - |
| (Optional) |
| Define behaviors for DTMF (dual tone multi frequency). DTMF settings does not override each other. DTMF settings set at different levels define DTMF detections running in parallel. Exposed at the following levels: |
| * Agent level |
| * Flow level |
| * Page level |
| * Parameter level |
| Structure is [documented below](#nested_dtmf_settings). |
| |
| |
| <a name="nested_dtmf_settings"></a>The `dtmf_settings` block supports: |
| |
| * `enabled` - |
| (Optional) |
| If true, incoming audio is processed for DTMF (dual tone multi frequency) events. For example, if the caller presses a button on their telephone keypad and DTMF processing is enabled, Dialogflow will detect the event (e.g. a "3" was pressed) in the incoming audio and pass the event to the bot to drive business logic (e.g. when 3 is pressed, return the account balance). |
| |
| * `max_digits` - |
| (Optional) |
| Max length of DTMF digits. |
| |
| * `finish_digit` - |
| (Optional) |
| The digit that terminates a DTMF digit sequence. |
| |
| ## Attributes Reference |
| |
| In addition to the arguments listed above, the following computed attributes are exported: |
| |
| * `id` - an identifier for the resource with format `{{parent}}/pages/{{name}}` |
| |
| * `name` - |
| The unique identifier of the page. |
| Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>/pages/<Page ID>. |
| |
| |
| ## Timeouts |
| |
| This resource provides the following |
| [Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options: |
| |
| - `create` - Default is 40 minutes. |
| - `update` - Default is 40 minutes. |
| - `delete` - Default is 20 minutes. |
| |
| ## Import |
| |
| |
| Page can be imported using any of these accepted formats: |
| |
| * `{{parent}}/pages/{{name}}` |
| * `{{parent}}/{{name}}` |
| |
| |
| In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import Page using one of the formats above. For example: |
| |
| ```tf |
| import { |
| id = "{{parent}}/pages/{{name}}" |
| to = google_dialogflow_cx_page.default |
| } |
| ``` |
| |
| When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), Page can be imported using one of the formats above. For example: |
| |
| ``` |
| $ terraform import google_dialogflow_cx_page.default {{parent}}/pages/{{name}} |
| $ terraform import google_dialogflow_cx_page.default {{parent}}/{{name}} |
| ``` |