Chatbot Learning Question
  • 11 Jul 2022
  • 3 Minutes to read
  • Dark
    Light

Chatbot Learning Question

  • Dark
    Light

Article summary

Chatbot Learning Question

Chatbot Learning Question JSON Format

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

NameTypeDescription
idguidId of the learning question.
chatbotIdguidId of the chatbot.
chatIdguidId of the chat.
questionstringVisitor question.
createdTimedatetimeTime when the question was asked.
channelIdstringChannel: Live Chat, Facebook Messenger, Twitter Direct Message, WeChat, WhatsApp, SMS.
topScoreIntentIdguidId of the matched intent.
topScorefloatThe topScore is matching the highest score of intent.
conversationIdguidId of the conversation.
typeenumAllowed values are noAnswer, possibleAnswer, notHelpful, manual.
topScoreIntenttopScoreIntentReference to Chatbot Intent.

Get a single Chatbot Learning Question

GET bot/chatbotLearningQuestions/{id}

  • Parameters:

NameTypeinRequiredDescription
includestringquerynoAllowed value is "chatbotIntent".
  • Response:

Chatbot Learning Question

  • Example

Sample Request:

curl https://api11.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:

NameTypeinRequiredDescription
questionstringquerynoQuestion for bot training.
dateRangedateTimequerynoFilter by date interval.
scorefloatquerynoThe score of suggestion.
chatbotIdguidqueryyesId of the chatbot.
includestringquerynoAllowed value is "chatbotIntent".
  • Response:

An array of Chatbot Learning Question

  • Example

Sample Request:

curl https://api11.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:

NameTypeinRequiredDescription
chatbotIdguidbodyyesId of the chatbot.
chatIdguidbodynoId of the chat.
questionstringbodynoVisitor question.
createdTimedatetimebodyyesTime when the question was asked.
channelIdstringbodynoChannel: Live Chat, Facebook Messenger, Twitter Direct Message, WeChat, WhatsApp, SMS.
topScoreIntentIdguidbodynoId of the matched intent.
topScorefloatbodyyesThe topScore is matching the highest score of intent.
conversationIdguidbodynoId of the conversation.
typeenumbodyyesAllowed values are noAnswer, possibleAnswer, notHelpful, manual.
  • Response:

Chatbot Learning Question

  • Example

Sample Request:

curl https://api11.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://api11.comm100.io/v4/bot/chatbotLearningQuestions/accfe85d-1393-4331-be3d-05721eb3d326 \ 
    -X 'DELETE' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 204 No Content


Was this article helpful?