Theme
Web Channel
The web channel delivers your bot through the embeddable OmniBots widget on any website. It is the fastest channel to set up and supports the richest set of content types.
Setup
- Publish your bot (see Publishing)
- Go to your bot's Channels tab and select Web
- Copy the embed snippet
- Paste the snippet into your website's HTML
html
<link rel="stylesheet" href="https://omnibots-widget.web.app/widget.css">
<script src="https://omnibots-widget.web.app/widget.iife.js"></script>
<script>
window.omnibot.init({
deploymentKey: 'your-deployment-key'
});
</script>1
2
3
4
5
6
7
2
3
4
5
6
7
imageWeb channel configuration page showing embed snippet, session timeout setting, domain allowlist, and deployment key with copy button
TIP
For detailed installation options including framework integration and iframe methods, see the Web Widget Installation guide.
Session Management
Web widget sessions are managed automatically:
| Behavior | Description |
|---|---|
| Session creation | A new session starts when the user opens the widget |
| Persistence | Sessions persist across page navigations using localStorage |
| Timeout | Sessions expire after 30 minutes of inactivity (configurable) |
| Resume | Returning users see their conversation history within the session window |
| Multi-tab | Sessions are shared across browser tabs on the same domain |
Session Timeout Configuration
Session timeout is configured per-bot in the Operations Portal under Bot Settings > Web Channel. The default timeout is 30 minutes (1800 seconds). This setting is delivered to the widget from the server — it is not configurable in the embed code.
Page Context
Pass information from your website to the bot flow using the metadata init option or the setContext() API:
js
window.omnibot.init({
deploymentKey: 'your-deployment-key',
metadata: {
page_label: 'billing',
user_id: 'user_12345',
user_tier: 'enterprise'
}
});
// Update context dynamically (e.g., on SPA navigation)
window.omnibot.setContext({
page_label: 'support',
page_url: window.location.href
});1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
Context data is available as flow variables, enabling page-based KB routing, conditional logic, and personalized responses. See Widget Page Context for full details.
User Identification
By default, web users are anonymous. You can pass user identity via the metadata context for authenticated experiences:
js
window.omnibot.init({
deploymentKey: 'your-deployment-key',
metadata: {
user_id: 'user_12345',
user_name: 'Jane Doe',
user_tier: 'enterprise',
account_id: 'ACC-789'
}
});1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
Identified users receive:
- Personalized greetings using
{{user_name}} - Context-aware tool calls and handoffs with pre-populated user data
- Consistent conversation routing based on subscription tier
Domain Allowlisting
Restrict which domains can load your widget:
- Go to Bot Settings > Web Channel > Security
- Add allowed domains (e.g.,
example.com,*.example.com) - Requests from unlisted domains will be rejected
WARNING
Always configure domain allowlisting for production deployments to prevent unauthorized use of your bot.
Analytics
Web channel conversations are tracked automatically in the Analytics Dashboard. Metrics include message count, session duration, containment rate, and user satisfaction.
