Some products and features are in the process of being renamed. Generative playbook and flow features are also being migrated to a single consolidated console. See the details.
An event handler specifies an event that can be handled during a session. When the specified event happens, the following actions are taken in order:
If there is a triggerFulfillment associated with the event, it will be called.
If there is a targetPage associated with the event, the session will transition into the specified page.
If there is a targetFlow associated with the event, the session will transition into the specified flow.
JSON representation
{"name": string,"event": string,"triggerFulfillment": {object (Fulfillment)},// Union field target can be only one of the following:"targetPage": string,"targetFlow": string,"targetPlaybook": string// End of list of possible types for union field target.}
Fields
name
string
Output only. The unique identifier of this event handler.
The fulfillment to call when the event occurs. Handling webhook errors with a fulfillment enabled with webhook could cause infinite loop. It is invalid to specify such fulfillment for a handler handling webhooks.
Union field target. The target to transition to, either a page in the same host flow (the flow that owns this TransitionRoute), or another flow in the same agent. target can be only one of the following:
targetPage
string
The target page to transition to. Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/pages/<PageID>.
targetFlow
string
The target flow to transition to. Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>.
targetPlaybook
string
The target playbook to transition to. Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>.
[[["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-03-05 UTC."],[[["Event handlers define events that can be managed during a session, initiating actions when the specified event occurs."],["Upon an event, the system first executes the `triggerFulfillment`, if present, and then transitions to either the `targetPage`, `targetFlow`, or `targetPlaybook` as defined."],["The `triggerFulfillment` field specifies the fulfillment that gets executed when an event is triggered, but using it with a webhook handler is not recommended due to potential infinite loops."],["The `target` field is a union that indicates whether to transition to another page, flow, or playbook, with only one of `targetPage`, `targetFlow`, or `targetPlaybook` being applicable per handler."],["The JSON representation details the structure of an event handler, which includes fields for the event `name`, the `event` to handle, and the `target` to transition to, as well as an optional `triggerFulfillment`."]]],[]]