KustomerCore.createConversation()
Creates a new session in Kustomer so you can start sending messages.
First, initialize chatYou must initialize with
KustomerCore.init()before you can execute any additional Core SDK methods
Examples
KustomerCore.createConversation(
{
title: 'Conversation Title',
assistant: 'SOME_ASSISTANT_ID',
brand: 'SOME_BRAND_ID',
lang: 'en',
},
(response, error) => {
console.log('Session was created!');
}
);Syntax
KustomerCore.createConversation(options, function(callbackResponse, error))| Parameter | Type | Description |
|---|---|---|
| options | Object | Optional These are options that you can pass in to modify the created session. All possible options are listed below. |
| function(callbackResponse, error) | Function | Optional A callback that is run after callbackResponse is an object returned to the callback function. See the error is either |
options
options| Property | Type | Description |
|---|---|---|
| title | String | Required The title or subject line of the conversation. Limited to 256 characters. |
| brand | String | Required The brand that the conversation belongs to. |
| assistant | String | Optional The conversational assistant being used in the conversation. |
| lang | String | Optional The lang code that the created conversation should be set to. |
callbackResponse
callbackResponse| Property | Type | Description |
|---|---|---|
| conversationId | String | Required The conversation unique ID |
| createdAt | String | Required The conversation's created at timestamp |
| ended | Boolean | Required Whether or not the conversation is ended. |
| isInAssistantMode | Boolean | Whether or not the conversation is still in assistant mode. |
Updated 16 days ago