Chatbot
- 07 Jul 2022
- 11 Minutes to read
- Print
- DarkLight
Chatbot
- Updated on 07 Jul 2022
- 11 Minutes to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
Chatbot
Chatbot
- Chatbot ManageGET bot/chatbots
- Get the list of ChatbotGET bot/chatbots/{id}
- Get a single ChatbotPOST bot/chatbots
- Create a new ChatbotPUT bot/chatbots/{id}
- Update the ChatbotDELETE bot/chatbots/{id}
- Delete the Chatbot
Chatbot JSON Format
Chatbot is represented as simple flat JSON objects with the following keys:
Name | Type | Description |
---|---|---|
id | guid | Id of the chatbot. |
languageId | string | Language of the chatbot. |
name | string | Name of the chatbot. |
thirdPartyWebhookUrl | string | URL of the third party webhook. Webhook object, Only available when engine type is thirdParty. Default: https://. |
trainingStatus | enum | Allowed values are succeeded , processing , failed . |
importingStatus | enum | Allowed values are none , processing , succeeded , failed . |
highConfidenceScore | integer | When visitor sends a message, bot will match it with all your intents. If the matching score (ranges from 0 to 100) is higher than the high confidence answer score, bot will reply with the intent that has the highest score. Default : 40. |
noAnswerScore | integer | When visitor sends a message, bot will match it with all your intents. If the top matching score (ranges from 0 to 100) is between high confidence answer score and no answer score, Bot will send the answer of the top score intent as a possible answer to visitors. If the top matching score is lower than the no answer score, bot will send the message configured for when visitor question is not recognized. Default:20. |
lastUpdatedTime | timestamp | This attribute stores the last updated time for a chatbot. Once the chatbot or any sub attribute of the chatbot is edited, this value will be changed to the current time. |
outputAudioEncoding | string | Allowed values are "linear16", "oggOpus". |
voiceGender | string | Allowed values are "male", "female". |
ifCustomizeAvatar | bool | Whether avatar of bot is customize or not. |
customizeAvatar | image | URL of the customize avatar. |
systemAvatarId | guid | Id of the system avatar. |
veryNegativeScore | integer | Chatbot Sentiment Analysis analyzes the messages you visitors send during the conversation with you chatbot. If the score (ranges from -10 to 10) is lower than the very negative score, Chatbot Sentiment Analysis will marked the sentiment of the message is very negative. Default: -8. |
negativeScore | integer | Chatbot Sentiment Analysis analyzes the messages you visitors send during the conversation with you chatbot. If the score (ranges from -10 to 10) is betweent the very negative score and the negative score, Chatbot Sentiment Analysis will marked the sentiment of the message is negative. Default: -3. |
neutralScore | integer | Chatbot Sentiment Analysis analyzes the messages you visitors send during the conversation with you chatbot. If the score (ranges from -10 to 10) is betweent the negative score and the neutral score, Chatbot Sentiment Analysis will marked the sentiment of the message is neutral. Default: 2. |
positiveScore | integer | Chatbot Sentiment Analysis analyzes the messages you visitors send during the conversation with you chatbot. If the score (ranges from -10 to 10) is betweent the neutral score and the positive score, Chatbot Sentiment Analysis will marked the sentiment of the message is positive. If the score is higher than the positive score, Chatbot Sentiment Analysis will marked the sentiment of the message is very positive. Default: 7. |
ifSentiment | bool | Whether Chatbot Sentiment Analysis is used or not. |
ifAutoTranslation | bool | |
engineId | guid | Id of the chatbot engine. |
description | string | Description of the chatbot. |
thirdPartyBotId | guid | |
thirdPartyBotVersion | integer | |
quickReplyStyles | enum | Allowed values are buttons , options . |
avatar | string | URL of the chatbot avatar. |
engine | Chatbot Engine | Reference to . |
channelIds | array | The list of channel that current chatbot support. |
Chatbot Third Party WebHook Header JSON Format:
Name | Type | Description |
---|---|---|
chatbotId | guid | Id of the chatbot. |
id | guid | Id of the third-party bot webhook header. |
key | string | Key of the third-party bot webhook header. |
value | string | Value of the third-party bot webhook header. |
Chatbot Form Button Text JSON Format:
Name | Type | Description |
---|---|---|
formSubmitButtonText | string | Submit button text. |
formCancelButtonText | string | Cancel button text. |
formConfirmButtonText | string | Confirm button text. |
chatbotId | guid | Id of the chatbot. |
Get the list of Chatbot
GET bot/chatbots
Parameters:
Name | Type | in | Required | Description |
---|---|---|---|---|
channelId | string | query | no | Channel: Live Chat, Facebook Messenger, Twitter Direct Message, WeChat, WhatsApp, SMS. |
include | string | query | no | Allowed value is "chatbotThirdPartyWebhookHeader". |
Response:
An array of Chatbot
Example
Sample Request:
curl https://api11.comm100.io/v4/bot/chatbots \
-X 'GET' \
-H 'Authorization: Bearer {access_token}' \
Response:
HTTP/1.1 200 OK
{
"chatbots": [
{
"id": "e8bf0d25-eed6-4a46-a417-318e15019609",
"languageId": "en",
"name": "Testchatbot",
"thirdPartyWebhookUrl": "https://",
"trainingStatus": "0",
"importingStatus": "0",
"highConfidenceScore": 40,
"noAnswerScore": 20,
"lastUpdatedTime": "2021-04-07T05:59:17.887Z",
"outputAudioEncoding": "linear16",
"voiceGender": "male",
"ifCustomizeAvatar": false,
"customizeAvatar": "",
"systemAvatarId": "00000000-0000-0000-0000-000000000001",
"veryNegativeScore": -8,
"negativeScore": -3,
"neutralScore": 2,
"positiveScore": 7,
"ifSentiment": false,
"ifAutoTranslation": true,
"engineId": "266b567c-c716-43c4-84e1-5723f5badfaf",
"description": "",
"thirdPartyBotId": "",
"thirdPartyBotVersion": 1,
"quickReplyStyles": "",
"avatar": "https://api11.comm100.io/v4/Bot/chatbots/e8bf0d25-eed6-4a46-a417-318e15019609/avatar",
"engine": {
"id": "bbec7c36-9c72-4789-8e07-8951c22eb945",
"name": ""
},
"channelIds": [
"Live Chat"
]
}
],
"nextPage": null,
"previousPage": null,
"total": 1
}
Get a single Chatbot
GET bot/chatbots/{id}
Parameters:
Name | Type | in | Required | Description |
---|---|---|---|---|
include | string | query | no | Allowed value is "chatbotThirdPartyWebhookHeader". |
Response:
Example
Sample Request:
curl https://api11.comm100.io/v4/bot/chatbots/e8bf0d25-eed6-4a46-a417-318e15019609 \
-X 'GET' \
-H 'Authorization: Bearer {access_token}' \
Response:
HTTP/1.1 200 OK
{
"id": "e8bf0d25-eed6-4a46-a417-318e15019609",
"languageId": "en",
"name": "Testchatbot",
"thirdPartyWebhookUrl": "https://",
"trainingStatus": "0",
"importingStatus": "0",
"highConfidenceScore": 40,
"noAnswerScore": 20,
"lastUpdatedTime": "2021-04-07T05:59:17.887Z",
"outputAudioEncoding": "linear16",
"voiceGender": "male",
"ifCustomizeAvatar": false,
"customizeAvatar": "",
"systemAvatarId": "00000000-0000-0000-0000-000000000001",
"veryNegativeScore": -8,
"negativeScore": -3,
"neutralScore": 2,
"positiveScore": 7,
"ifSentiment": false,
"ifAutoTranslation": true,
"engineId": "266b567c-c716-43c4-84e1-5723f5badfaf",
"description": "",
"thirdPartyBotId": "",
"thirdPartyBotVersion": 1,
"quickReplyStyles": "",
"avatar": "https://api11.comm100.io/v4/Bot/chatbots/e8bf0d25-eed6-4a46-a417-318e15019609/avatar",
"engine": {
"id": "bbec7c36-9c72-4789-8e07-8951c22eb945",
"name": ""
},
"channelIds": [
"Live Chat"
]
}
Create a new Chatbot
POST bot/chatbots
Parameters:
Name | Type | in | Required | Description |
---|---|---|---|---|
languageId | string | body | yes | Language of the chatbot. |
name | string | body | yes | Name of the chatbot. |
thirdPartyWebhookUrl | string | body | yes | URL of the third party webhook. Webhook object, Only available when engine type is thirdParty. Default: https://. |
trainingStatus | enum | body | no | Allowed values are succeeded , processing , failed . |
importingStatus | enum | body | no | Allowed values are none , processing , succeeded , "failed". |
highConfidenceScore | integer | body | no | When visitor sends a message, bot will match it with all your intents. If the matching score (ranges from 0 to 100) is higher than the high confidence answer score, bot will reply with the intent that has the highest score. Default : 40. |
noAnswerScore | integer | body | no | When visitor sends a message, bot will match it with all your intents. If the top matching score (ranges from 0 to 100) is between high confidence answer score and no answer score, Bot will send the answer of the top score intent as a possible answer to visitors. If the top matching score is lower than the no answer score, bot will send the message configured for when visitor question is not recognized. Default:20. |
outputAudioEncoding | string | body | yes | Allowed values are "linear16", "oggOpus". |
voiceGender | string | body | yes | Allowed values are "male", "female". |
ifCustomizeAvatar | bool | body | no | Whether avatar of bot is customize or not. |
customizeAvatar | image | body | no | URL of the customize avatar. |
systemAvatarId | guid | body | no | Id of the system avatar. |
veryNegativeScore | integer | body | no | Chatbot Sentiment Analysis analyzes the messages you visitors send during the conversation with you chatbot. If the score (ranges from -10 to 10) is lower than the very negative score, Chatbot Sentiment Analysis will marked the sentiment of the message is very negative. Default: -8. |
negativeScore | integer | body | no | Chatbot Sentiment Analysis analyzes the messages you visitors send during the conversation with you chatbot. If the score (ranges from -10 to 10) is betweent the very negative score and the negative score, Chatbot Sentiment Analysis will marked the sentiment of the message is negative. Default: -3. |
neutralScore | integer | body | no | Chatbot Sentiment Analysis analyzes the messages you visitors send during the conversation with you chatbot. If the score (ranges from -10 to 10) is betweent the negative score and the neutral score, Chatbot Sentiment Analysis will marked the sentiment of the message is neutral. Default: 2. |
positiveScore | integer | body | no | Chatbot Sentiment Analysis analyzes the messages you visitors send during the conversation with you chatbot. If the score (ranges from -10 to 10) is betweent the neutral score and the positive score, Chatbot Sentiment Analysis will marked the sentiment of the message is positive. If the score is higher than the positive score, Chatbot Sentiment Analysis will marked the sentiment of the message is very positive. Default: 7. |
ifSentiment | bool | body | no | Whether Chatbot Sentiment Analysis is used or not. |
ifAutoTranslation | bool | body | no | |
description | string | body | no | Description of the chatbot. |
thirdPartyBotId | guid | body | no | When Chatbot Engine is IBM Watson , thirdPartyBotId is required. |
thirdPartyBotVersion | integer | body | no | |
quickReplyStyles | enum | body | no | Allowed values are buttons , options . |
avatar | string | body | no | URL of the chatbot avatar. |
chatbotThirdPartyWebhookHeaders | chatbotThirdPartyWebhookHeaders[] | body | no | Reference to Chatbot Third Party WebHook Header. |
chatbotFormButtonText | chatbotFormButtonText | body | no | Reference to Chatbot Form Button Text. |
channelIds | array | body | no | The list of channel that current chatbot support. |
Response:
Example
Sample Request:
curl https://api11.comm100.io/v4/bot/chatbots \
-X 'POST' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-D '{"languageId":"en","name":"Testchatbot","thirdPartyWebhookUrl":"https://","trainingStatus":"0","importingStatus":"0","highConfidenceScore":40,"noAnswerScore":20,"outputAudioEncoding":"linear16","voiceGender":"male","ifCustomizeAvatar":false,"customizeAvatar":"","systemAvatarId":"00000000-0000-0000-0000-000000000001","veryNegativeScore":-8,"negativeScore":-3,"neutralScore":2,"positiveScore":7,"ifSentiment":false,"ifAutoTranslation":true,"description":"","thirdPartyBotId":"","thirdPartyBotVersion":1,"usedActionsForTesting":1,"engineId":"266b567c-c716-43c4-84e1-5723f5badfaf","chatbotThirdPartyWebhookHeaders":[{"key":"Content-Type","value":"application/json"}],"chatbotFormButtonText":{"formSubmitButtonText":"Submit","formCancelButtonText":"Cancel","formConfirmButtonText":"Confirm"}}'
Response:
HTTP/1.1 201 Created
{
"id": "e8bf0d25-eed6-4a46-a417-318e15019609",
"languageId": "en",
"name": "Testchatbot",
"thirdPartyWebhookUrl": "https://",
"trainingStatus": "0",
"importingStatus": "0",
"highConfidenceScore": 40,
"noAnswerScore": 20,
"lastUpdatedTime": "2021-04-07T05:59:17.887Z",
"outputAudioEncoding": "linear16",
"voiceGender": "male",
"ifCustomizeAvatar": false,
"customizeAvatar": "",
"systemAvatarId": "00000000-0000-0000-0000-000000000001",
"veryNegativeScore": -8,
"negativeScore": -3,
"neutralScore": 2,
"positiveScore": 7,
"ifSentiment": false,
"ifAutoTranslation": true,
"engineId": "266b567c-c716-43c4-84e1-5723f5badfaf",
"description": "",
"thirdPartyBotId": "",
"thirdPartyBotVersion": 1,
"quickReplyStyles": "",
"avatar": "https://api11.comm100.io/v4/Bot/chatbots/e8bf0d25-eed6-4a46-a417-318e15019609/avatar",
"engine": {
"id": "bbec7c36-9c72-4789-8e07-8951c22eb945",
"name": ""
},
"channelIds": [
"Live Chat"
]
}
Update the Chatbot
PUT bot/chatbots/{id}
Parameters:
Name | Type | in | Required | Description |
---|---|---|---|---|
languageId | string | body | yes | Language of the chatbot. |
name | string | body | yes | Name of the chatbot. |
thirdPartyWebhookUrl | string | body | yes | URL of the third party webhook. Webhook object, Only available when engine type is thirdParty. Default: https://. |
trainingStatus | string | body | no | Allowed values are "succeeded", "processing", "failed". |
importingStatus | string | body | no | Allowed values are "none", "processing", "succeeded", "failed". |
highConfidenceScore | integer | body | no | When visitor sends a message, bot will match it with all your intents. If the matching score (ranges from 0 to 100) is higher than the high confidence answer score, bot will reply with the intent that has the highest score. Default : 40. |
noAnswerScore | integer | body | no | When visitor sends a message, bot will match it with all your intents. If the top matching score (ranges from 0 to 100) is between high confidence answer score and no answer score, Bot will send the answer of the top score intent as a possible answer to visitors. If the top matching score is lower than the no answer score, bot will send the message configured for when visitor question is not recognized. Default:20. |
outputAudioEncoding | string | body | yes | Allowed values are "linear16", "oggOpus". |
voiceGender | string | body | yes | Allowed values are "male", "female". |
ifCustomizeAvatar | bool | body | no | Whether avatar of bot is customize or not. |
customizeAvatar | image | body | no | URL of the customize avatar. |
systemAvatarId | guid | body | no | Id of the system avatar. |
veryNegativeScore | integer | body | no | Chatbot Sentiment Analysis analyzes the messages you visitors send during the conversation with you chatbot. If the score (ranges from -10 to 10) is lower than the very negative score, Chatbot Sentiment Analysis will marked the sentiment of the message is very negative. Default: -8. |
negativeScore | integer | body | no | Chatbot Sentiment Analysis analyzes the messages you visitors send during the conversation with you chatbot. If the score (ranges from -10 to 10) is betweent the very negative score and the negative score, Chatbot Sentiment Analysis will marked the sentiment of the message is negative. Default: -3. |
neutralScore | integer | body | no | Chatbot Sentiment Analysis analyzes the messages you visitors send during the conversation with you chatbot. If the score (ranges from -10 to 10) is betweent the negative score and the neutral score, Chatbot Sentiment Analysis will marked the sentiment of the message is neutral. Default: 2. |
positiveScore | integer | body | no | Chatbot Sentiment Analysis analyzes the messages you visitors send during the conversation with you chatbot. If the score (ranges from -10 to 10) is betweent the neutral score and the positive score, Chatbot Sentiment Analysis will marked the sentiment of the message is positive. If the score is higher than the positive score, Chatbot Sentiment Analysis will marked the sentiment of the message is very positive. Default: 7. |
ifSentiment | bool | body | no | Whether Chatbot Sentiment Analysis is used or not. |
ifAutoTranslation | bool | body | no | |
description | string | body | no | Description of the chatbot. |
thirdPartyBotId | guid | body | no | When Chatbot Engine is IBM Watson , thirdPartyBotId is required. |
thirdPartyBotVersion | integer | body | no | |
quickReplyStyles | string | body | no | Allowed values are "buttons", "options". |
avatar | string | body | no | URL of the chatbot avatar. |
chatbotThirdPartyWebhookHeaders | chatbotThirdPartyWebhookHeaders[] | body | no | Reference to Chatbot Third Party WebHook Header. |
chatbotFormButtonText | chatbotFormButtonText | body | no | Reference to Chatbot Form Button Text. |
channelIds | array | body | no | The list of channel that current chatbot support. |
Response:
Example
Sample Request:
curl https://api11.comm100.io/v4/bot/chatbots/e8bf0d25-eed6-4a46-a417-318e15019609 \
-X 'PUT' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-D '{"languageId":"en","name":"Testchatbot","thirdPartyWebhookUrl":"https://","trainingStatus":"0","importingStatus":"0","highConfidenceScore":40,"noAnswerScore":20,"outputAudioEncoding":"linear16","voiceGender":"male","ifCustomizeAvatar":false,"customizeAvatar":"","systemAvatarId":"00000000-0000-0000-0000-000000000001","veryNegativeScore":-8,"negativeScore":-3,"neutralScore":2,"positiveScore":7,"ifSentiment":false,"ifAutoTranslation":true,"description":"","thirdPartyBotId":"","thirdPartyBotVersion":1,"quickReplyStyles":"","chatbotThirdPartyWebhookHeaders":[{"key":"Content-Type","value":"application/json"}],"chatbotFormButtonText":{"formSubmitButtonText":"Submit","formCancelButtonText":"Cancel","formConfirmButtonText":"Confirm"}}'
Response:
HTTP/1.1 200 OK
{
"id": "e8bf0d25-eed6-4a46-a417-318e15019609",
"languageId": "en",
"name": "Testchatbot",
"thirdPartyWebhookUrl": "https://",
"trainingStatus": "0",
"importingStatus": "0",
"highConfidenceScore": 40,
"noAnswerScore": 20,
"lastUpdatedTime": "2021-04-07T05:59:17.887Z",
"outputAudioEncoding": "linear16",
"voiceGender": "male",
"ifCustomizeAvatar": false,
"customizeAvatar": "",
"systemAvatarId": "00000000-0000-0000-0000-000000000001",
"veryNegativeScore": -8,
"negativeScore": -3,
"neutralScore": 2,
"positiveScore": 7,
"ifSentiment": false,
"ifAutoTranslation": true,
"engineId": "266b567c-c716-43c4-84e1-5723f5badfaf",
"description": "",
"thirdPartyBotId": "",
"thirdPartyBotVersion": 1,
"quickReplyStyles": "",
"avatar": "https://api11.comm100.io/v4/Bot/chatbots/e8bf0d25-eed6-4a46-a417-318e15019609/avatar",
"engine": {
"id": "bbec7c36-9c72-4789-8e07-8951c22eb945",
"name": ""
},
"channelIds": [
"Live Chat"
]
}
Delete the Chatbot
DELETE bot/chatbots/{id}
Parameters:
No Parameters
Response:
No Content
Example
Sample Request:
curl https://api11.comm100.io/v4/bot/chatbots/e8bf0d25-eed6-4a46-a417-318e15019609 \
-X 'DELETE' \
-H 'Authorization: Bearer {access_token}' \
Response:
HTTP/1.1 204 No Content
Was this article helpful?