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_fulfillmentassociated with the event, it will be called. - If there is a
target_pageassociated with the event, the session will transition into the specified page. - If there is a
target_flowassociated 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- (::String) — Required. The name of the event to handle.
#event=
def event=(value) -> ::String- value (::String) — Required. The name of the event to handle.
- (::String) — Required. The name of the event to handle.
#name
def name() -> ::String- (::String) — Output only. The unique identifier of this event handler.
#target_flow
def target_flow() -> ::String-
(::String) — The target flow to transition to.
Format:
projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>.Note: The following fields are mutually exclusive:
target_flow,target_page. If a field in that set is populated, all other fields in the set will automatically be cleared.
#target_flow=
def target_flow=(value) -> ::String-
value (::String) — The target flow to transition to.
Format:
projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>.Note: The following fields are mutually exclusive:
target_flow,target_page. If a field in that set is populated, all other fields in the set will automatically be cleared.
-
(::String) — The target flow to transition to.
Format:
projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>.Note: The following fields are mutually exclusive:
target_flow,target_page. If a field in that set is populated, all other fields in the set will automatically be cleared.
#target_page
def target_page() -> ::String-
(::String) — The target page to transition to.
Format:
projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/pages/<PageID>.Note: The following fields are mutually exclusive:
target_page,target_flow. If a field in that set is populated, all other fields in the set will automatically be cleared.
#target_page=
def target_page=(value) -> ::String-
value (::String) — The target page to transition to.
Format:
projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/pages/<PageID>.Note: The following fields are mutually exclusive:
target_page,target_flow. If a field in that set is populated, all other fields in the set will automatically be cleared.
-
(::String) — The target page to transition to.
Format:
projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/pages/<PageID>.Note: The following fields are mutually exclusive:
target_page,target_flow. If a field in that set is populated, all other fields in the set will automatically be cleared.
#trigger_fulfillment
def trigger_fulfillment() -> ::Google::Cloud::Dialogflow::CX::V3::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.
#trigger_fulfillment=
def trigger_fulfillment=(value) -> ::Google::Cloud::Dialogflow::CX::V3::Fulfillment- 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.
- (::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.