Live Chat SDK

Setup & embed

Add one script tag before </body> and the HellouOne bubble appears on the page. From there, every option is controlled through a single global config object.

1. Grab the snippet

Open the HellouOne dashboard, pick the inbox you want to embed, and open the Configuration tab. The snippet that appears already includes your websiteToken — copy it as-is.

<!-- Paste this just before </body> -->
<script>
  (function(d,t) {
    var BASE_URL="https://one.hellou.ai";
    var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
    g.src=BASE_URL+"/packs/js/sdk.js";
    g.defer = true;
    g.async = true;
    s.parentNode.insertBefore(g,s);
    g.onload=function(){
      window.hellouOne.run({
        websiteToken: 'YOUR_WEBSITE_TOKEN',
        baseUrl: BASE_URL
      });
    }
  })(document,"script");
</script>

2. Configure the widget

Set window.hellouOneSettings before the SDK loads (above the snippet, or inline at the top of it). The SDK reads the object once during run() and applies the values to the chat bubble.

<script>
  window.hellouOneSettings = {
    position: 'right',
    type: 'expanded_bubble',
    launcherTitle: 'Chat with us',
    darkMode: 'auto',
    useBrowserLanguage: true
  };
</script>

Dashboard settings and snippet options

Most of the launcher’s look — side, icon, text, theme, distance from the edges, corner radius, hidden launcher — is set per inbox in the dashboard under Settings → Inboxes → Widget Builder, and reaches every installed widget on its next page load with no code change. An option you set in hellouOneSettings takes precedence over the dashboard; anything you leave out follows it.

Older embed codes were generated with position: 'right', type: 'standard' and launcherTitle: 'Chat with us' (or 'Chatea con nosotros') written in. Those exact values count as not set, so snippets pasted before the Widget Builder still follow the dashboard. To pin one of them on purpose, set any other value — for example position: 'left'.

Available options

KeyTypeDefaultWhat it controls
position 'left' | 'right' Widget Builder Which side of the viewport the launcher sits on.
type 'standard' | 'expanded_bubble' Widget Builder Round bubble vs. pill with a label.
launcherTitle string Widget Builder Text rendered inside the pill when type is 'expanded_bubble'.
widgetStyle 'standard' | 'flat' 'standard' Shape of the chat panel surface.
darkMode 'light' | 'dark' | 'auto' Widget Builder Color scheme. 'auto' follows the visitor’s OS preference.
hideMessageBubble boolean Widget Builder Start with the launcher hidden. Use a custom button and call toggle() yourself.
showPopoutButton boolean false Show the “open in new window” control inside the chat panel.
showUnreadMessagesDialog boolean true Surface a small preview when a new agent message arrives while the panel is closed.
locale string (ISO code) — Initial UI language, e.g. 'en', 'es', 'fr'.
useBrowserLanguage boolean false Override locale with navigator.language at boot.
baseDomain string page domain Cookie scope. Set to your apex domain to share the session across subdomains.

3. Wait for the SDK to be ready

The script tag is asynchronous: the widget is not available the instant the snippet runs. If you need to call methods at boot, listen for hellouone:ready first.

window.addEventListener('hellouone:ready', function () {
  window.$hellouOne.toggle('open');
});

See SDK events for the full list, and SDK methods for the runtime API you can call once the widget is up.

Cookie scope

The SDK stores two cookies on the visitor’s browser: cw_conversation (the conversation auth token, 365 days) and cw_user_<websiteToken> (a hash of the most recent setUser payload, used to skip redundant network calls). Both are set SameSite=Lax. Set baseDomain in your settings if you want them shared across subdomains.

Cross-domain

Cookies cannot be shared across different registrable domains. If your support visitor moves between shop.com and help.shop.io, the SDK will treat them as two separate sessions.