Website Chatbot

Website Chatbot

Video Tutorial

Website Chatbot

Watch on Tutorials page →

The website chatbot puts your AI Assistant on any website as a small chat bubble that visitors can open and talk to. You configure it entirely in QAnswer and then paste one snippet of code into your site.

Open the assistant, go to the Expose tab and select the Website chatbot card. The page that opens is a five-step installation guide; work through the steps from top to bottom.

Note
If the assistant's organization does not have the Expose add-on, this guide opens read-only: an "Expose add-on required" notice appears at the top and every step is greyed out. See The Expose add-on.
Note
The Website chatbot card is only offered for assistants whose task type is Chat.

Step 1 — Customize

The first step is split in two: the Widget Settings card on the left holds the options, and the Widget Preview on the right shows the result live as you change them.

Step 1 of the installation guide, with Widget Settings on the left and a live Widget Preview on the right

The upper half of the settings card covers how the widget looks and behaves:

  • Widget title — the heading shown at the top of the open widget. Left empty, the assistant's own name is used.
  • Initial message — the greeting the assistant opens with before the visitor types anything.
  • Theme — Auto, Light or Dark. Auto follows the visitor's own system setting.
  • For the first visit, the widget will be… — Minimized shows only the bubble; Open expands the chat straight away.
  • Position on the screen — which corner the widget sits in — bottom-right, bottom-left, top-right or top-left.
  • Allow the export of conversations — adds a control that lets visitors download their conversation.

Scrolling further down the same card reveals the finer styling options:

The lower half of the Widget Settings card, showing position margin, accent colour and the CSS font property
  • Position margin — the X and Y distance in pixels between the widget and the edges of the screen — useful when the widget would otherwise cover something on your site.
  • Accent color — the primary and secondary colours of the widget, so it can match your brand.
  • Show "Powered by" text — clear the checkbox to remove the QAnswer credit from the bottom of the widget.
  • CSS "font" property — an advanced escape hatch that lets you pass a raw CSS font declaration so the widget matches your site's typography.
Warning
These settings are shared by every widget integration of this assistant, including the third-party ones such as WordPress or Wix. Press Save in the corner of the Widget Settings card to keep your changes — the preview updates immediately, but nothing is stored until you save.

Step 2 — Test

Before touching your real site, you can see the widget on top of it. Enter the address of the page you want to try it on:

Step 2, Test, with the Simulate chip, a website URL field and the Copy and Open demo actions
  • Open demo opens that page in a new tab with your widget laid over it.
  • Copy copies the demo link, so you can send it to a colleague for review.
Note
This is a simulation for previewing only — nothing is installed on the site you enter, and the demo link is not a way to deploy the widget. Use the snippet from step 4 for the real thing.

Step 3 — Choose your access

A widget on a public website has to be reachable by people who are not logged in to QAnswer. This step decides how they get in:

Step 3, Choose your access, with the Public, Only with an API key and Advanced: local storage key options
  • Public — anyone who loads your website can use the widget, with no API key. This is the usual choice for a public site.
  • Only with an API key — the assistant stays private and the snippet carries an API key that lets the widget in.
  • Advanced: local storage key — no API key is generated or written into the snippet: your page hands the widget its key at runtime. The status then reads "Ready: the code below contains no API key; your page provides it at runtime."
Note
There is no Logged-in users option here, because visitors to your website are not logged in to QAnswer. If another interface has already set the assistant to Logged-in users, the option is still shown, marked "Doesn't work here": choose another one.

With Only with an API key selected, the key controls appear right under the option:

  • Use an existing API key lists the assistant's keys that can be used here; expired keys and Read and write keys are left out. It only appears if you have write access to the assistant and such a key exists.
  • To make a new key, type a name in API key name and press Generate key.
  • The chosen key is then shown masked, with a copy button, and Use another key brings the picker back. QAnswer remembers the key in your browser and selects it again the next time you open the guide.

Switching to Public or Logged-in users sets the key aside, since none is needed then; it comes back if you return to Only with an API key.

Note
Below the options, a status message says whether the integration is ready, for example "Ready: anyone can use this integration, no API key needed.", or what is still missing, such as "Not ready yet: select or create an API key above."
Warning
Access is an assistant-level setting. Changing it here also changes it for the assistant's chat interface, search interface, REST API and every third-party integration — not just this widget.
Note
This step controls anonymous, public access only. To share the assistant with named users, teams or organisations, use the Share dialog in the assistant's top bar instead.

Step 4 — Export

The last required step gives you the code to paste into your website. Three flavours of the same integration are available; pick the one that fits how your site is built.

The Script snippet, a single script tag pointing at the QAnswer widget loader
  • Script — a single '<script>' tag that loads the widget from QAnswer. The simplest option, and the right one for almost every site.
  • Script Content — the inline body of that script, for platforms that let you add JavaScript but not a script tag with a src attribute.
  • IFrame — an '<iframe>' embed, for environments where external scripts are blocked by a content security policy.
Note
Paste the snippet just before the closing '</body>' tag of every page the widget should appear on. In website editors such as Confluence, Wix or WordPress you may need to put it inside a "code block" or "HTML block" element. Until the status message in step 3 reads Ready, this step stays greyed out.

Step 5 — Customize Additional Data (optional)

Your website often knows things about the visitor that the assistant does not — who they are, which plan they are on, which page they are reading. Additional data lets you pass those through to the assistant as key/value pairs. Fill in a field name and an example value, then use the + button to add more rows.

The Export step with its Script snippet carrying the botName / Support Bot pair, then the Allowed domains step and the Customize Additional Data step where that pair is entered

Adding a pair rewrites the snippet in step 4, so copy the code again after you change anything here. The example values you type are only there to build the snippet — replace them with real values from your own site when you paste it in.

Note
The injected fields can then be referenced from the assistant's instructions , for example to greet the visitor by name.