KustomerCore.submitSatisfactionForm()
Submit the response of a satisfaction 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.submitSatisfactionForm({
satisfactionId: 'SOME_ID',
rating: 8,
followupAnswer: 'Very helpful and clear.',
submittedAt: '2021-01-27T22:46:49.030Z',
}, function (res, error) {
console.log('Submitted satisfaction form!');
});
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 |
---|---|---|
satisfactionId | String | Required The satisfaction form unique ID. |
rating | Number | Optional A numerical rating scoring the customer's satisfaction. |
followupAnswer | String | Optional The text feedback that the customer submitted in the satisfaction form. |
submittedAt | String | Required An ISO string Date value that you can generate through |
callbackResponse
callbackResponse
// callbackResponse
{
conversationId: String,
satisfactionId: String,
timetoken: String,
form: {
description: String,
introduction: String,
name: String,
followupQuestion: String,
ratingPrompt: String,
scale: {
options: String,
labelLow: String,
labelHigh: String,
type: String,
},
},
response: {
rating: Number,
followupAnswer: String,
},
}
Updated over 1 year ago