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 thePageorFormlifecycle. For example, when aDetectIntentRequestdrives a session to enter a new page, the page's entry fulfillment can add a
static response to theQueryResultin the returningDetectIntentResponse,
call the webhook (for example, to load user data from a database), or both.
Generated from protobuf messagegoogle.cloud.dialogflow.cx.v3.Fulfillment
The list of rich message responses to present to the user.
↳ webhook
string
The webhook to call. Format:projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/webhooks/<WebhookID>.
↳ 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 theWebhookRequestfulfillmentInfo.tagfield 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 ifwebhookis specified.
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 definedresponsesin the fulfillment will be respected. This flag is only useful for fulfillments associated with no-match event handlers.
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
Type
Description
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.
Parameter
Name
Description
var
bool
Returns
Type
Description
$this
getTag
The value of this field will be populated in theWebhookRequestfulfillmentInfo.tagfield 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 ifwebhookis specified.
Returns
Type
Description
string
setTag
The value of this field will be populated in theWebhookRequestfulfillmentInfo.tagfield 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 ifwebhookis specified.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getSetParameterActions
Set parameter values before executing the webhook.
If the flag is true, the agent will utilize LLM to generate a text
response. If LLM generation fails, the definedresponsesin the
fulfillment will be respected. This flag is only useful for fulfillments
associated with no-match event handlers.
Returns
Type
Description
bool
setEnableGenerativeFallback
If the flag is true, the agent will utilize LLM to generate a text
response. If LLM generation fails, the definedresponsesin the
fulfillment will be respected. This flag is only useful for fulfillments
associated with no-match event handlers.
Parameter
Name
Description
var
bool
Returns
Type
Description
$this
getGenerators
A list of Generators to be called during this fulfillment.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Dialogflow Cx V3 Client - Class Fulfillment (0.8.1)\n\nVersion latestkeyboard_arrow_down\n\n- [0.8.1 (latest)](/php/docs/reference/cloud-dialogflow-cx/latest/V3.Fulfillment)\n- [0.8.0](/php/docs/reference/cloud-dialogflow-cx/0.8.0/V3.Fulfillment)\n- [0.7.2](/php/docs/reference/cloud-dialogflow-cx/0.7.2/V3.Fulfillment)\n- [0.6.0](/php/docs/reference/cloud-dialogflow-cx/0.6.0/V3.Fulfillment)\n- [0.5.2](/php/docs/reference/cloud-dialogflow-cx/0.5.2/V3.Fulfillment)\n- [0.4.1](/php/docs/reference/cloud-dialogflow-cx/0.4.1/V3.Fulfillment)\n- [0.3.4](/php/docs/reference/cloud-dialogflow-cx/0.3.4/V3.Fulfillment)\n- [0.2.1](/php/docs/reference/cloud-dialogflow-cx/0.2.1/V3.Fulfillment)\n- [0.1.1](/php/docs/reference/cloud-dialogflow-cx/0.1.1/V3.Fulfillment) \nReference documentation and code samples for the Google Cloud Dialogflow Cx V3 Client class Fulfillment.\n\nA fulfillment can do one or more of the following actions at the same time:\n\n- Generate rich message responses.\n\n\u003c!-- --\u003e\n\n- Set parameter values.\n - Call the webhook. Fulfillments can be called at various stages in the [Page](/php/docs/reference/cloud-dialogflow-cx/latest/V3.Page) or [Form](/php/docs/reference/cloud-dialogflow-cx/latest/V3.Form) lifecycle. For example, when a [DetectIntentRequest](/php/docs/reference/cloud-dialogflow-cx/latest/V3.DetectIntentRequest) drives a session to enter a new page, the page's entry fulfillment can add a static response to the [QueryResult](/php/docs/reference/cloud-dialogflow-cx/latest/V3.QueryResult) in the returning [DetectIntentResponse](/php/docs/reference/cloud-dialogflow-cx/latest/V3.DetectIntentResponse), call the webhook (for example, to load user data from a database), or both.\n\nGenerated from protobuf message `google.cloud.dialogflow.cx.v3.Fulfillment`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Dialogflow \\\\ Cx \\\\ V3\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getMessages\n\nThe list of rich message responses to present to the user.\n\n### setMessages\n\nThe list of rich message responses to present to the user.\n\n### getWebhook\n\nThe webhook to call.\n\nFormat:\n`projects/\u003cProjectID\u003e/locations/\u003cLocationID\u003e/agents/\u003cAgentID\u003e/webhooks/\u003cWebhookID\u003e`.\n\n### setWebhook\n\nThe webhook to call.\n\nFormat:\n`projects/\u003cProjectID\u003e/locations/\u003cLocationID\u003e/agents/\u003cAgentID\u003e/webhooks/\u003cWebhookID\u003e`.\n\n### getReturnPartialResponses\n\nWhether Dialogflow should return currently queued fulfillment response\nmessages in streaming APIs. If a webhook is specified, it happens before\nDialogflow invokes webhook.\n\nWarning:\n1) This flag only affects streaming API. Responses are still queued\nand returned once in non-streaming API.\n2) The flag can be enabled in any fulfillment but only the first 3 partial\nresponses will be returned. You may only want to apply it to fulfillments\nthat have slow webhooks.\n\n### setReturnPartialResponses\n\nWhether Dialogflow should return currently queued fulfillment response\nmessages in streaming APIs. If a webhook is specified, it happens before\nDialogflow invokes webhook.\n\nWarning:\n1) This flag only affects streaming API. Responses are still queued\nand returned once in non-streaming API.\n2) The flag can be enabled in any fulfillment but only the first 3 partial\nresponses will be returned. You may only want to apply it to fulfillments\nthat have slow webhooks.\n\n### getTag\n\nThe value of this field will be populated in the\n[WebhookRequest](/php/docs/reference/cloud-dialogflow-cx/latest/V3.WebhookRequest)\n`fulfillmentInfo.tag` field by Dialogflow when the associated webhook is\ncalled.\n\nThe tag is typically used by the webhook service to identify which\nfulfillment is being called, but it could be used for other purposes.\nThis field is required if `webhook` is specified.\n\n### setTag\n\nThe value of this field will be populated in the\n[WebhookRequest](/php/docs/reference/cloud-dialogflow-cx/latest/V3.WebhookRequest)\n`fulfillmentInfo.tag` field by Dialogflow when the associated webhook is\ncalled.\n\nThe tag is typically used by the webhook service to identify which\nfulfillment is being called, but it could be used for other purposes.\nThis field is required if `webhook` is specified.\n\n### getSetParameterActions\n\nSet parameter values before executing the webhook.\n\n### setSetParameterActions\n\nSet parameter values before executing the webhook.\n\n### getConditionalCases\n\nConditional cases for this fulfillment.\n\n### setConditionalCases\n\nConditional cases for this fulfillment.\n\n### getAdvancedSettings\n\nHierarchical advanced settings for this fulfillment. The settings exposed\nat the lower level overrides the settings exposed at the higher level.\n\n### hasAdvancedSettings\n\n### clearAdvancedSettings\n\n### setAdvancedSettings\n\nHierarchical advanced settings for this fulfillment. The settings exposed\nat the lower level overrides the settings exposed at the higher level.\n\n### getEnableGenerativeFallback\n\nIf the flag is true, the agent will utilize LLM to generate a text\nresponse. If LLM generation fails, the defined\n[responses](/php/docs/reference/cloud-dialogflow-cx/latest/V3.Fulfillment#_Google_Cloud_Dialogflow_Cx_V3_Fulfillment__getMessages__) in the\nfulfillment will be respected. This flag is only useful for fulfillments\nassociated with no-match event handlers.\n\n### setEnableGenerativeFallback\n\nIf the flag is true, the agent will utilize LLM to generate a text\nresponse. If LLM generation fails, the defined\n[responses](/php/docs/reference/cloud-dialogflow-cx/latest/V3.Fulfillment#_Google_Cloud_Dialogflow_Cx_V3_Fulfillment__getMessages__) in the\nfulfillment will be respected. This flag is only useful for fulfillments\nassociated with no-match event handlers.\n\n### getGenerators\n\nA list of Generators to be called during this fulfillment.\n\n### setGenerators\n\nA list of Generators to be called during this fulfillment."]]