Skip to content

Live chat

Live chat puts a chat button on a website. A visitor’s messages land in CRM › Conversations as they’re sent, a member’s reply shows in the widget as it’s written, and each side sees when the other is typing and has seen a message. Nothing needs to be built into the site.

Turn chat on for a site in CRM › Settings › Live chat. From then on, every HTML page of that site gets one tag at the end of its <body>, with the corner and colour the button is drawn in, the greeting while the greeting popup is on, and the page’s CSP nonce when the page’s policy has one:

<script
src="/_platform/chat/widget.js"
async
data-digize-chat
data-position="right"
data-accent="#8b5cf6"
data-greeting="Hi! Ask us anything and we'll answer here."
></script>

The button shows in its corner and colour as the page loads, before the widget asks Digize for anything. A change to them, or to Settings › Branding‘s colour, reaches the sites’ pages within a minute.

A site mounted under a path of another site’s hostname gets the widget only on its own pages, and only when chat is on for it. Turning chat off for a site takes the tag off its pages within a minute.

Turn on On other websites in the same settings. That makes the workspace’s chat key and shows the snippet to paste before </body>:

<script
src="https://digize.com/_platform/chat/widget.js"
data-key="chat_01jf3z8q4r6m2w9t5v7x1y3b4c"
async
></script>

List the websites allowed to embed it, such as https://example.com, to keep the key working only there; with none listed, any website may. Make a new key replaces it, and pages with the old key stop showing the widget.

  • The button in the corner the settings choose, in the workspace’s accent colour from Settings › Branding (with dark text on a light colour), with its logo and sender name in the chat’s header and whether you’re around. On a phone the chat fills the screen.
  • The greeting popup, when Greeting popup is on: the greeting beside the button four seconds into a visit to your Digize sites, with Chat with us. A visitor who closes it doesn’t see it again for a week on that browser, and one with a chat going never does. A reply that comes in while the chat is closed shows there too.
  • The greeting first, then the conversation by day, each run of messages under who wrote it. A visitor who comes back on the same browser carries on where they left off, for six months.
  • While you’re away, outside the business hours in CRM › Settings › Conversations (or also whenever no member has Digize open, if the settings say so), the away message after their first message, once a day, and a form for their name and email, which goes on their contact. A name or email the contact already has is never written over. While the chatbot answers, neither shows: it takes a message itself, and the form comes only if the away message goes after all. A chat a member answered in the last half hour isn’t away, whatever the hours, and a member’s reply takes the form away.
  • Typing and seen: dots while a member writes, and “Seen” under the visitor’s last message once a member has opened it.
  • “Powered by Digize” at the foot, unless Settings › Branding hides it.

The widget is drawn in a shadow root, so the site’s styles don’t reach it and its styles don’t reach the site. It asks Digize for nothing until the visitor opens it, or has a chat going already, so a page view costs nothing.

Turn on AI › Settings › Chatbot and a chatbot answers in the same widget, under the name you give it: only while you’re away (the rule above), or every message until someone on the team replies. It answers from what’s in AI › Settings › Knowledge and Memory and the instructions you write, and cites what it used, numbered, with each source’s title (and address, for a web page) under the answer. It can also:

  • Book on the calendars you pick: it finds free times, asks for the visitor’s name and email, books, and the calendar’s own confirmation goes to them.
  • Take a message, which goes on the visitor’s contact and to the bell and email of whoever has the chat, or everyone.
  • Hand the chat to a person, which tells the team at once and keeps the chatbot quiet in that chat for a day.

It does nothing else, whatever a visitor writes: their messages are never instructions to it. Once a member replies in a chat, it keeps quiet there for half an hour. Its answers show in CRM › Conversations like anyone’s, and the chat stays unread for the team.

Each answer counts on the AI usage in Settings › Billing (the Chatbot line in AI › Settings › Models). It stops answering while the agent is paused, once today’s AI spending limit is reached, after its own limit of answers a day (300 unless you change it), and after 40 answers in one chat in a day; then, or if an answer fails or takes over two minutes, the away message goes as it would without it.

The widget talks to the origin it was loaded from: the site’s own hostname on a Digize site, which Dispatch passes straight to Digize before the site’s Worker runs, or https://digize.com when it’s embedded.

Path What it does
GET /_platform/chat/widget.js The script.
POST /_platform/chat/session { key?, token?, page? }: the visitor’s signed token, the widget’s look and words, whether you’re away, and their messages.
POST /_platform/chat/messages { token, body }: a message from the visitor, up to 2,000 characters.
POST /_platform/chat/identify { token, name, email }: who they are.
GET /_platform/chat/socket?token=… A WebSocket for replies (chat.message), typing (chat.typing) and seen (chat.seen); the widget sends {"type":"typing"} and {"type":"seen"}, and ping every 30 seconds.

One address may make 30 session, message and identify requests a minute to a workspace. Embedded, the session and messages answer with CORS headers for the embedding page’s origin.

  • A page. Don’t serve it as text/html, or serve it from a site that doesn’t have chat on.
  • A site. Untick it in CRM › Settings › Live chat.
  • Elsewhere. Turn embedding off, or make a new key.