Getting improper response from Virtual Agent bot integration API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-30-2022 08:46 AM
I am using the Virtual Agent bot integration API to add a bot to my application.
Whenever I send some random message (example - hii) to the API for the first time I get a valid response from the API i.e
But after this, if I send some random request to the API, I get `undefined` in the response
Expected-
Currently -
After the above `hii` request I am getting the following response -
If I send the `hii` message again after this then I get the proper response.
Am I missing out on some configuration?
- Labels:
-
Virtual Agent
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-09-2022 10:40 PM
Hi
Can you please share the VA API version and the complete request payload?
Do you see any error messages in the logs?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2022 12:12 AM
Hi
I am using version "3.1.0" of VA API.
Request payload looks like this-
No, I don't see any error message in the logs just getting the "undefined" response.
I did find something on this. I am getting the "undefined" response when the secondary bot is handing the conversation over to the primary bot but ideally, I should get a "takeControl" flag in the response.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2022 02:19 AM
Endpoint: https://instance.service-now.com/api/sn_va_as_service/bot/integration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2022 07:02 AM
This is the response I get first time I sent the request-
{
"requestId": "dfs-4rfg-qwe23-dsds",
"message": {
"text": "hii",
"typed": true,
"clientMessageId": "ABC-123"
},
"userId": "beth",
"body": [
{
"uiType": "OutputText",
"group": "DefaultText",
"value": "I am sorry but I didn't understand your request.",
"maskType": "NONE"
},
{
"uiType": "OutputText",
"group": "DefaultText",
"value": "Please try giving me your request in a different way. I'm currently better at understanding short sentences.",
"maskType": "NONE"
},
{
"uiType": "TopicPickerControl",
"group": "DefaultPicker",
"nluTextEnabled": false,
"promptMsg": "Hi there, please enter your request or make a selection of what I can help with. You can type help any time when you need help.",
"label": "Show me everything",
"options": [
{
"label": "Benefits Overview (Template)",
"value": "b9b923af231400107e45ff5e17bf6553",
"enabled": true
},
{
"label": "Change in Benefits Inquiry (Template)",
"value": "b81ad36c771101107e0df336ba5a9955",
"enabled": true
},
{
"label": "Check IT Ticket Status (Template)",
"value": "55720b465bf0201024f11fc40a81c72d",
"enabled": true
},
{
"label": "Collaboration Applications (Template)",
"value": "9c3b882253f02010a52bddeeff7b127f",
"enabled": true
},
{
"label": "Create Problem (Template)",
"value": "c58656adc33020105ae0d2bf6d40dd41",
"enabled": true
},
{
"label": "Demo FLow",
"value": "7c17c60e073c5110e2abf7108c1ed030",
"enabled": true
},
{
"label": "Email Issues (Template)",
"value": "d324faa173702010b5c7e0dbc4f6a727",
"enabled": true
},
{
"label": "Enroll new Beneficiary​​ (Template)",
"value": "20536df3c7c1011047b1d3de17c260ba",
"enabled": true
},
{
"label": "Live Agent Support.",
"value": "ce2ee85053130010cf8cddeeff7b12bf",
"enabled": true
},
{
"label": "Reset Password (Template)",
"value": "71919ecdc7d310100a9b5d83c7c26072",
"enabled": true
},
{
"label": "Start Virtual Machine CAI (Template)",
"value": "6bf968a0ebd530103dedddde23522864",
"enabled": true
}
]
}
],
"score": 0
}
This is the response I get when I hit the same request multiple times (i.e - when I hit the API with the same request payload more than the value of "va.bot.to.bot.take.control_times")-
I have set the value of "va.bot.to.bot.take.control_times" to 5. So, I get the "undefined" response in the 5th request when I hit the API with the same request payload.