How to use the output in webhook

(Bryan Song) #1

Hi i manage to get the webhook to response. How do i use the msg and quickreply return in the webhook and pass it out as a message?

Output Data:

Status Code
200
Body
{
“confidence” : 0.10857631312230166,
“type” : “msg”,
“msg” : “For here?”,
“quickreplies” : [ “Yes”, “No” ],
“entities” : {
“intent” : [ {
“confidence” : 0.6753554742896948,
“value” : “order”
} ]
}
}
Data
{
“confidence”: 0.10857631312230166,
“type”: “msg”,
“msg”: “For here?”,
“quickreplies”: [
“Yes”,
“No”
],
“entities”: {
“intent”: [
{
“confidence”: 0.6753554742896948,
“value”: “order”
}
]
}
}

(Kellsey Shaw) #2

Hi Bryan,

You can use Data Outputs to access items in JSON.

It’s just this part:

{
“confidence”: 0.10857631312230166,
“type”: “msg”,
“msg”: “For here?”,
“quickreplies”: [
“Yes”,
“No”
],
“entities”: {
“intent”: [{
“confidence”: 0.6753554742896948,
“value”: “order”
}]
}
}

That you’ll be looking at. And you might want to use http://jsonviewer.stack.hu/ so that you can see a visual structure of your JSON. It makes it easier to figure out what you need to use for the data outputs to read the items. :thumbsup: