KustomerCore.submitArticleFeedback()

Submits the response of an article feedback form.

πŸ‘

First, initialize chat

You must initialize with KustomerCore.init() before you can execute any additional Core SDK methods

Examples

// Submit a satisfaction form
KustomerCore.submitArticleFeedback({
  articleId: 'SOME_ID',
  rating: 'positive',
  knowledgeBaseId: 'SOME_KB_ID',
  lang: 'en_us',
}, function (res, error) {
  console.log('Submitted article feedback!');
});

Syntax

KustomerCore.submitSatisfactionForm(options, function(callbackResponse, error))

Parameter

Type

Description

options

Object

Optional

An options object allowing you to modify this method call. All possible options are listed below.

function(callbackResponse, error)

Function

Optional

A callback that is run after the completion of this method.

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

Property

Type

Description

articleId

String

Required

The unique ID of the article.

rating

String

Required

The rating for the article. Can be 'positive' or 'negative'.

knowledgeBaseId

String

Required

The unique ID of the knowledge base.

lang

String

The article's language code.

callbackResponse

// callbackResponse

{
  attributes: {
    rating: 'positive' | 'negative';
    suggestedReasons?: string[];
    writtenFeedback?: string;
  };
  id: string;
}

Did this page help you?