Webchat

Put your firm's Subcontext AI agent on your website as a chat window, in the corner of the page or inside your own layout.

The webchat puts your firm's Subcontext AI agent on your website as a chat window. Visitors type (or talk, using their microphone) and the agent's replies appear as they are written.

It can appear in two ways:

  • Widget mode (the default): a round chat button (the "launcher") sits in the corner of the page. Clicking it opens a chat panel.
  • Embedded mode: the chat fills a box you choose on your page, with no launcher.

Every conversation lands in your Subcontext inbox. Your team can watch it, step in and reply, and the visitor can carry it on by text message, WhatsApp, email or a phone call.

Looking for something else? For help next to individual form fields, use the form guide. For a quote journey, use the quote form (it can open this chat beside the form).

Quick start#

  1. In the Subcontext dashboard, go to Agents and open your agent.
  2. Make sure a version is live. If the agent's overview says "Nothing is live yet", open a version and press Promote.
  3. Open the Channels tab, choose Web, press Configure, then press Enable.
  4. On the same page, under Add to your website, copy the snippet. It looks like this:
html
   <script
     id="webchat-embed-script"
     src="https://js.subcontext.com/webchat-latest.js"
     data-agent-id="YOUR_AGENT_ID"
     data-base-url="https://subcontext.com"></script>
  1. Paste it into your website's HTML, just before the closing </body> tag, on every page where you want the chat.

Reload your page. A chat button appears in the bottom-right corner. Open it and say hello. The conversation appears in your inbox.

Before you start: set up in the dashboard#

The chat only shows when three things are true. Subcontext checks them each time the chat loads and each time a new conversation starts.

Check Where to fix it
The agent is live (it has a promoted version). Agents, open the agent, open a version and press Promote.
The Web channel is on. Agents, open the agent, Channels tab, Web, Configure, Enable.
Your Subcontext account is in good standing. If a paid subscription has lapsed, the chat is hidden on every website, even though the dashboard still shows the agent as live. Check your billing, or ask Subcontext.

If any of these is false, the chat stays hidden and the browser console says why (see Troubleshooting). A conversation that is already under way carries on if the Web channel is switched off.

The Web switch covers the chat on your own websites, including a Subcontext quote form or lead form on your site that opens the chat. It doesn't affect pages that Subcontext hosts for you (your Subcontext mini-site, on its sites.subcontext.com address or your own verified domain) or Subcontext's own pages. Those work whatever the switch says.

The webchat doesn't need:

  • A key, or a list of allowed websites. Any page that has your agent's id can show its chat while the Web channel is on. See Privacy and security.
  • A particular plan. The webchat itself isn't limited by plan.

Optional extras, each with its own setup:

Feature What it needs
Carrying the chat on by text or WhatsApp An SMS or WhatsApp channel, with a phone number, switched on for the same agent (Channels tab). Without one, these requests come back as "unavailable".
A phone call back The agent's voice channel, with a number.
Talking in the browser (the microphone button) Voice minutes left in your account's budget, and a page served over https://. Ask Subcontext about voice budgets.
Your own wording under the "Switch channel" form Consent in the dashboard sidebar, then Moving a web chat to text, WhatsApp or email. Only people who manage the organisation can see this page.

Next, install the chat on your pages, then choose your options.

Example pages#

The example pages are complete web pages that show the webchat in use, from the simplest install up. You can read, copy or download each one.

In this section

Stuck, or something missing?

Get in touch and a person on the team will help.

Contact us