Incorrect webhook api v2 response when compared to v1

Hi Everyone, I have a couple of queries

  1. I created a demo bot and trying to access the bot through postman enabling webhook channel. There is a flow where bot has to return 3 messages one among them (the middle one after a mock api call) being template and other two are text messages. The version 1 of api is returning all the three correctly where as version 2 returns only the first message, is there any additional attribute in the request body we need to send?

request body for v1:
{
“session”: {
“new”: false
},
“message”: {
“text”: “yes”
},
“from”: {
“id”: “a@b.com
},
“to”: {
“id”: “st-b569c937-f9e3-51e5-9098-56a997987ade”
}
}

response from v1:
{
“text”: [
"Please be patient while I look for a match for your claim. ",
"{“type”:“template”,“payload”:{“template_type”:“table”,“text”:“We found 2 claims in our systems matching your search criteria. Please click on the “Claim Number” to view more details.”,“columns”:[[“ClaimNumber”,“Center”],[“ProviderGeneratedPatientAccountNumber”],[“DateOfService”],[“DateProcessed”],[“ServicingProvider”],[“Status”,“right”]],“table_design”:“regular”,“speech_hint”:“Here is your claims detail”,“elements”:[{“Values”:[123456789,“ABCDEFGHIJKL”,“12-15-2020”,“12-22-2020”,“John Smith”,“Paid”]},{“Values”:[987654321,“YURWERTUIOP”,"01-02-2021 “,“01-09-2021”,“Edward Johnson”,“Denied”]}]}}”,
"Is there any thing else I can do for you?\nYes, No, "
],
“endOfTask”: true,
“endReason”: “Fulfilled”,
“completedTaskId”: “dg-b74839eb-3184-533a-a0ff-c74e9118e550”,
“completedTaskName”: “claimnotfound”
}

request body for v2:
{
“session”: {
“new”: false
},
“message”: {
“type”: “text”,
“val”: “yes”
},
“from”: {
“id”: “a@b.com
},
“to”: {
“id”: “st-b569c937-f9e3-51e5-9098-56a997987ade”
}
}

response from v2:
{
“data”: [
{
“type”: “text”,
“val”: "Please be patient while I look for a match for your claim. ",
“createdOn”: “2022-03-18T19:50:54.074Z”,
“messageId”: “ms-7ad51085-9994-5caf-99dc-1a3c6f1d23ff”
}
],
“_v”: “v2”,
“pollId”: “963d90df76fc05f3e91a417e186ad0e4”
}

  1. If the customer wants to use webhook channel with their own ui, how will they able to maintain the sessions properly? like timeouts, refresh etc.
1 Like

@vineeth.kumar
We have tested this and we see a possible issue. We have marked your post under the ‘bugs’ category and created an internal ticket to get this resolved as soon as possible.
As of now, please continue to use webhook v1 for testing.
We will notify you of the resolution.

@sameera.tumuluri FYI

@vineeth.kumar
Update - This was not a bug. The poll-id will need to be called whenever it is populated.

https://developer.kore.ai/docs/bots/channel-enablement/adding-webhook-channel/ Please look into the below documentation that was updated.

Note - The poll id implementation has been done in our web-SDK as well.

If you need, you may run the code in debug mode for a better understanding.