Live Chat

Add real-time support chat to the feedback widget for your signed-in users

Overview

Live chat lets your signed-in users start a real-time conversation with your support team. It's a module of the feedback widget hub — when enabled, a Chat with us tile appears in the widget alongside Bug report, Feature request, and the rest. Messages appear instantly in the dashboard under Messages → Live chat, replies stream straight back to the user, and if they've closed the tab they get an email instead.

Enable it

  1. In the dashboard, open Project → Settings → Widget Defaults and turn on Live Chat.
  2. Make sure the feedback widget is installed on your site (it's the same seggwat-feedback.js script — no extra script for chat):
html
<script src="https://seggwat.com/static/widgets/v1/seggwat-feedback.js"
           data-project-key="your-project-key"></script>
  1. Identify the current user with a token your backend mints:
html
<script>
     // `token` is a signed JWT (HS256) minted by YOUR backend with your project's
     // signing secret (see End-user Authentication). Keep its lifetime short.
     SeggwatFeedback.setUser("user-123", "user@example.com", token);
   </script>

Once setUser receives a token, the Chat with us tile shows up in the widget. Anonymous visitors see the other feedback tiles but not chat.

JavaScript API

Live chat is driven through the feedback widget's existing API:

javascript
// Identify the current user. The 3rd argument (token) enables Live Chat.
// Omit it for projects that don't use chat.
SeggwatFeedback.setUser("user-123", "user@example.com", token);

// Open the widget programmatically (shows the tile menu, or the single
// enabled module directly).
SeggwatFeedback.open();

If you need to set the user before the widget script has loaded, assign window.__seggwat_pending_user = { userId, email, token } instead — the widget applies it once it initializes.

How it works

  • Your user → your team: messages post in real time and show up in the dashboard Messages page under the Live chat tab. Your team also gets an in-app notification.
  • Your team → your user: replies stream back to the open widget instantly. If the user has left, they receive an email with the reply (when an email was provided to setUser).
  • Unread replies: if your team replies while the user has the widget closed, the launcher button shows a notification dot. Clicking it opens the conversation directly instead of the tile menu, so a waiting answer is one tap away — the dot clears once they open the thread.
  • One thread per user: conversations are keyed to the authenticated user, so returning visitors always pick up where they left off — across reloads and devices.

Authentication

Live chat reuses the project's end-user authentication. Your backend mints a token signed with the project's signing secret; SeggWat validates the signature, expiry, and project binding before accepting any message. See End-user Authentication for how to generate the signing secret and sign tokens.

Navigation