Skip to main content
Segments allow you to adapt the chatbot’s responses based on the page context.

Concept

A segment is a specific context. For example:
  • Home page → segment landing
  • Pricing page → segment pricing
  • Support page → segment support
The chatbot only uses the corpus associated with the active segment.

Usage

Via HTML

The segment is fixed at load time by the data-segment attribute — there is no runtime API to switch it. On an SPA, render the script tag with the segment of the entry page; segment-per-route switching is not supported today.

Dashboard configuration

  1. Go to Dashboard > Knowledge Base
  2. For each entry, assign one or more segments
  3. Entries without a segment are available everywhere

Concrete example

E-commerce scenario

Implementation

Default segment

If no segment is specified, the chatbot uses:
  1. Entries from the default segment
  2. Entries without an assigned segment

Best practices

Create a global segment for general questions (hours, contact, about) available on all pages.
  • Limit the number of segments (5-10 max)
  • Name them clearly (pricing not seg_01)
  • Test each segment individually