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",
});
awaitwindow.CordSDK.thread.createThread({id:'my-awesome-thread-id',name:'A more awesome name',location:{'page':'sales'},url:"https://my-awesome-url.com",});
The name of the thread. This is shown to users when the thread is referenced, such as in notifications. This should generally be something like the page title.
A URL where the thread can be seen. This determines where a user is sent when they click on a reference to this thread, such as in a notification, or if they click on a reference to a message in the thread and the message doesn't have its own URL.