Reference documentation and code samples for the Google Cloud Dialogflow Cx V3 Client class 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.
Generated from protobuf message google.cloud.dialogflow.cx.v3.Fulfillment
Namespace
Google \ Cloud \ Dialogflow \ Cx \ V3Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ messages
array< Google\Cloud\Dialogflow\Cx\V3\ResponseMessage
>
The list of rich message responses to present to the user.
↳ webhook
string
The webhook to call. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/webhooks/<Webhook ID>
.
↳ return_partial_responses
bool
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
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.
↳ set_parameter_actions
array< Google\Cloud\Dialogflow\Cx\V3\Fulfillment\SetParameterAction
>
Set parameter values before executing the webhook.
↳ conditional_cases
array< Google\Cloud\Dialogflow\Cx\V3\Fulfillment\ConditionalCases
>
Conditional cases for this fulfillment.
↳ advanced_settings
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.
↳ enable_generative_fallback
bool
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.
getMessages
The list of rich message responses to present to the user.
setMessages
The list of rich message responses to present to the user.
$this
getWebhook
The webhook to call.
Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
ID>/webhooks/<Webhook ID>
.
string
setWebhook
The webhook to call.
Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
ID>/webhooks/<Webhook ID>
.
var
string
$this
getReturnPartialResponses
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.
bool
setReturnPartialResponses
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.
var
bool
$this
getTag
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.
string
setTag
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.
var
string
$this
getSetParameterActions
Set parameter values before executing the webhook.
setSetParameterActions
Set parameter values before executing the webhook.
$this
getConditionalCases
Conditional cases for this fulfillment.
setConditionalCases
Conditional cases for this fulfillment.
$this
getAdvancedSettings
Hierarchical advanced settings for this fulfillment. The settings exposed at the lower level overrides the settings exposed at the higher level.
hasAdvancedSettings
clearAdvancedSettings
setAdvancedSettings
Hierarchical advanced settings for this fulfillment. The settings exposed at the lower level overrides the settings exposed at the higher level.
$this
getEnableGenerativeFallback
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.
bool
setEnableGenerativeFallback
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.
var
bool
$this