Reference documentation and code samples for the Google Cloud Dialogflow Cx V3 Client class EventHandler.
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
trigger_fulfillment
associated with the event, it will be called. -
If there is a
target_page
associated with the event, the session will transition into the specified page. - If there is a
target_flow
associated with the event, the session will transition into the specified flow.
Generated from protobuf message google.cloud.dialogflow.cx.v3.EventHandler
Namespace
Google \ Cloud \ Dialogflow \ Cx \ V3Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ name
string
Output only. The unique identifier of this event handler.
↳ event
string
Required. The name of the event to handle.
↳ trigger_fulfillment
Google\Cloud\Dialogflow\Cx\V3\Fulfillment
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.
↳ target_page
string
The target page to transition to. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>/pages/<Page ID>
.
↳ target_flow
string
The target flow to transition to. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>
.
getName
Output only. The unique identifier of this event handler.
string
setName
Output only. The unique identifier of this event handler.
var
string
$this
getEvent
Required. The name of the event to handle.
string
setEvent
Required. The name of the event to handle.
var
string
$this
getTriggerFulfillment
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.
hasTriggerFulfillment
clearTriggerFulfillment
setTriggerFulfillment
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.
$this
getTargetPage
The target page to transition to.
Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
ID>/flows/<Flow ID>/pages/<Page ID>
.
string
hasTargetPage
setTargetPage
The target page to transition to.
Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
ID>/flows/<Flow ID>/pages/<Page ID>
.
var
string
$this
getTargetFlow
The target flow to transition to.
Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
ID>/flows/<Flow ID>
.
string
hasTargetFlow
setTargetFlow
The target flow to transition to.
Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
ID>/flows/<Flow ID>
.
var
string
$this
getTarget
string