WhatsBuddy

WhatsBuddy

Chat on your site, controlled from the page

Paste one script. Open and close the window, fill the composer from a link, and hand the agent the page the visitor is on.

  • Your button

    Hide the bubble and open the chat from a button you already have.

  • Prefilled links

    A URL can fill the composer, open the window, or send the first line.

  • Page context

    Tell the agent which room, plan, or page the visitor is looking at.

  • One script

    The same widget.js tag is the embed and the JavaScript API.

Add the widget

Create a widget in the app, allow your hostname, and paste this on the page. Calls made before the script loads are queued.

<script>
  window.WhatsBuddy = window.WhatsBuddy || function () {
    (WhatsBuddy.q = WhatsBuddy.q || []).push(arguments);
  };
  WhatsBuddy('setContext', { plan: 'Pro' });
</script>
<script
  src="https://whatsbuddy.com/widget.js"
  data-key="WIDGET_PUBLIC_KEY"
  async
></script>

From your page

Open, fill, and tell it where they are

The script adds window.WhatsBuddy. One widget per page.

  1. Open and close

    WhatsBuddy.open(), close(), and toggle(). The app can hide the Live Chat button. Your page then calls WhatsBuddy.open().

  2. Prefill or send

    setMessage('Table for 2') fills the box.sendMessage('Table for 2') opens the window and sends it.

  3. Page context

    setContext({ room: '12' }) merges keys. The agent sees the snapshot when it changes, not on every message.

Put the chat where the question starts

The visitor stays on your site. You still read the thread in WhatsBuddy.