KustomerCore.describeConversation()
Update information about a conversation in Kustomer.
First, initialize chat
You must initialize with
KustomerCore.init()
before you can execute any additional Core SDK methods
Examples
// Describes a conversation when a conversation is created
KustomerCore.addListener('onConversationCreate', (res) => {
KustomerCore.describeConversation({
conversationId: res.conversationId,
customAttributes: {
some_custom_attribute: 'some_custom_value'
}
});
});
KustomerCore.describeConversation({
conversationId: 'some_conversation_id',
customAttributes: {
some_custom_attribute: 'some_custom_value'
}
});
KustomerCore.describeConversation({
conversationId: 'some_conversation_id',
customAttributes: {
some_custom_attribute: 'some_custom_value'
}
}, function (callbackResponse, error) {
console.log('Updated information about the conversation');
});
Syntax
KustomerCore.describeConversation(options, function(callbackResponse, error))
Parameter | Type | Description |
---|---|---|
options | Object | Required An object containing all the properties you want to update on the conversation inside Kustomer. A breakdown of the options object is listed below. |
function(callbackResponse, error) | Function | Optional A callback that is run after KustomerCore.describeConversation() completes.callbackResponse is an object returned to the callback function. See the callbackResponse section below to see the properties of the object.error is either undefined or a native JavaScript Error object. |
options
options
Property | Type | Description |
---|---|---|
conversationId | String | Required The conversation's unique ID in Kustomer's database. |
customAttributes | Object | Required An object containing the custom attributes of the conversation. |
customAttributes
Before you can update a custom attribute with
KustomerCore.describeConversation()
, the custom attribute must first exist on the Customer Klass in your Kustomer organization.You can learn more about Klasses and custom attributes in the Kustomer Help Center.
{
conversationId: 'some_conversation_id',
customAttributes: {
some_custom_attribute: 'some_custom_value',
some_custom_attribute2: 'some_custom_value2'
}
}
callbackResponse
callbackResponse
Property | Type | Description |
---|---|---|
conversationId | String | Required The conversation's unique ID in Kustomer's database. |
customAttributes | Object | Optional An object containing the custom attributes of the conversation. { some_custom_attribute: 'some_custom_value' } |
Updated over 3 years ago