KustomerCore.updateArticleFeedback()

Updates the previously submitted response of a KnowledgeBase 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.updateArticleFeedback({
  articleId: 'SOME_ID',
  feedbackId: 'SOME_FEEDBACK_ID',
  writtenFeedback: 'some feedback',
  suggestedReasons: [
    'SUGGESTED_RESON_VALUE'
  ],
  lang: 'en_us',
}, function (res, error) {
  console.log('Submitted article feedback!');
});

Syntax

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

An options object allowing you to modify this method call. All possible options are listed below.
function(callbackResponse, error)FunctionOptional

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.

📘

Note

One of either writtenFeedback or suggestedReasons are required fields

options

PropertyTypeDescription
articleIdStringRequired

The unique ID of the article.
feedbackIdStringRequired

The unique ID of the Article Feedback to update.
writtenFeedbackStringOptional

The feedback text.
suggestedReasonsArray of StringOptional

Any of the value properties from the SuggestedReasonsDetails as returned from KustomerCore.getKnowledgeBaseConfig()
langStringThe article's language code.

callbackResponse

// callbackResponse

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