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))
ParameterTypeDescription
optionsObjectRequired

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)FunctionOptional

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

PropertyTypeDescription
conversationIdStringRequired

The conversation's unique ID in Kustomer's database.
customAttributesObjectRequired

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

PropertyTypeDescription
conversationIdStringRequired

The conversation's unique ID in Kustomer's database.
customAttributesObjectOptional

An object containing the custom attributes of the conversation.

{ some_custom_attribute: 'some_custom_value' }