How-to guide

Start conversations for your visitors

Say hello on the pages where people get stuck, and let them reach you in one tap — from a message that pops up beside the chat button, or from your own buttons and banners.

Proactive messages

Open Channels, select your website channel, open the Live Chat tab and scroll to Proactive messages. Start from a template or write your own, then select Save changes. Visitors get new messages on their next page load.

Each message has its text (up to 500 characters) and up to four quick replies. A visitor can tap a quick reply to send it as their first message, click the message to open the chat and type, or close it. When they reply, the conversation in your inbox starts with your message, so you can see what they were answering.

Proactive messages are your own words. No AI writes or sends them, so they never use AI conversations. If your Auto-Responder is on, it answers the visitor's reply just like any other chat.

Where, when and how often

Where it shows uses the same page list as Where the widget appears: every page, only these pages, or every page except these — for example /pricing*.

  • Seconds on the page first: How long the visitor has been on the page before the message can appear. 0 shows it right away.
  • They scroll down the page: Also wait until the visitor has scrolled this far down, for example 50%.
  • They're about to leave: Also wait until the pointer heads for the browser's tabs or address bar. Computers only — phones have no pointer, so the message never shows there.

How often decides whether a visitor sees it again:

  • Once per visitor: The default. Shown once, then never again in that browser.
  • Once per visit: Shown again when the visitor comes back in a new browser session.
  • Every time a page loads: Shown on every matching page — best for very specific pages.

Good to know

  • Visitors see at most one message per page. When several match, the first in your list wins.
  • Messages never appear while the chat is open, while a reply from your team is waiting, or on pages where the widget is hidden.
  • Closing a message counts as seeing it.
  • Messages appear beside the chat button, so they don't show when you hide the launcher or inside the iOS and Android SDKs.

Open the chat pre-filled from your own buttons

Add data-sonny-message to any button, link or banner on your site. A click opens a new conversation with that text already in the message box — the visitor can edit it, then press send. Use data-sonny-open to simply open the chat. It works for elements your site adds later, too.

HTML
<!-- No code needed: the attribute pre-fills the chat -->
<div class="help-banner">
  Need help with your domain?
  <button data-sonny-message="I need help setting up email for my domain">
    Ask us
  </button>
</div>

<!-- Just open the chat -->
<a href="#" data-sonny-open>Chat with us</a>

Attributes only ever pre-fill the message — the visitor always presses send. To send a message automatically, call sonny('sendMessage') from your own code:

HTML
<script>
  // Open a new conversation with the message ready to send
  sonny('newMessage', 'I need help setting up email for zyz.com');

  // Open a new conversation and send the message straight away
  sonny('sendMessage', 'I need help setting up email for zyz.com');

  // Open an empty new conversation
  sonny('newMessage');
</script>

Both commands work with the snippet and the single script-tag install, even before the widget has finished loading. If you ask visitors for their email before they chat, they see that form first and their message goes out right after. Messages can be up to 5,000 characters.

Related docs