Chatbot Learning Question

Chatbot Learning Questions
- Chatbot Learning Questions Manage
GET bot/chatbotLearningQuestions/{id}
GET bot/chatbots/{id}/chatbotLearningQuestions
POST bot/chatbotLearningQuestions
DELETE bot/chatbotLearningQuestions/{id}
Model
Chatbot Learning Question JSON Format

Chatbot Learning Question is represented as simple flat JSON objects with the following keys:

Name Type Description
id guid Id of the learning question.
chatbotId guid Id of the chatbot.
chatId guid Id of the chat.
question string Visitor question.
createdTime datetime Time when the question was asked.
channelId string Channel: Live Chat, Facebook Messenger, Twitter Direct Message, WeChat, WhatsApp, SMS.
topScoreIntentId guid Id of the matched intent.
topScore float The topScore is matching the highest score of intent.
conversationId guid Id of the conversation.
type string Allowed values are "noAnswer", "possibleAnswer", "notHelpful", "manual".
topScoreIntent topScoreIntent Reference to Chatbot Intent.
Endpoint
Get a single Chatbot Learning Question

GET bot/chatbotLearningQuestions/{id}

Parameters:
Name Type In Required Description
include string query no Allowed value is "chatbotIntent".
Response:
Example

Sample Request:

curl https://api15.comm100.io/v4/bot/chatbotLearningQuestions/accfe85d-1393-4331-be3d-05721eb3d326 \
-X 'GET' \
-H 'Authorization: Bearer {access_token}' \

Response:

 HTTP/1.1 200 OK

{"id":"accfe85d-1393-4331-be3d-05721eb3d326","chatbotId":"e8bf0d25-eed6-4a46-a417-318e15019609","chatId":"27093910-d5dd-4f9e-9d8d-c799563b7311","question":"I want to buy a pen.","createdTime":"2021-03-01T11:40:14.25Z","channelId":"Live Chat","topScoreIntentId":"a14b429a-dfcc-45e9-9e47-ec65eb341234","topScore":60.35,"conversationId":"00000000-0000-0000-0000-000000000000","type":"notHelpful","topScoreIntent":{"id":"54c51763-8241-40a7-bb61-95231a03bb86","name":"Thanks","chatbotIntentCategoryId":"3bfcf193-9939-4abd-a832-2625ea02e75b","chatbotIntentCategory":{"id":"ee705b05-33c0-43b6-ab4a-a138f28b6aa2","chatbotId":"e8bf0d25-eed6-4a46-a417-318e15019609","name":"fruit","order":1,"parentId":"3bfcf193-9939-4abd-a832-2625ea02e75b"}}}
Get the list of Chatbot Learning Questions

GET bot/chatbots/{id}/chatbotLearningQuestions

Parameters:
Name Type In Required Description
question string query no Question for bot training.
dateRange dateTime query no Filter by date interval.
score float query no The score of suggestion.
chatbotId guid query yes Id of the chatbot.
include string query no Allowed value is "chatbotIntent".
Response:

An array of   Chatbot Learning Question

Example

Sample Request:

curl https://api15.comm100.io/v4/bot/chatbots/accfe85d-1393-4331-be3d-05721eb3d326/chatbotLearningQuestions \
-X 'GET' \
-H 'Authorization: Bearer {access_token}' \

Response:

 HTTP/1.1 200 OK

{"chatbotLearningQuestions":[{"id":"accfe85d-1393-4331-be3d-05721eb3d326","chatbotId":"e8bf0d25-eed6-4a46-a417-318e15019609","chatId":"27093910-d5dd-4f9e-9d8d-c799563b7311","question":"I want to buy a pen.","createdTime":"2021-03-01T11:40:14.25Z","channelId":"Live Chat","topScoreIntentId":"a14b429a-dfcc-45e9-9e47-ec65eb341234","topScore":60.35,"conversationId":"00000000-0000-0000-0000-000000000000","type":"notHelpful","topScoreIntent":{"id":"54c51763-8241-40a7-bb61-95231a03bb86","name":"Thanks","chatbotIntentCategoryId":"3bfcf193-9939-4abd-a832-2625ea02e75b","chatbotIntentCategory":{"id":"ee705b05-33c0-43b6-ab4a-a138f28b6aa2","chatbotId":"e8bf0d25-eed6-4a46-a417-318e15019609","name":"fruit","order":1,"parentId":"3bfcf193-9939-4abd-a832-2625ea02e75b"}}}],"nextPage":null,"previousPage":null,"total":1}
Create a new Chatbot Learning Question

POST bot/chatbotLearningQuestions

Parameters:
Name Type In Required Description
chatbotId guid body yes Id of the chatbot.
chatId guid body no Id of the chat.
question string body no Visitor question.
createdTime datetime body yes Time when the question was asked.
channelId string body no Channel: Live Chat, Facebook Messenger, Twitter Direct Message, WeChat, WhatsApp, SMS.
topScoreIntentId guid body no Id of the matched intent.
topScore float body yes The topScore is matching the highest score of intent.
conversationId guid body no Id of the conversation.
type string body yes Allowed values are "noAnswer", "possibleAnswer", "notHelpful", "manual".
Response:
Example

Sample Request:

curl https://api15.comm100.io/v4/bot/chatbotLearningQuestions \
-X 'POST' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-D '{"chatbotId":"e8bf0d25-eed6-4a46-a417-318e15019609","chatId":"27093910-d5dd-4f9e-9d8d-c799563b7311","question":"I want to buy a pen.","createdTime":"2021-03-01T11:40:14.25Z","channelId":"Live Chat","topScoreIntentId":"a14b429a-dfcc-45e9-9e47-ec65eb341234","topScore":60.35,"conversationId":"00000000-0000-0000-0000-000000000000","type":"notHelpful"}'

Response:

 HTTP/1.1 201 Created

{"id":"accfe85d-1393-4331-be3d-05721eb3d326","chatbotId":"e8bf0d25-eed6-4a46-a417-318e15019609","chatId":"27093910-d5dd-4f9e-9d8d-c799563b7311","question":"I want to buy a pen.","createdTime":"2021-03-01T11:40:14.25Z","channelId":"Live Chat","topScoreIntentId":"a14b429a-dfcc-45e9-9e47-ec65eb341234","topScore":60.35,"conversationId":"00000000-0000-0000-0000-000000000000","type":"notHelpful","topScoreIntent":{"id":"54c51763-8241-40a7-bb61-95231a03bb86","name":"Thanks","chatbotIntentCategoryId":"3bfcf193-9939-4abd-a832-2625ea02e75b","chatbotIntentCategory":{"id":"ee705b05-33c0-43b6-ab4a-a138f28b6aa2","chatbotId":"e8bf0d25-eed6-4a46-a417-318e15019609","name":"fruit","order":1,"parentId":"3bfcf193-9939-4abd-a832-2625ea02e75b"}}}
Remove the Chatbot Learning Question

DELETE bot/chatbotLearningQuestions/{id}

Parameters:
No Parameters
Response:

No Content

Example

Sample Request:

curl https://api15.comm100.io/v4/bot/chatbotLearningQuestions/accfe85d-1393-4331-be3d-05721eb3d326 \
-X 'DELETE' \
-H 'Authorization: Bearer {access_token}' \

Response:

 HTTP/1.1 204 No Content