Dialogflow CX V3 API - Class Google::Cloud::Dialogflow::CX::V3::EventHandler (v1.0.0)

Reference documentation and code samples for the Dialogflow CX V3 API class Google::Cloud::Dialogflow::CX::V3::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.

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#event

def event() -> ::String
Returns
  • (::String) — Required. The name of the event to handle.

#event=

def event=(value) -> ::String
Parameter
  • value (::String) — Required. The name of the event to handle.
Returns
  • (::String) — Required. The name of the event to handle.

#name

def name() -> ::String
Returns
  • (::String) — Output only. The unique identifier of this event handler.

#target_flow

def target_flow() -> ::String
Returns
  • (::String) — The target flow to transition to. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>.

#target_flow=

def target_flow=(value) -> ::String
Parameter
  • value (::String) — The target flow to transition to. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>.
Returns
  • (::String) — The target flow to transition to. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>.

#target_page

def target_page() -> ::String
Returns
  • (::String) — The target page to transition to. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>/pages/<Page ID>.

#target_page=

def target_page=(value) -> ::String
Parameter
  • value (::String) — The target page to transition to. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>/pages/<Page ID>.
Returns
  • (::String) — The target page to transition to. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>/pages/<Page ID>.

#trigger_fulfillment

def trigger_fulfillment() -> ::Google::Cloud::Dialogflow::CX::V3::Fulfillment
Returns
  • (::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.

#trigger_fulfillment=

def trigger_fulfillment=(value) -> ::Google::Cloud::Dialogflow::CX::V3::Fulfillment
Parameter
  • value (::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.
Returns
  • (::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.