Virbe Documentation

On conversation-stop

The On conversation-stop handler fires when a conversation session ends. Use it for cleanup, logging, or final data submissions.

The On conversation-stop handler fires when a conversation session ends. This can happen because the user closed the widget, the kiosk timed out due to defocus, or the session was explicitly ended by a flow. It is the right place to perform any cleanup, persist final data, or send a notification that the session is over.

When It Runs

This handler is triggered by the predefined conversation-stop signal, which fires when:

  • The web widget is closed or the page is reloaded
  • The kiosk loses focus (user walks away) and the session timeout triggers
  • A End Conversation node runs in a flow
  • An Automation ends the conversation

The handler runs after the conversation has ended from the user's perspective – no more user messages are expected.

Common Uses

  • Log session end – Send a webhook notification to your backend that the session is complete
  • Save user data – Write any collected data to an external system (CRM, database) via Call Webhook
  • Trigger a summary Automation – Use Trigger Automation to kick off an end-of-session summary (though the End Conversation Automation handles this automatically by default)
  • Clean up state – Reset conversation variables if needed for the next session

Typical Node Pattern

Signal Handler (On conversation-stop) ──► Call Webhook ──► Continue Processing

Or simply:

Signal Handler (On conversation-stop) ──► Continue Processing

Available Nodes

NodeCategoryPurpose
Continue ProcessingExitConclude the handler
Abandon ProcessingExitDrop the event
Activate FlowExitTrigger a Conversational Flow
Check VariableContextRead a variable value
Store VariableContextWrite a variable
Find record(s)ContextQuery a data table
Route by ProfileLogicBranch by touchpoint
Route by LanguageLogicBranch by active language
Route by SignalLogicBranch by signal
Is Flow ActiveLogicCheck if a flow is currently active
Trigger AutomationIntegrationFire an Automation
CommentOtherCanvas annotation

Example: Webhook on Session End

Notify your backend when a conversation finishes, including the user's email if collected:

  1. Signal Handler (On conversation-stop)
  2. Check Variable ({{variable.email}}) – branch: has value / empty
  3. Branch A (has value) → Call Webhook (POST user data) → Continue Processing
  4. Branch B (empty) → Continue Processing

The On conversation-stop handler is a good complement to the End Conversation Automation. The Automation runs background tasks (summaries, titles), while this handler is better suited for immediate cleanup and notification tasks that should run synchronously at session end.

Kiosk-Specific Behavior

On kiosk deployments, On conversation-stop fires when the inactivity timeout triggers (the user walks away and the kiosk's defocus timer expires). This is a common trigger for resetting the kiosk to its idle state, which you can handle by activating a "reset" or "idle" flow.

On this page