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
#conditional_cases
def conditional_cases() -> ::Array<::Google::Cloud::Dialogflow::CX::V3::Fulfillment::ConditionalCases>
- (::Array<::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>
- value (::Array<::Google::Cloud::Dialogflow::CX::V3::Fulfillment::ConditionalCases>) — Conditional cases for this fulfillment.
- (::Array<::Google::Cloud::Dialogflow::CX::V3::Fulfillment::ConditionalCases>) — Conditional cases for this fulfillment.
#messages
def messages() -> ::Array<::Google::Cloud::Dialogflow::CX::V3::ResponseMessage>
- (::Array<::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>
- value (::Array<::Google::Cloud::Dialogflow::CX::V3::ResponseMessage>) — The list of rich message responses to present to the user.
- (::Array<::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
- (::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
- 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.
- (::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>
- (::Array<::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>
- value (::Array<::Google::Cloud::Dialogflow::CX::V3::Fulfillment::SetParameterAction>) — Set parameter values before executing the webhook.
- (::Array<::Google::Cloud::Dialogflow::CX::V3::Fulfillment::SetParameterAction>) — Set parameter values before executing the webhook.
#tag
def tag() -> ::String
-
(::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 ifwebhook
is specified.
#tag=
def tag=(value) -> ::String
-
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 ifwebhook
is specified.
-
(::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 ifwebhook
is specified.
#webhook
def webhook() -> ::String
-
(::String) — The webhook to call.
Format:
projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/webhooks/<Webhook ID>
.
#webhook=
def webhook=(value) -> ::String
-
value (::String) — The webhook to call.
Format:
projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/webhooks/<Webhook ID>
.
-
(::String) — The webhook to call.
Format:
projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/webhooks/<Webhook ID>
.