Chatbot Canned Quick Reply
  • 11 Jul 2022
  • 3 Minutes to read
  • Dark
    Light

Chatbot Canned Quick Reply

  • Dark
    Light

Article summary

Chatbot Canned Quick Reply

Chatbot Canned Quick Reply JSON Format

Chatbot Canned Quick Reply is represented as simple flat JSON objects with the following keys:

NameTypeDescription
idguidId of the quick reply.
chatbotIdguidId of the chatbot.
namestringName of the quick reply.
chatbotCannedQuickReplyItemschatbotCannedQuickReplyItems[]Reference to Chatbot Canned Quick Reply Item.

Chatbot Canned Quick Reply Item JSON Format:

NameTypeDescription
idguidId of the chatbot canned quick reply item.
orderintegerMust be greater than or equal to 0, the order of the quick reply item, ascending order.
intentIdguidId of the intent.
quickReplyIdguidId of the quick reply.
textstringOnly available when type is triggerAnIntent.
typeenumAllowed values are triggerAnIntent, contactAnAgent.
optionTextWhenAgentOnlinestringOption text when agent online.
optionTextWhenAgentOfflinestringOption text when agent offline.
intentintentReference to Chatbot Intent.

Get a single Chatbot Canned Quick Reply

GET bot/chatbotCannedQuickReplies/{id}

  • Parameters:

NameTypeinRequiredDescription
includestringquerynoAllowed values are "chatbotCannedQuickReplyItem", "chatbotIntent".
  • Response:

Chatbot Canned Quick Reply

  • Example

Sample Request:

curl https://api11.comm100.io/v4/bot/chatbotCannedQuickReplies/1064a6e1-4485-4ef5-a7d3-000fc57cd598 \ 
    -X 'GET' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

{
  "id": "1064a6e1-4485-4ef5-a7d3-000fc57cd598",
  "chatbotId": "9626da62-e87b-4bfb-9925-2b72b04481f2",
  "name": "default canned quick reply",
  "chatbotCannedQuickReplyItems": [
      {
          "id": "56b97b82-beb4-4d72-b996-2e0d439e5b60",
          "order": 0,
          "intentId": "1a75ce57-d88e-4398-98a2-e39f0e18cc6d",
          "quickReplyId": "1233f6ef-bf4f-4e02-babb-792e603b7530",
          "text": "Link to an intent",
          "type": "triggerAnIntent",
          "optionTextWhenAgentOnline": "",
          "optionTextWhenAgentOffline": "",
          "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"
              }
          }
      }
  ]
} 

Get the list of Chatbot Canned Quick Replies

GET bot/chatbots/{id}/chatbotCannedQuickReplies

  • Parameters:

NameTypeinRequiredDescription
keywordsstringquerynoSearch canned quick reply name by the keyword.
chatbotIdguidqueryyesId of the chatbot.
sortBystringqueryyesAllowed values are "name", "id" and "chatbot".
includestringquerynoAllowed values are "chatbotCannedQuickReplyItem", "chatbotIntent".
  • Response:

An array of Chatbot Canned Quick Reply

  • Example

Sample Request:

curl https://api11.comm100.io/v4/bot/chatbots/1064a6e1-4485-4ef5-a7d3-000fc57cd598/chatbotCannedQuickReplies \ 
    -X 'GET' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

{
  "chatbotCannedQuickReplies": [
      {
          "id": "1064a6e1-4485-4ef5-a7d3-000fc57cd598",
          "chatbotId": "9626da62-e87b-4bfb-9925-2b72b04481f2",
          "name": "default canned quick reply",
          "chatbotCannedQuickReplyItems": [
              {
                  "id": "56b97b82-beb4-4d72-b996-2e0d439e5b60",
                  "order": 0,
                  "intentId": "1a75ce57-d88e-4398-98a2-e39f0e18cc6d",
                  "quickReplyId": "1233f6ef-bf4f-4e02-babb-792e603b7530",
                  "text": "Link to an intent",
                  "type": "triggerAnIntent",
                  "optionTextWhenAgentOnline": "",
                  "optionTextWhenAgentOffline": "",
                  "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"
                      }
                  }
              }
          ]
      }
  ],
  "nextPage": null,
  "previousPage": null,
  "total": 1
} 

Create a new Chatbot Canned Quick Reply

POST bot/chatbotCannedQuickReplies

  • Parameters:

NameTypeinRequiredDescription
chatbotIdguidbodyyesId of the chatbot.
namestringbodyyesName of the quick reply.
chatbotCannedQuickReplyItemschatbotCannedQuickReplyItems[]bodynoReference to Chatbot Canned Quick Reply Item.
  • Response:

Chatbot Canned Quick Reply

  • Example

Sample Request:

curl https://api11.comm100.io/v4/bot/chatbotCannedQuickReplies \ 
    -X 'POST' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \ 
    -D '{"chatbotId":"9626da62-e87b-4bfb-9925-2b72b04481f2","name":"default canned quick reply","chatbotCannedQuickReplyItems":[{"order":0,"intentId":"1a75ce57-d88e-4398-98a2-e39f0e18cc6d","text":"Link to an intent","type":"triggerAnIntent","optionTextWhenAgentOnline":"","optionTextWhenAgentOffline":""}]}' 

Response:

HTTP/1.1 201 Created

{
  "id": "1064a6e1-4485-4ef5-a7d3-000fc57cd598",
  "chatbotId": "9626da62-e87b-4bfb-9925-2b72b04481f2",
  "name": "default canned quick reply",
  "chatbotCannedQuickReplyItems": [
      {
          "id": "56b97b82-beb4-4d72-b996-2e0d439e5b60",
          "order": 0,
          "intentId": "1a75ce57-d88e-4398-98a2-e39f0e18cc6d",
          "quickReplyId": "1233f6ef-bf4f-4e02-babb-792e603b7530",
          "text": "Link to an intent",
          "type": "triggerAnIntent",
          "optionTextWhenAgentOnline": "",
          "optionTextWhenAgentOffline": "",
          "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"
              }
          }
      }
  ]
} 

Update the Chatbot Canned Quick Reply

PUT bot/chatbotCannedQuickReplies/{id}

  • Parameters:

NameTypeinRequiredDescription
chatbotIdguidbodyyesId of the chatbot.
namestringbodyyesName of the quick reply.
chatbotCannedQuickReplyItemschatbotCannedQuickReplyItems[]bodynoReference to Chatbot Canned Quick Reply Item.
  • Response:

Chatbot Canned Quick Reply

  • Example

Sample Request:

curl https://api11.comm100.io/v4/bot/chatbotCannedQuickReplies/1064a6e1-4485-4ef5-a7d3-000fc57cd598 \ 
    -X 'PUT' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \ 
    -D '{"chatbotId":"9626da62-e87b-4bfb-9925-2b72b04481f2","name":"default canned quick reply","chatbotCannedQuickReplyItems":[{"order":0,"intentId":"1a75ce57-d88e-4398-98a2-e39f0e18cc6d","text":"Link to an intent","type":"triggerAnIntent","optionTextWhenAgentOnline":"","optionTextWhenAgentOffline":""}]}' 

Response:

HTTP/1.1 200 OK

{
  "id": "1064a6e1-4485-4ef5-a7d3-000fc57cd598",
  "chatbotId": "9626da62-e87b-4bfb-9925-2b72b04481f2",
  "name": "default canned quick reply",
  "chatbotCannedQuickReplyItems": [
      {
          "id": "56b97b82-beb4-4d72-b996-2e0d439e5b60",
          "order": 0,
          "intentId": "1a75ce57-d88e-4398-98a2-e39f0e18cc6d",
          "quickReplyId": "1233f6ef-bf4f-4e02-babb-792e603b7530",
          "text": "Link to an intent",
          "type": "triggerAnIntent",
          "optionTextWhenAgentOnline": "",
          "optionTextWhenAgentOffline": "",
          "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"
              }
          }
      }
  ]
} 

Remove the Chatbot Canned Quick Reply

DELETE bot/chatbotCannedQuickReplies/{id}

  • Parameters:

No Parameters

  • Response:

No Content

  • Example

Sample Request:

curl https://api11.comm100.io/v4/bot/chatbotCannedQuickReplies/1064a6e1-4485-4ef5-a7d3-000fc57cd598 \ 
    -X 'DELETE' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 204 No Content


Was this article helpful?

What's Next