Chat

FAQ

Frequently asked questions about Clerk.io Chat.

Handoff to other system #

You can use Clerk.io Chat as the first-line assistant and hand the conversation to your own support chat when a visitor asks to speak to a human.

Clerk.io calls the onSupport hook when the Chat support action is triggered. The callback receives an event object containing a summary of the conversation. In the example below, the event object is named e.

Use the summary to open your own chat provider with the conversation context. Replace the placeholder functions with the API or JavaScript integration supplied by your chat provider.

Clerk('config', {
  key: 'YOUR_PUBLIC_API_KEY',
  chat: {
    onSupport: function (e) {
      Clerk('chat', 'disable');
      Clerk('chat', 'close');

      open_support_chat({
        message: e
      });
    }
  }
});

If your provider needs a specific field from the event object, inspect e in the browser console and pass that field instead of the complete object.

function open_support_chat(context) {
  // Replace this with your chat provider's integration.
  window.SendDeskWidget.open({
    context: context.message
  });
}

The exact method for opening the external chat depends on the provider. The important parts are to preserve the summary, disable Clerk.io Chat, and open the other chat after the handoff data is ready.