Signals
Named events that fire within the pipeline, used to communicate between flows and react to lifecycle events.
Signals are named events that can be fired and listened to within the Virbe pipeline. They provide a flexible communication mechanism between flows, between the pipeline and external systems (like the embedding website or SDK), and across the conversation lifecycle.
How Signals Work
When a signal fires, any node in the pipeline that is listening for that signal can react to it. Signals are not routed automatically – you connect signal-aware nodes (like Route by Signal and Signal Handler) to handle specific signals within your logic.
Signals carry a name and an optional value (metadata sent with the signal).
Opening the Signals Panel
Click Signals at the bottom of the left sidebar to open the Signals panel. The panel shows all signals available in this pipeline – both predefined system signals and any custom signals you have created.
Predefined Signals
Four signals are built into every pipeline and cannot be deleted. They map to the core conversation lifecycle events:
| Signal Name | When It Fires | Description |
|---|---|---|
conversation-language-change | User's detected language changes | Sent when STT identifies a different language than the current one |
conversation-start | New session begins | Sent when a conversation session initializes |
conversation-stop | Session ends | Sent when the conversation ends (defocus timeout, widget reload, explicit end) |
face-detected | (Kiosk only) Camera detects a face | Sent when the kiosk camera detects a human face approaching |
These predefined signals are what trigger the corresponding Handlers (On Language Change, On conversation-start, On conversation-stop, On face-detected).
Custom Signals
You can create your own signals for any purpose – typically for communicating between the embedding website/app and the pipeline, or between flows.
Creating a Custom Signal
- Open the Signals panel
- Click + Create new signal
- Enter a Name (e.g.,
product-scanned,user-authenticated,checkout-started) - Enter a Description for your own reference
- Click Create
Custom signals can be:
- Fired from the embedding website or app using the Virbe JS SDK (passing the signal name and an optional value)
- Received in the pipeline via
Route by SignalorSignal Handlernodes - Triggered by external devices like barcode or QR code scanners
Naming Conventions
Signal names are lowercase and hyphen-separated by convention (e.g., product-selected, qr-code-scanned). Keep names descriptive and specific.
Using Signals in Flows
Route by Signal
The Route by Signal node branches the flow based on which signal is currently active. Use it when a flow needs to behave differently depending on how it was triggered.
Flow Entrypoint
│
├── On User Input ──► [handle user message]
│
└── On Signal ──► Route by Signal
├── product-scanned ──► [product lookup flow]
├── qr-code-scanned ──► [QR handler flow]
└── default ──► [generic signal handler]Signal Handler (in Handlers)
Each Handler entry node exposes an On Signal branch, which fires when the Handler is triggered by a signal rather than a direct user action. This is used in Handlers like On Language Change to distinguish between speech-detected changes and programmatically fired signals.
Sending Signals from External Sources
If your virtual being is embedded on a website or in an app, you can fire signals from the surrounding page using the Virbe JavaScript API. This lets the website communicate directly with the pipeline – for example, sending a product-selected signal when the user clicks a product on the page.
// Example: fire a signal from the embedding page
virbeWidget.sendSignal('product-selected', { productId: '12345' });The signal name and value are available inside the pipeline via the Signal Name and Signal Value fields (accessible through the Insert field picker).
Best Practices
- Use predefined signals for lifecycle logic – don't create custom replacements for
conversation-startorconversation-stop. - Keep custom signal names specific and meaningful –
checkout-abandonedis clearer thanevent-1. - Document what each custom signal is for in its Description field.
- Use signals for loose coupling between the embedding page and the pipeline – they are better than tightly coupling business logic to specific flow names.