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

1.12.1 (latest) 1.12.0 1.11.0 1.10.1 1.9.0 1.8.0 1.7.0 1.6.1 1.5.0 1.4.0 1.3.0 1.2.0 1.1.1 1.0.0 0.26.0 0.25.0 0.24.2 0.23.0 0.22.0 0.21.0 0.20.0 0.19.0 0.18.0 0.17.0 0.16.0 0.15.1 0.14.0 0.13.0 0.12.0 0.11.0 0.10.2 0.9.0 0.8.1 0.7.1 0.6.0 0.5.0 0.4.0 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.

<br />

Fulfillments can be called at various stages in the
[Page](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Page "Google::Cloud::Dialogflow::CX::V3::Page (class)") or
[Form](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Form "Google::Cloud::Dialogflow::CX::V3::Form (class)") lifecycle. For example, when a
[DetectIntentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-DetectIntentRequest "Google::Cloud::Dialogflow::CX::V3::DetectIntentRequest (class)")
drives a session to enter a new page, the page's entry fulfillment can add a
static response to the
[QueryResult](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-QueryResult "Google::Cloud::Dialogflow::CX::V3::QueryResult (class)") in the returning
[DetectIntentResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-DetectIntentResponse "Google::Cloud::Dialogflow::CX::V3::DetectIntentResponse (class)"),
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**

- ([::Google::Cloud::Dialogflow::CX::V3::AdvancedSettings](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-AdvancedSettings)) --- Hierarchical advanced settings for this fulfillment. The settings exposed at the lower level overrides the settings exposed at the higher level.

### #advanced_settings=

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

**Parameter**

- **value** ([::Google::Cloud::Dialogflow::CX::V3::AdvancedSettings](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-AdvancedSettings)) --- Hierarchical advanced settings for this fulfillment. The settings exposed at the lower level overrides the settings exposed at the higher level.
**Returns**

- ([::Google::Cloud::Dialogflow::CX::V3::AdvancedSettings](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-AdvancedSettings)) --- Hierarchical advanced settings for this fulfillment. The settings exposed at the lower level overrides the settings exposed at the higher level.

### #conditional_cases

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

**Returns**

- (::Array\<[::Google::Cloud::Dialogflow::CX::V3::Fulfillment::ConditionalCases](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Fulfillment-ConditionalCases)\>) --- Conditional cases for this fulfillment.

### #conditional_cases=

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

**Parameter**

- **value** (::Array\<[::Google::Cloud::Dialogflow::CX::V3::Fulfillment::ConditionalCases](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Fulfillment-ConditionalCases)\>) --- Conditional cases for this fulfillment.
**Returns**

- (::Array\<[::Google::Cloud::Dialogflow::CX::V3::Fulfillment::ConditionalCases](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Fulfillment-ConditionalCases)\>) --- Conditional cases for this fulfillment.

### #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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Fulfillment#Google__Cloud__Dialogflow__CX__V3__Fulfillment_messages_instance_ "Google::Cloud::Dialogflow::CX::V3::Fulfillment#messages (method)") 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Fulfillment#Google__Cloud__Dialogflow__CX__V3__Fulfillment_messages_instance_ "Google::Cloud::Dialogflow::CX::V3::Fulfillment#messages (method)") 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Fulfillment#Google__Cloud__Dialogflow__CX__V3__Fulfillment_messages_instance_ "Google::Cloud::Dialogflow::CX::V3::Fulfillment#messages (method)") in the fulfillment will be respected. This flag is only useful for fulfillments associated with no-match event handlers.

### #generators

    def generators() -> ::Array<::Google::Cloud::Dialogflow::CX::V3::Fulfillment::GeneratorSettings>

**Returns**

- (::Array\<[::Google::Cloud::Dialogflow::CX::V3::Fulfillment::GeneratorSettings](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Fulfillment-GeneratorSettings)\>) --- A list of Generators to be called during this fulfillment.

### #generators=

    def generators=(value) -> ::Array<::Google::Cloud::Dialogflow::CX::V3::Fulfillment::GeneratorSettings>

**Parameter**

- **value** (::Array\<[::Google::Cloud::Dialogflow::CX::V3::Fulfillment::GeneratorSettings](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Fulfillment-GeneratorSettings)\>) --- A list of Generators to be called during this fulfillment.
**Returns**

- (::Array\<[::Google::Cloud::Dialogflow::CX::V3::Fulfillment::GeneratorSettings](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Fulfillment-GeneratorSettings)\>) --- A list of Generators to be called during this fulfillment.

### #messages

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

**Returns**

- (::Array\<[::Google::Cloud::Dialogflow::CX::V3::ResponseMessage](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-ResponseMessage)\>) --- The list of rich message responses to present to the user.

### #messages=

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

**Parameter**

- **value** (::Array\<[::Google::Cloud::Dialogflow::CX::V3::ResponseMessage](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-ResponseMessage)\>) --- The list of rich message responses to present to the user.
**Returns**

- (::Array\<[::Google::Cloud::Dialogflow::CX::V3::ResponseMessage](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-ResponseMessage)\>) --- The list of rich message responses to present to the user.

### #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**

- (::Array\<[::Google::Cloud::Dialogflow::CX::V3::Fulfillment::SetParameterAction](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Fulfillment-SetParameterAction)\>) --- Set parameter values before executing the webhook.

### #set_parameter_actions=

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

**Parameter**

- **value** (::Array\<[::Google::Cloud::Dialogflow::CX::V3::Fulfillment::SetParameterAction](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Fulfillment-SetParameterAction)\>) --- Set parameter values before executing the webhook.
**Returns**

- (::Array\<[::Google::Cloud::Dialogflow::CX::V3::Fulfillment::SetParameterAction](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Fulfillment-SetParameterAction)\>) --- Set parameter values before executing the webhook.

### #tag

    def tag() -> ::String

**Returns**

- (::String) --- The value of this field will be populated in the [WebhookRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-WebhookRequest "Google::Cloud::Dialogflow::CX::V3::WebhookRequest (class)") `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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-WebhookRequest "Google::Cloud::Dialogflow::CX::V3::WebhookRequest (class)") `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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-WebhookRequest "Google::Cloud::Dialogflow::CX::V3::WebhookRequest (class)") `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/<ProjectID>/locations/<LocationID>/agents/<AgentID>/webhooks/<WebhookID>`.

### #webhook=

    def webhook=(value) -> ::String

**Parameter**

- **value** (::String) --- The webhook to call. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/webhooks/<WebhookID>`.
**Returns**

- (::String) --- The webhook to call. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/webhooks/<WebhookID>`.