Create a new thread

Ask the Community

Create a thread without messages


Overview #

Create a new empty thread i.e. a thread without messages. Please note that because the new thread won't have any messages, it will not be displayed on any of the thread-related components like ThreadedComments, ThreadList or Thread. If you would like to create a thread containing a message instead, please use the SendMessage API and pass in thread data via the createThread argument.
Vanilla JavaScript:
await window.CordSDK.thread.createThread({
  id: 'my-awesome-thread-id',
  name: 'A more awesome name',
  location: {'page': 'sales'},
  url: "https://my-awesome-url.com",
});
await window.CordSDK.thread.createThread({
  id: 'my-awesome-thread-id',
  name: 'A more awesome name',
  location: {'page': 'sales'},
  url: "https://my-awesome-url.com",
});
Copy

What this function returns #

A promise that resolves to true if the operation succeeded or rejects if it failed.

Arguments this function takes #


data #

required
ClientCreateThread
The data values the new thread should have.

This is an object with the following fields:

Show property details


Not finding the answer you need? Ask our Developer Community

Ask Cordy