KustomerCore.updateArticleFeedback()
Updates the previously submitted response of a KnowledgeBase form
First, initialize chatYou 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 error is either |
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 |
| lang | String | The article's language code. |
callbackResponse
callbackResponse// callbackResponse
{
attributes: {
rating: 'positive' | 'negative';
suggestedReasons?: string[];
writtenFeedback?: string;
};
id: string;
}Updated 16 days ago