{"id":48933,"date":"2022-11-20T04:50:33","date_gmt":"2022-11-20T04:50:33","guid":{"rendered":"https:\/\/developer.kore.ai\/v10-1\/?p=48933"},"modified":"2023-07-26T06:06:47","modified_gmt":"2023-07-26T05:06:47","slug":"feedback-survey-api","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v10-1\/docs\/bots\/api-guide\/feedback-survey-api\/","title":{"rendered":"Feedback Survey API"},"content":{"rendered":"<section class=\"l-section wpb_row height_auto\"><div class=\"l-section-h i-cf\"><div class=\"g-cols vc_row type_default valign_top\"><div class=\"vc_col-sm-12 wpb_column vc_column_container\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\"><div class=\"w-separator size_medium\"><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<p>To fetch the feedback survey scores provided by the user in the conversation with a virtual assistant and push the data for visualization on the <b>Feedback Analytics<\/b> module using the <b><i>Survey Type<\/i><\/b> and <b><i>Survey Name<\/i><\/b>.<\/p>\n<p>&nbsp;<\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Method<\/b><\/td>\n<td>POST<\/td>\n<\/tr>\n<tr>\n<td><b>Endpoint<\/b><\/td>\n<td><span style=\"font-weight: 400;\"> <code>https:\/\/{{host}}\/api\/public\/bot\/{{BotID}}\/saveFeedback<\/code><\/span><\/p>\n<p>&nbsp;<\/td>\n<\/tr>\n<tr>\n<td><b>Content Type<\/b><\/td>\n<td><code>application\/json<\/code><\/td>\n<\/tr>\n<tr>\n<td><b>Authorization<\/b><\/td>\n<td><code>auth: {{JWT}}<\/code><\/p>\n<p>See <a href=\"https:\/\/developer.kore.ai\/v10-1\/docs\/bots\/api-guide\/apis\/#Generating_the_JWT_Token\" target=\"_blank\" rel=\"noopener noreferrer\">How to generate the JWT Token<\/a>.<\/td>\n<\/tr>\n<tr>\n<td><b>API Scope<\/b><\/td>\n<td>\n<ul>\n<li>Bot Builder: Metrics<\/li>\n<li>Admin Console: Bot Analytics &gt; Feedback Analytics<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Path_Parameters\">Path Parameters<\/span><\/h2>\n<table>\n<tbody>\n<tr>\n<th><b>Parameter<\/b><\/th>\n<th><b>Description<\/b><\/th>\n<th><b>Type<\/b><\/th>\n<\/tr>\n<tr>\n<td><b>host<\/b><\/td>\n<td>The environment URL. For example, <code>https:\/\/bots.kore.ai<\/code><\/td>\n<td>string, required<\/td>\n<\/tr>\n<tr>\n<td><b>BotId<\/b><\/td>\n<td><i>Bot ID<\/i> or <i>Stream ID<\/i> can be accessed under <b>General Settings<\/b> on the Bot Builder.<\/p>\n<p><b>Note<\/b>: This is required only for Bot Builder API scope of Proactive Messages.<\/td>\n<td>string, required<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h2><span class=\"ez-toc-section\" id=\"Sample_Request\">Sample Request<\/span><\/h2>\n<p><code>curl --location 'https:\/\/{{host}}\/api\/1.1\/public\/bot\/{{botId}}\/saveFeedback' \\<br \/>\n--header 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \\<br \/>\n--header 'Content-Type: application\/json' \\<br \/>\n--data-raw '{<br \/>\n\"channelUId\":\"qatesting@vomoto.com\",<br \/>\n\"name\":\"Thumb\",<br \/>\n\"score\":0,<br \/>\n\"channel\":\"rtm\",<br \/>\n\"type\":\"THUMB\",<br \/>\n\"language\":\"en\",<br \/>\n\"message\":\"\"<br \/>\n}'<\/code><\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h2><span class=\"ez-toc-section\" id=\"Request_Body_Parameters\">Request Body Parameters<\/span><\/h2>\n<table>\n<tbody>\n<tr>\n<th><b>Parameter<\/b><\/th>\n<th><b>Description<\/b><\/th>\n<th><b>Type<\/b><\/th>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">channelUId<\/span><\/td>\n<td>The ID of the user on the channel where the feedback survey was triggered. Can be the user&#8217;s email id or enterprise assigned unique id.<\/td>\n<td>string, required<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">name<\/span><\/td>\n<td>The name of the survey provided by the user.<\/td>\n<td>string, required<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">score<\/span><\/td>\n<td>The feedback survey score provided by the user as a response.<\/td>\n<td>number, required<\/td>\n<\/tr>\n<tr>\n<td>channel<\/td>\n<td>The channel used for the feedback survey.<\/td>\n<td>string, required<\/td>\n<\/tr>\n<tr>\n<td>type<\/td>\n<td>One of the feedback survey types THUMB, NPS, or CSAT.<\/td>\n<td>string, required<\/td>\n<\/tr>\n<tr>\n<td>language<\/td>\n<td>The language in which the Feedback survey is triggered.<\/td>\n<td>string, required<\/td>\n<\/tr>\n<tr>\n<td>message<\/td>\n<td>The message prompted to the user during the feedback survey.<\/td>\n<td>string, required<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h2><span class=\"ez-toc-section\" id=\"Sample_Response\">Sample Response<\/span><\/h2>\n<p><code>{<br \/>\n\"botId\": \"st-053cd130-f983-577a-8aad-2504aebd60b9\",<br \/>\n\"channel\": \"rtm\",<br \/>\n\"language\": \"en\",<br \/>\n\"score\": 0,<br \/>\n\"timestamp\": \"2023-03-23T07:07:43.538Z\",<br \/>\n\"createdOn\": \"2023-03-23T07:07:43.538Z\",<br \/>\n\"timestampValue\": 1679555263538,<br \/>\n\"type\": \"THUMB\",<br \/>\n\"name\": \"Thumb\",<br \/>\n\"channelUId\": \"qatesting@vomoto.com\",<br \/>\n\"orgId\": \"o-89b0abd5-19af-5017-a80a-6fc6bfc7a638\",<br \/>\n\"accountId\": \"60dbef1bc2f5c25106cdb57d\",<br \/>\n\"userId\": \"u-f5d97fb8-8767-5b6c-a28d-09e9ac281e12\",<br \/>\n\"_id\": \"641bfabf0353f52d915f7a87\",<br \/>\n\"__v\": 0<br \/>\n}<\/code><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Response_Body_Parameters\">Response Body Parameters<\/span><\/h2>\n<table>\n<tbody>\n<tr>\n<th><b>Parameter<\/b><\/th>\n<th><b>Description<\/b><\/th>\n<th><b>Type<\/b><\/th>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">botId<\/span><\/td>\n<td>The ID of the virtual assistant for which feedback was given. You can access it from the virtual assistant\u2019s <b>General Settings<\/b> page.<\/td>\n<td>string, required<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">channel<\/span><\/td>\n<td>The channel on which the user responds to the feedback survey.<\/td>\n<td>string, required<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">language<\/span><\/td>\n<td>The language in which the feedback survey is triggered.<\/td>\n<td>string, required<\/td>\n<\/tr>\n<tr>\n<td>score<\/td>\n<td>The feedback score.<\/td>\n<td>number, required<\/td>\n<\/tr>\n<tr>\n<td>timestamp<\/td>\n<td>Feedback response date converted into timestamp format.<\/td>\n<td>date (ISO Date format YYYY-MM-DDThh:mm:ss.mmmZ), required<\/td>\n<\/tr>\n<tr>\n<td>createdOn<\/td>\n<td>Feedback creation date converted into timestamp format.<\/td>\n<td>date (ISO Date format YYYY-MM-DDThh:mm:ss.mmmZ), required<\/td>\n<\/tr>\n<tr>\n<td>timestampValue<\/td>\n<td>Creation date converted into timestamp numeric format.<\/td>\n<td>number, required<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">type<\/span><\/td>\n<td>The feedback survey type.<\/td>\n<td>string, required<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">name<\/span><\/td>\n<td>The feedback survey name.<\/td>\n<td>string, required<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">channelUId<\/span><\/td>\n<td>The end-user\u2019s channel user identifier.<\/td>\n<td>string, required<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">orgId<\/span><\/td>\n<td>Organization id the bot belongs to.<\/td>\n<td>string, required<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">accountId<\/span><\/td>\n<td>Account id the bot belongs to.<\/td>\n<td>string, required<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">userId<\/span><\/td>\n<td>User id the bot belongs to.<\/td>\n<td>string, required<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">_Id<\/span><\/td>\n<td>Unique identifier for the message record.<\/td>\n<td>string, required<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">__v<\/span><\/td>\n<td>The value is always 0. Does not have any significance as of now.<\/td>\n<td>integer, optional<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small\"><\/div><\/div><\/div><\/div><\/div><\/div><\/section>\n","protected":false},"excerpt":{"rendered":"To fetch the feedback survey scores provided by the user in the conversation with a virtual assistant and push the data for visualization on the Feedback Analytics module using the Survey Type and Survey Name. &nbsp; Method POST Endpoint https:\/\/{{host}}\/api\/public\/bot\/{{BotID}}\/saveFeedback &nbsp; Content Type application\/json Authorization auth: {{JWT}} See How to generate the JWT Token. API...","protected":false},"author":21,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-48933","post","type-post","status-publish","format-standard","hentry","category-api-guide"],"_links":{"self":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/48933","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/users\/21"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/comments?post=48933"}],"version-history":[{"count":28,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/48933\/revisions"}],"predecessor-version":[{"id":58388,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/48933\/revisions\/58388"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/media?parent=48933"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/categories?post=48933"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/tags?post=48933"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}