Dialogflow CX V3 API - Class Google::Cloud::Dialogflow::CX::V3::Fulfillment (v1.1.1)

Reference documentation and code samples for the Dialogflow CX V3 API class Google::Cloud::Dialogflow::CX::V3::Fulfillment.

A fulfillment can do one or more of the following actions at the same time:

  • Generate rich message responses.
  • Set parameter values.
  • Call the webhook.

Fulfillments can be called at various stages in the Page or Form lifecycle. For example, when a DetectIntentRequest drives a session to enter a new page, the page's entry fulfillment can add a static response to the QueryResult in the returning DetectIntentResponse, call the webhook (for example, to load user data from a database), or both.

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#advanced_settings

def advanced_settings() -> ::Google::Cloud::Dialogflow::CX::V3::AdvancedSettings
Returns

#advanced_settings=

def advanced_settings=(value) -> ::Google::Cloud::Dialogflow::CX::V3::AdvancedSettings
Parameter
Returns

#conditional_cases

def conditional_cases() -> ::Array<::Google::Cloud::Dialogflow::CX::V3::Fulfillment::ConditionalCases>
Returns

#conditional_cases=

def conditional_cases=(value) -> ::Array<::Google::Cloud::Dialogflow::CX::V3::Fulfillment::ConditionalCases>
Parameter
Returns

#enable_generative_fallback

def enable_generative_fallback() -> ::Boolean
Returns
  • (::Boolean) — If the flag is true, the agent will utilize LLM to generate a text response. If LLM generation fails, the defined responses in the fulfillment will be respected. This flag is only useful for fulfillments associated with no-match event handlers.

#enable_generative_fallback=

def enable_generative_fallback=(value) -> ::Boolean
Parameter
  • value (::Boolean) — If the flag is true, the agent will utilize LLM to generate a text response. If LLM generation fails, the defined responses in the fulfillment will be respected. This flag is only useful for fulfillments associated with no-match event handlers.
Returns
  • (::Boolean) — If the flag is true, the agent will utilize LLM to generate a text response. If LLM generation fails, the defined responses in the fulfillment will be respected. This flag is only useful for fulfillments associated with no-match event handlers.

#messages

def messages() -> ::Array<::Google::Cloud::Dialogflow::CX::V3::ResponseMessage>
Returns

#messages=

def messages=(value) -> ::Array<::Google::Cloud::Dialogflow::CX::V3::ResponseMessage>
Parameter
Returns

#return_partial_responses

def return_partial_responses() -> ::Boolean
Returns
  • (::Boolean) — 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.

#return_partial_responses=

def return_partial_responses=(value) -> ::Boolean
Parameter
  • value (::Boolean) — 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.
Returns
  • (::Boolean) — 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.

#set_parameter_actions

def set_parameter_actions() -> ::Array<::Google::Cloud::Dialogflow::CX::V3::Fulfillment::SetParameterAction>
Returns

#set_parameter_actions=

def set_parameter_actions=(value) -> ::Array<::Google::Cloud::Dialogflow::CX::V3::Fulfillment::SetParameterAction>
Parameter
Returns

#tag

def tag() -> ::String
Returns
  • (::String) — The value of this field will be populated in the WebhookRequest fulfillmentInfo.tag field by Dialogflow when the associated webhook is called. The tag is typically used by the webhook service to identify which fulfillment is being called, but it could be used for other purposes. This field is required if webhook is specified.

#tag=

def tag=(value) -> ::String
Parameter
  • value (::String) — The value of this field will be populated in the WebhookRequest fulfillmentInfo.tag field by Dialogflow when the associated webhook is called. The tag is typically used by the webhook service to identify which fulfillment is being called, but it could be used for other purposes. This field is required if webhook is specified.
Returns
  • (::String) — The value of this field will be populated in the WebhookRequest fulfillmentInfo.tag field by Dialogflow when the associated webhook is called. The tag is typically used by the webhook service to identify which fulfillment is being called, but it could be used for other purposes. This field is required if webhook is specified.

#webhook

def webhook() -> ::String
Returns
  • (::String) — The webhook to call. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/webhooks/<Webhook ID>.

#webhook=

def webhook=(value) -> ::String
Parameter
  • value (::String) — The webhook to call. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/webhooks/<Webhook ID>.
Returns
  • (::String) — The webhook to call. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/webhooks/<Webhook ID>.