I have explored smooch.io. the format of sending rich messages to smooch.io is as follows:
{
"role": "appMaker",
"type": "carousel",
"items": [{
"title": "Tacos",
"description": "Description",
"mediaUrl": "http://example.org/image.jpg",
"actions": [{
"text": "Select",
"type": "postback",
"payload": "TACOS"
}, {
"text": "More info",
"type": "link",
"uri": "http://example.org"
}]
}, {
"title": "Ramen",
"description": "Description",
"mediaUrl": "http://example.org/image.jpg",
"actions": [{
"text": "Select",
"type": "postback",
"payload": "RAMEN"
}, {
"text": "More info",
"type": "link",
"uri": "http://example.org"
}]
}]
}
BUT when i send this JSON response through api.ai to smooch.io , it gets error. Though it easily displays simple text message. How can i send this json message as an object to smooch. Is there any way to send it like the Facebook object? All i want is to send a carousel to the user.
For cards\carousels we had to map api.ai json to the smooch json called by the Smooch webhook.