Chatbot Intent Question
- 11 Jul 2022
- 3 Minutes to read
- Print
- DarkLight
Chatbot Intent Question
- Updated on 11 Jul 2022
- 3 Minutes to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
Chatbot Intent Question
Chatbot Intent Questions
- Chatbot Intent Questions ManageGET bot/chatbotIntentQuestions
- Get the list of Chatbot Intent QuestionsGET bot/chatbotIntentQuestions/{id}
- Get a single Chatbot Intent QuestionPOST bot/chatbotIntentQuestions
- Create a new Chatbot Intent Question
Chatbot Intent Question JSON Format
Chatbot Intent Question is represented as simple flat JSON objects with the following keys:
Name | Type | Description |
---|---|---|
id | guid | Id of the intent question. |
order | integer | Must be greater than or equal to 0, ascending order. |
intentId | guid | Id of the intent. |
content | string | Visitor questions that tigger this intent. |
chatbotIntentQuestionKeywords | chatbotIntentQuestionKeywords[] | Reference to Chatbot Intent Question Keyword. |
Chatbot Intent Question Keyword JSON Format:
Name | Type | Description |
---|---|---|
id | guid | Id of the chatbot intent question keyword. |
intentQuestionId | guid | Id of the chatbot intent question. |
variableName | string | Label to distinguish same entity marked on one question. |
startPosition | integer | Start index of current question you marked. |
endPosition | integer | End index of current question you marked. |
ifPrebuiltEntity | bool | Whether marked entity is prebuilt entity or custom entity. |
prebuiltEntityId | guid | Id of the marked prebuilt entity. |
entityId | guid | Id of the entity marked in one question. |
entity | entity | Reference to Chatbot Entity. |
prebuiltEntity | prebuiltEntity | Reference to Prebuilt Entity. |
Get the list of Chatbot Intent Questions
GET bot/chatbotIntentQuestions
Parameters:
Name | Type | in | Required | Description |
---|---|---|---|---|
intentId | guid | query | no | Id of the intent. |
include | string | query | no | Allowed value is "chatbotIntentQuestionKeyword". |
Response:
An array of Chatbot Intent Question
Example
Sample Request:
curl https://api11.comm100.io/v4/bot/chatbotIntentQuestions \
-X 'GET' \
-H 'Authorization: Bearer {access_token}' \
Response:
HTTP/1.1 200 OK
[
{
"id": "83d2660f-b7e6-409a-b072-896a4ee4914a",
"order": 0,
"intentId": "2fde3f7e-8c23-4852-97be-a28fa5289d0e",
"content": "Hello",
"chatbotIntentQuestionKeywords": [
{
"id": "45e7763e-f20d-4324-ab35-b51a70ae8680",
"intentQuestionId": "ee3ce615-38f8-469c-abcf-4a51e79fd54b",
"variableName": "color",
"startPosition": 5,
"endPosition": 20,
"ifPrebuiltEntity": false,
"prebuiltEntityId": "00000000-0000-0000-0000-000000000000",
"entityId": "d394618e-6c2a-444f-b4b3-5b88ed2466ad",
"entity": {
"id": "73d07166-3dfc-4257-aec7-6b57b31684d1",
"chatbotId": "e8bf0d25-eed6-4a46-a417-318e15019609",
"name": "color",
"chatbotEntityKeywords": [
{
"id": "171163c7-01dc-4ab7-9e13-33dd85654f78",
"keyword": "Pink",
"synonyms": [
"white pink"
],
"entityId": "de6bfdf9-1ef8-4d76-986f-9b05b2dfa570"
}
]
},
"prebuiltEntity": {
"dialogflowEntityId": "376B93B1-C148-EB11-8100-00155D081D0B",
"id": "386B93B1-C148-EB11-8100-00155D081D0B",
"name": "entity",
"description": "description",
"example": [
"entity1",
"entity2"
],
"languageCode": "en"
}
}
]
}
]
Get a single Chatbot Intent Question
GET bot/chatbotIntentQuestions/{id}
Parameters:
Name | Type | in | Required | Description |
---|---|---|---|---|
include | string | query | no | Allowed value is "chatbotIntentQuestionKeyword". |
Response:
Example
Sample Request:
curl https://api11.comm100.io/v4/bot/chatbotIntentQuestions/83d2660f-b7e6-409a-b072-896a4ee4914a \
-X 'GET' \
-H 'Authorization: Bearer {access_token}' \
Response:
HTTP/1.1 200 OK
{
"id": "83d2660f-b7e6-409a-b072-896a4ee4914a",
"order": 0,
"intentId": "2fde3f7e-8c23-4852-97be-a28fa5289d0e",
"content": "Hello",
"chatbotIntentQuestionKeywords": [
{
"id": "45e7763e-f20d-4324-ab35-b51a70ae8680",
"intentQuestionId": "ee3ce615-38f8-469c-abcf-4a51e79fd54b",
"variableName": "color",
"startPosition": 5,
"endPosition": 20,
"ifPrebuiltEntity": false,
"prebuiltEntityId": "00000000-0000-0000-0000-000000000000",
"entityId": "d394618e-6c2a-444f-b4b3-5b88ed2466ad",
"entity": {
"id": "73d07166-3dfc-4257-aec7-6b57b31684d1",
"chatbotId": "e8bf0d25-eed6-4a46-a417-318e15019609",
"name": "color",
"chatbotEntityKeywords": [
{
"id": "171163c7-01dc-4ab7-9e13-33dd85654f78",
"keyword": "Pink",
"synonyms": [
"white pink"
],
"entityId": "de6bfdf9-1ef8-4d76-986f-9b05b2dfa570"
}
]
},
"prebuiltEntity": {
"dialogflowEntityId": "376B93B1-C148-EB11-8100-00155D081D0B",
"id": "386B93B1-C148-EB11-8100-00155D081D0B",
"name": "entity",
"description": "description",
"example": [
"entity1",
"entity2"
],
"languageCode": "en"
}
}
]
}
Create a new Chatbot Intent Question
POST bot/chatbotIntentQuestions
Parameters:
Name | Type | in | Required | Description |
---|---|---|---|---|
order | integer | body | no | Must be greater than or equal to 0, ascending order. |
intentId | guid | body | yes | Id of the intent. |
content | string | body | yes | Visitor questions that tigger this intent. |
chatbotIntentQuestionKeywords | chatbotIntentQuestionKeywords[] | body | no | Reference to Chatbot Intent Question Keyword. |
Response:
Example
Sample Request:
curl https://api11.comm100.io/v4/bot/chatbotIntentQuestions \
-X 'POST' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-D '{"order":0,"intentId":"2fde3f7e-8c23-4852-97be-a28fa5289d0e","content":"Hello","chatbotIntentQuestionKeywords":[{"variableName":"color","startPosition":5,"endPosition":20,"ifPrebuiltEntity":false,"prebuiltEntityId":"00000000-0000-0000-0000-000000000000","entityId":"d394618e-6c2a-444f-b4b3-5b88ed2466ad"}]}'
Response:
HTTP/1.1 201 Created
{
"id": "83d2660f-b7e6-409a-b072-896a4ee4914a",
"order": 0,
"intentId": "2fde3f7e-8c23-4852-97be-a28fa5289d0e",
"content": "Hello",
"chatbotIntentQuestionKeywords": [
{
"id": "45e7763e-f20d-4324-ab35-b51a70ae8680",
"intentQuestionId": "ee3ce615-38f8-469c-abcf-4a51e79fd54b",
"variableName": "color",
"startPosition": 5,
"endPosition": 20,
"ifPrebuiltEntity": false,
"prebuiltEntityId": "00000000-0000-0000-0000-000000000000",
"entityId": "d394618e-6c2a-444f-b4b3-5b88ed2466ad",
"entity": {
"id": "73d07166-3dfc-4257-aec7-6b57b31684d1",
"chatbotId": "e8bf0d25-eed6-4a46-a417-318e15019609",
"name": "color",
"chatbotEntityKeywords": [
{
"id": "171163c7-01dc-4ab7-9e13-33dd85654f78",
"keyword": "Pink",
"synonyms": [
"white pink"
],
"entityId": "de6bfdf9-1ef8-4d76-986f-9b05b2dfa570"
}
]
},
"prebuiltEntity": {
"dialogflowEntityId": "376B93B1-C148-EB11-8100-00155D081D0B",
"id": "386B93B1-C148-EB11-8100-00155D081D0B",
"name": "entity",
"description": "description",
"example": [
"entity1",
"entity2"
],
"languageCode": "en"
}
}
]
}
Was this article helpful?