Articles on: Crisp Inbox

How can I create conversation threads from the chatbox?

In certain cases, your users may need to get support on a specific subject, that has a chronological start and end. The default conversation view may make it hard to distinguish when this support request starts and ends. Threads solve this problem.

A thread is a flow of messages in a conversation, that relate to the same topic. For instance, if you are an hosting provider and your customer has a temporary problem with their server, you may open a new conversation thread in Crisp to provide support on that specific problem. You'll give the thread a self-explanatory name, such as "Customer server offline (Ticket #1929383)".

When you're done providing support to your customer on that specific topic, you can simply close the thread. Your conversation view history will show a beautiful history of when did the thread start, then messages for that thread, and then when did that thread end.

Requirements for threads



Threads can be created from the Crisp Chatbox JavaScript SDK. You can read How to use $crisp JavaScript SDK? for more information.

Threads are not opened or closed automatically. Your website code needs to implement some logic in order to collect information about the current context (eg. your user submits a form asking for assistance), and then push it to Crisp as a new thread. When your website knows the support ticket has been answered, it can end the thread.

Threaded conversation example



Below, we've made up an example conversation to demonstrate how threads can be useful to your own support:

An example thread for an hosting provider

How can I start a thread from the chatbox?



In your website's JavaScript code, run the following:

$crisp.push(["do", "message:thread:start", ["Thread topic..."]])


The thread topic is required (string value).

The chatbox must be active in order for the thread to be started. It means, it must have been opened at least once. You can automatically open the chatbox before starting the thread to ensure this.

How can I end a thread from the chatbox?



In your website's JavaScript code, run the following:

$crisp.push(["do", "message:thread:end"])


Optionally, you can provide the ended thread topic:

$crisp.push(["do", "message:thread:end", ["Thread topic..."]])


The chatbox must be active in order for the thread to be ended. It means, it must have been opened at least once. You can automatically open the chatbox before starting the thread to ensure this.

Updated on: 11/03/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!