Skip to main content
Search

Chat inside Confluence

Show the support chat to signed-in employees on your Confluence pages, or use an invite-only Telegram bot on Confluence Cloud or when that is not allowed.

Your employees can ask the AI assistant questions right inside your Confluence wiki: a special version of the chat code shows the chat only to people signed in to Confluence. It goes into the Custom HTML setting of Confluence Data Center or Server, which only a Confluence system administrator can change, and the chat then appears on every page of the wiki. On Confluence Cloud, or when the administrator says no, use an invite-only Telegram bot instead.

Who sees the chat

The Confluence code starts the chat only for a person signed in to Confluence. Visitors who are not signed in, for example on the login page of your wiki, get no chat button.

This check runs in the browser and only decides whether the chat appears. It is not a lock: your support address and inbox ID are part of the page code, and the chat answers anyone who uses them. Choose the knowledge behind this chat with that in mind, see the last section.

Get the code

The code is in two places:

  • in the panel: Admin > Inboxes, the inbox whose channel is Live Chat, tab Setup, section Installation, part Chat inside Confluence;
  • in the cabinet: step Widget on the site, tab In Confluence.

It looks like this, with your support address and inbox ID filled in:

<script>
  (function () {
    // Only signed-in employees get the chat: the Confluence login page does not show it.
    var user = document.querySelector('meta[name="ajs-remote-user"]');
    if (!user || !user.getAttribute('content')) return;
    window.SupportChatSettings = {
      baseURL: 'https://your-support-address',
      inboxID: 'YOUR_INBOX_ID'
    };
    var s = document.createElement('script');
    s.async = true;
    s.src = 'https://your-support-address/widget.js';
    document.body.appendChild(s);
  })();
</script>

In Confluence use this code instead of the normal website code.

Who has to paste it

The code needs the Custom HTML setting, which exists in Confluence Data Center and Server, the editions that run on your own servers. Confluence Cloud (an address like acme.atlassian.net) has no such setting, so on Cloud use the Telegram bot from the section below.

Only a Confluence system administrator can add the code. In the Confluence administration it goes to General Configuration > Look and Feel > Custom HTML > At end of the BODY. Confluence then shows the chat on every page of the whole wiki, for every team, not only in one space. Administrators of large companies often refuse to add outside code to the whole wiki; the section below covers that case.

Check that it works

The cabinet cannot check this installation for you, because Confluence pages are behind a login. Sign in to Confluence and open any page: the chat button appears in the bottom corner of the page, on the right unless you changed Position in the Launcher section of the inbox (tab Appearance).

If the Domain list of the inbox (tab Setup, section Security) is not empty, add your Confluence domain to it: a filled list lets the chat window open only on the domains it names.

If the administrator says no

Give your team a Telegram bot that only your people can open, and put its link where they already work. This is also the way for Confluence Cloud:

  1. Connect a Telegram bot as described in Telegram.
  2. In the Telegram inbox turn on Invite link only and press Save. The Invite link appears in the form after saving.
  3. If nobody on your side answers chats, also turn on AI chat without agents (see AI chat without agents).
  4. Copy the link and add it to the sidebar of your Confluence space. In Data Center and Server this is Space tools > Configure sidebar > Add link; in Cloud, add the link as a shortcut in the space sidebar. Either way it needs space administrator rights only, not rights over the whole wiki.

The bot answers only people who opened it through the link. Anyone else who finds the bot gets a short note that it works by invitation, and nothing from them appears in the panel. New link turns the old link off: everyone who joined through it opens the new one once, which helps when someone leaves the team or the link leaks. To remove one person, open their contact, choose Block in its menu and confirm.

One knowledge base for every chat

The chat inside Confluence uses a live chat inbox just like your website chat, and the assistant answers every chat from the same knowledge base. The bot answers everyone who reaches the chat. So if your knowledge base holds internal documentation, do not put the chat on a public website at the same time; if your website chat is public, connect only spaces your customers may read. Confluence spaces become a knowledge source in AI > Knowledge base, button Add knowledge, tab Confluence: see Confluence connector.

Was this article helpful?