> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.crisp.chat/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How to create conversation threads from the chatbox

*Threads let you separate a specific support topic inside a larger conversation timeline when you control the website integration.*

This is useful when a customer may have several distinct issues over time and you want the timeline to show a clearer beginning and end for each one. Threads are started and ended from your website code through the Crisp JavaScript SDK.

---

# ${color}[#0080dd](Understand what a thread is)

A thread is a labeled sequence of messages inside a conversation that relates to one specific topic.

For example, a hosting provider could start a thread called `Customer server offline (Ticket #1929383)` and close it once that incident is resolved. The overall conversation stays intact, but the support timeline becomes easier to read.

![Example of a conversation thread inside Crisp](https://storage.crisp.chat/users/helpdesk/website/87ae2703583ac800/cleanshot-2024-10-29-at-171755_mfnkqv.png =1000xauto)

---

# ${color}[#0080dd](Know the implementation requirements)

Threads are not created automatically by Crisp. Your website logic must decide when a thread should start and when it should end.

That means your implementation usually needs contextual signals such as a submitted support form, a ticket state, or another event in your own product.

If you need the SDK documentation, start here: [How to use $crisp JavaScript SDK?](https://docs.crisp.chat/guides/chatbox-sdks/web-sdk/dollar-crisp/)

||| The chatbox must be active before a thread can be started or ended. In practice, it must have been opened at least once.

---

# ${color}[#0080dd](Start a thread from your website code)

To start a thread, run the following JavaScript command:

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

The thread topic is required and should clearly describe the subject you want to isolate.

---

# ${color}[#0080dd](End a thread from your website code)

To end the current thread, run:

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

You can also end a thread while explicitly specifying its topic:

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

If you need to ensure the widget is available before triggering the thread event, you can also combine this with your own chatbox-opening logic.