Agent Assist Learning Question
  • 11 Jul 2022
  • 8 Minutes to read
  • Dark
    Light

Agent Assist Learning Question

  • Dark
    Light

Article summary

Agent Assist Learning Question

Agent Assist Learning Question JSON Format

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

NameTypeDescription
idguidId of the learning question.
chatIdguidId of the chat.
questionstringQuestions for bot training.
agentResponsestringAgent response for bot training.
suggestionTypeenumAllowed values are none, publicCannedMessage, KBArticle, chatbotIntent.
scorefloatScore of the suggestion.
createdTimedatetimeTime when the learning question was created.
publicCannedMessageIdguidId of the matched public canned message.
articleIdguidId of the matched KB article.
intentIdguidId of the matched intent in chatbot.
knowledgeBaseIdguidId of the matched KB.
chatbotIdguidId of the matched chatbot.
intentintentReference to Chatbot Intent.
articlearticleReference to Article.
publicCannedMessagepublicCannedMessageReference to Public Canned Message.

Get the list of Agent Assist Learning Questions

GET bot/agentAssistLearningQuestions

  • Parameters:

NameTypeinRequiredDescription
questionstringquerynoQuestion for bot training.
dateRangedateTimequerynoFilter by date interval.
scorefloatquerynoThe score of suggestion.
includestringquerynoAllowed values are "chatbotIntent", "article", "publicCannedMessage".
  • Response:

An array of Agent Assist Learning Question

  • Example

Sample Request:

curl https://api11.comm100.io/v4/bot/agentAssistLearningQuestions \ 
    -X 'GET' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

{
  "agentAssistLearningQuestions": [
      {
          "id": "7dc75f7b-a82e-4048-9256-bb775a49bf35",
          "chatId": "8c9b6c0c-f72e-4b56-b524-64f37be3d604",
          "question": "I want to buy a clothes.",
          "agentResponse": "What clothes you want to buy?",
          "suggestionType": "chatbotIntent",
          "score": 60.0,
          "createdTime": "2021-04-09T09:30:26.553Z",
          "publicCannedMessageId": "00000000-0000-0000-0000-000000000000",
          "articleId": "00000000-0000-0000-0000-000000000000",
          "intentId": "00000000-0000-0000-0000-000000000000",
          "knowledgeBaseId": "00000000-0000-0000-0000-000000000000",
          "chatbotId": "c2b618b1-9167-44c7-a399-a4974558fee8",
          "intent": {
              "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"
              }
          },
          "article": {
              "id": "4fc10466-3900-4d0d-89d8-635afb8a2c78",
              "title": "Sample Article Title",
              "body": "                    <p>\n?                        Setting up your knowledge base starts with creating articles. Building a repository of articles is simple by using our WYSIWYG editor. You can also organize your knowledge base articles by category and tag, so that they are easy to find and intuitive to use. Follow the steps below to start.\n?                    </p>\n?                    <h4>Step by Step Instructions</h4>\n?                    <ol>\n?                        <li>\n?                            <a target="\&quot;_blank\&quot;">Log into</a> your Comm100 account.\n?                        </li>\n?                        <li>\n?                            Click <strong>Articles</strong> from the left menu list under the Knowledge Base product.\n?                            <p>\n?                                <img src="\&quot;/kb/resources/images/kb-articles.png\&quot;" alt="\&quot;knowledge">\n?                            </p>\n?                        </li>\n?                        <li>\n?                            Click the <strong>New Article</strong> button on the page.\n?                            <p>\n?                                <img src="\&quot;/kb/resources/images/new-article.png\&quot;" alt="\&quot;New">\n?                            </p>\n?                        </li>\n?                        <li>\n?                            Input the article title and mark it as <strong>Featured</strong> when you see appropriate by clicking the <strong>Star</strong> icon in the <strong>Title</strong> box. (Featured articles appear above the non-featured ones on your knowledge base pages.)\n?                            <p>\n?                                <img src="\&quot;/kb/resources/images/article-content.png\&quot;" alt="\&quot;Article">\n?                            </p>\n?                        </li>\n?                        <li>\n?                            Draft your article content in our WYSIWYG HTML editor. If you have drafted the source code of the article elsewhere, you can click the <strong>Source Code</strong> icon at the end of the tool bar to simply paste the code in the editor.\n?                        </li>\n?                        <li>\n?                            Select a <strong>Category</strong> that the article should fall under, and assign <strong>Tags</strong> for the article.\n?                            <p>\n?                                <img src="\&quot;/kb/resources/images/categorize-tag-publish.png\&quot;" alt="\&quot;categorize">\n?                            </p>\n?                        </li>\n?                        <li>\n?                            Click <strong>Preview</strong> to see how it looks like to your customers on your knowledge base.\n?                        </li>\n?                        <li>\n?                            Once the article is ready, change the article status to <strong>Published</strong>, and then hit <strong>Save</strong>.\n?                            <br>\n?                            <strong>Note:</strong> The default status of every article is <strong>Draft</strong>. To make an article visible on your knowledge base, you need to change its status to <strong>Published</strong>.\n?                        </li>\n?                    </ol>\n?                    <p>Now that the article has been published, your customers can view, and leave helpful or not helpful ratings if you allow them to do so. </p>",
              "customUrl": "can-i-customize-the-look-of-my-knowledge-base",
              "categoryId": "8a21934a-7def-4064-a211-3cc5295282f9",
              "isFeatured": false,
              "status": "published",
              "views": 0,
              "createdById": "21b5d834-b98b-48ba-ae45-0d1316cb382f",
              "createdTime": "2021-04-09T10:38:47.237Z",
              "modifiedById": "21b5d834-b98b-48ba-ae45-0d1316cb382f",
              "modifiedTime": "2021-04-09T10:38:47.237Z",
              "similarQuestions": [
                  "null"
              ],
              "tagIds": [
                  "e824f542-0187-4aac-a329-9263d6090fe9"
              ],
              "helpful": 5,
              "notHelpful": 1
          },
          "publicCannedMessage": {
              "id": "7ea02303-959b-eb11-8103-00155d081d0b",
              "categoryId": "79a02303-959b-eb11-8103-00155d081d0b",
              "name": "thanks",
              "message": "thanks",
              "htmlMessage": "<p>thanks</p>",
              "textMessage": "thanks",
              "shortcuts": "thx",
              "similarQuestions": [
                  "are you ok?"
              ]
          }
      }
  ],
  "nextPage": null,
  "previousPage": null,
  "total": 1
} 

Get a single Agent Assist Learning Question

GET bot/agentAssistLearningQuestions/{id}

  • Parameters:

NameTypeinRequiredDescription
includestringquerynoAllowed values are "chatbotIntent", "article", "publicCannedMessage".
  • Response:

Agent Assist Learning Question

  • Example

Sample Request:

curl https://api11.comm100.io/v4/bot/agentAssistLearningQuestions/7dc75f7b-a82e-4048-9256-bb775a49bf35 \ 
    -X 'GET' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

{
  "id": "7dc75f7b-a82e-4048-9256-bb775a49bf35",
  "chatId": "8c9b6c0c-f72e-4b56-b524-64f37be3d604",
  "question": "I want to buy a clothes.",
  "agentResponse": "What clothes you want to buy?",
  "suggestionType": "chatbotIntent",
  "score": 60.0,
  "createdTime": "2021-04-09T09:30:26.553Z",
  "publicCannedMessageId": "00000000-0000-0000-0000-000000000000",
  "articleId": "00000000-0000-0000-0000-000000000000",
  "intentId": "00000000-0000-0000-0000-000000000000",
  "knowledgeBaseId": "00000000-0000-0000-0000-000000000000",
  "chatbotId": "c2b618b1-9167-44c7-a399-a4974558fee8",
  "intent": {
      "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"
      }
  },
  "article": {
      "id": "4fc10466-3900-4d0d-89d8-635afb8a2c78",
      "title": "Sample Article Title",
      "body": "                    <p>\n?                        Setting up your knowledge base starts with creating articles. Building a repository of articles is simple by using our WYSIWYG editor. You can also organize your knowledge base articles by category and tag, so that they are easy to find and intuitive to use. Follow the steps below to start.\n?                    </p>\n?                    <h4>Step by Step Instructions</h4>\n?                    <ol>\n?                        <li>\n?                            <a target="\&quot;_blank\&quot;">Log into</a> your Comm100 account.\n?                        </li>\n?                        <li>\n?                            Click <strong>Articles</strong> from the left menu list under the Knowledge Base product.\n?                            <p>\n?                                <img src="\&quot;/kb/resources/images/kb-articles.png\&quot;" alt="\&quot;knowledge">\n?                            </p>\n?                        </li>\n?                        <li>\n?                            Click the <strong>New Article</strong> button on the page.\n?                            <p>\n?                                <img src="\&quot;/kb/resources/images/new-article.png\&quot;" alt="\&quot;New">\n?                            </p>\n?                        </li>\n?                        <li>\n?                            Input the article title and mark it as <strong>Featured</strong> when you see appropriate by clicking the <strong>Star</strong> icon in the <strong>Title</strong> box. (Featured articles appear above the non-featured ones on your knowledge base pages.)\n?                            <p>\n?                                <img src="\&quot;/kb/resources/images/article-content.png\&quot;" alt="\&quot;Article">\n?                            </p>\n?                        </li>\n?                        <li>\n?                            Draft your article content in our WYSIWYG HTML editor. If you have drafted the source code of the article elsewhere, you can click the <strong>Source Code</strong> icon at the end of the tool bar to simply paste the code in the editor.\n?                        </li>\n?                        <li>\n?                            Select a <strong>Category</strong> that the article should fall under, and assign <strong>Tags</strong> for the article.\n?                            <p>\n?                                <img src="\&quot;/kb/resources/images/categorize-tag-publish.png\&quot;" alt="\&quot;categorize">\n?                            </p>\n?                        </li>\n?                        <li>\n?                            Click <strong>Preview</strong> to see how it looks like to your customers on your knowledge base.\n?                        </li>\n?                        <li>\n?                            Once the article is ready, change the article status to <strong>Published</strong>, and then hit <strong>Save</strong>.\n?                            <br>\n?                            <strong>Note:</strong> The default status of every article is <strong>Draft</strong>. To make an article visible on your knowledge base, you need to change its status to <strong>Published</strong>.\n?                        </li>\n?                    </ol>\n?                    <p>Now that the article has been published, your customers can view, and leave helpful or not helpful ratings if you allow them to do so. </p>",
      "customUrl": "can-i-customize-the-look-of-my-knowledge-base",
      "categoryId": "8a21934a-7def-4064-a211-3cc5295282f9",
      "isFeatured": false,
      "status": "published",
      "views": 0,
      "createdById": "21b5d834-b98b-48ba-ae45-0d1316cb382f",
      "createdTime": "2021-04-09T10:38:47.237Z",
      "modifiedById": "21b5d834-b98b-48ba-ae45-0d1316cb382f",
      "modifiedTime": "2021-04-09T10:38:47.237Z",
      "similarQuestions": [
          "null"
      ],
      "tagIds": [
          "e824f542-0187-4aac-a329-9263d6090fe9"
      ],
      "helpful": 5,
      "notHelpful": 1
  },
  "publicCannedMessage": {
      "id": "7ea02303-959b-eb11-8103-00155d081d0b",
      "categoryId": "79a02303-959b-eb11-8103-00155d081d0b",
      "name": "thanks",
      "message": "thanks",
      "htmlMessage": "<p>thanks</p>",
      "textMessage": "thanks",
      "shortcuts": "thx",
      "similarQuestions": [
          "are you ok?"
      ]
  }
} 

Create a new Agent Assist Learning Question

POST bot/agentAssistLearningQuestions

  • Parameters:

NameTypeinRequiredDescription
chatIdguidbodynoId of the chat.
questionstringbodynoQuestions for bot training.
agentResponsestringbodynoAgent response for bot training.
suggestionTypestringbodyyesAllowed values are "none", "publicCannedMessage", "KBArticle", "chatbotIntent".
scorefloatbodyyesScore of the suggestion.
createdTimedatetimebodynoTime when the learning question was created.
publicCannedMessageIdguidbodynoId of the matched public canned message.
articleIdguidbodynoId of the matched KB article.
intentIdguidbodynoId of the matched intent in chatbot.
knowledgeBaseIdguidbodynoId of the matched KB.
chatbotIdguidbodynoId of the matched chatbot.
  • Response:

Agent Assist Learning Question

  • Example

Sample Request:

curl https://api11.comm100.io/v4/bot/agentAssistLearningQuestions \ 
    -X 'POST' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \ 
    -D '{"chatId":"8c9b6c0c-f72e-4b56-b524-64f37be3d604","question":"I want to buy a clothes.","agentResponse":"What clothes you want to buy?","suggestionType":"chatbotIntent","score":60.0,"createdTime":"2021-04-09T09:30:26.553Z","publicCannedMessageId":"00000000-0000-0000-0000-000000000000","articleId":"00000000-0000-0000-0000-000000000000","intentId":"00000000-0000-0000-0000-000000000000","knowledgeBaseId":"00000000-0000-0000-0000-000000000000","chatbotId":"c2b618b1-9167-44c7-a399-a4974558fee8"}' 

Response:

HTTP/1.1 201 Created

{
  "id": "7dc75f7b-a82e-4048-9256-bb775a49bf35",
  "chatId": "8c9b6c0c-f72e-4b56-b524-64f37be3d604",
  "question": "I want to buy a clothes.",
  "agentResponse": "What clothes you want to buy?",
  "suggestionType": "chatbotIntent",
  "score": 60.0,
  "createdTime": "2021-04-09T09:30:26.553Z",
  "publicCannedMessageId": "00000000-0000-0000-0000-000000000000",
  "articleId": "00000000-0000-0000-0000-000000000000",
  "intentId": "00000000-0000-0000-0000-000000000000",
  "knowledgeBaseId": "00000000-0000-0000-0000-000000000000",
  "chatbotId": "c2b618b1-9167-44c7-a399-a4974558fee8",
  "intent": {
      "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"
      }
  },
  "article": {
      "id": "4fc10466-3900-4d0d-89d8-635afb8a2c78",
      "title": "Sample Article Title",
      "body": "                    <p>\n?                        Setting up your knowledge base starts with creating articles. Building a repository of articles is simple by using our WYSIWYG editor. You can also organize your knowledge base articles by category and tag, so that they are easy to find and intuitive to use. Follow the steps below to start.\n?                    </p>\n?                    <h4>Step by Step Instructions</h4>\n?                    <ol>\n?                        <li>\n?                            <a target="\&quot;_blank\&quot;">Log into</a> your Comm100 account.\n?                        </li>\n?                        <li>\n?                            Click <strong>Articles</strong> from the left menu list under the Knowledge Base product.\n?                            <p>\n?                                <img src="\&quot;/kb/resources/images/kb-articles.png\&quot;" alt="\&quot;knowledge">\n?                            </p>\n?                        </li>\n?                        <li>\n?                            Click the <strong>New Article</strong> button on the page.\n?                            <p>\n?                                <img src="\&quot;/kb/resources/images/new-article.png\&quot;" alt="\&quot;New">\n?                            </p>\n?                        </li>\n?                        <li>\n?                            Input the article title and mark it as <strong>Featured</strong> when you see appropriate by clicking the <strong>Star</strong> icon in the <strong>Title</strong> box. (Featured articles appear above the non-featured ones on your knowledge base pages.)\n?                            <p>\n?                                <img src="\&quot;/kb/resources/images/article-content.png\&quot;" alt="\&quot;Article">\n?                            </p>\n?                        </li>\n?                        <li>\n?                            Draft your article content in our WYSIWYG HTML editor. If you have drafted the source code of the article elsewhere, you can click the <strong>Source Code</strong> icon at the end of the tool bar to simply paste the code in the editor.\n?                        </li>\n?                        <li>\n?                            Select a <strong>Category</strong> that the article should fall under, and assign <strong>Tags</strong> for the article.\n?                            <p>\n?                                <img src="\&quot;/kb/resources/images/categorize-tag-publish.png\&quot;" alt="\&quot;categorize">\n?                            </p>\n?                        </li>\n?                        <li>\n?                            Click <strong>Preview</strong> to see how it looks like to your customers on your knowledge base.\n?                        </li>\n?                        <li>\n?                            Once the article is ready, change the article status to <strong>Published</strong>, and then hit <strong>Save</strong>.\n?                            <br>\n?                            <strong>Note:</strong> The default status of every article is <strong>Draft</strong>. To make an article visible on your knowledge base, you need to change its status to <strong>Published</strong>.\n?                        </li>\n?                    </ol>\n?                    <p>Now that the article has been published, your customers can view, and leave helpful or not helpful ratings if you allow them to do so. </p>",
      "customUrl": "can-i-customize-the-look-of-my-knowledge-base",
      "categoryId": "8a21934a-7def-4064-a211-3cc5295282f9",
      "isFeatured": false,
      "status": "published",
      "views": 0,
      "createdById": "21b5d834-b98b-48ba-ae45-0d1316cb382f",
      "createdTime": "2021-04-09T10:38:47.237Z",
      "modifiedById": "21b5d834-b98b-48ba-ae45-0d1316cb382f",
      "modifiedTime": "2021-04-09T10:38:47.237Z",
      "similarQuestions": [
          "null"
      ],
      "tagIds": [
          "e824f542-0187-4aac-a329-9263d6090fe9"
      ],
      "helpful": 5,
      "notHelpful": 1
  },
  "publicCannedMessage": {
      "id": "7ea02303-959b-eb11-8103-00155d081d0b",
      "categoryId": "79a02303-959b-eb11-8103-00155d081d0b",
      "name": "thanks",
      "message": "thanks",
      "htmlMessage": "<p>thanks</p>",
      "textMessage": "thanks",
      "shortcuts": "thx",
      "similarQuestions": [
          "are you ok?"
      ]
  }
} 

Remove the Agent Assist Learning Question

DELETE bot/agentAssistLearningQuestions/{id}

  • Parameters:

No Parameters

  • Response:

No Content

  • Example

Sample Request:

curl https://api11.comm100.io/v4/bot/agentAssistLearningQuestions/7dc75f7b-a82e-4048-9256-bb775a49bf35 \ 
    -X 'DELETE' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 204 No Content


Was this article helpful?