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))
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. |
Note
One of either
writtenFeedback
orsuggestedReasons
are required fields
options
options
Property | Type | Description |
---|---|---|
articleId | String | Required The unique ID of the article. |
feedbackId | String | Required The unique ID of the Article Feedback to update. |
writtenFeedback | String | Optional The feedback text. |
suggestedReasons | Array of String | Optional Any of the value properties from the SuggestedReasonsDetails as returned from KustomerCore.getKnowledgeBaseConfig() |
lang | String | The article's language code. |
callbackResponse
callbackResponse
// callbackResponse
{
attributes: {
rating: 'positive' | 'negative';
suggestedReasons?: string[];
writtenFeedback?: string;
};
id: string;
}
Updated almost 3 years ago
Did this page help you?