wit-ai/node-wit

Needed guidance on how to display flight search results similar to Skyscanner?

anusha9213 opened this issue · 6 comments

I am working on a travel bot. The user can search and book flight by entering origin,destination along with dates.
I have integrated node.js server and I have an external API to retrieve flight details based on the search.
Everything is working fine,but how do I display the results in a template format.
I have found a similar bot Skyscanner which display the search results in a beautiful way.Like the below one.
They have converted the search results into a image and displaying in a generic template.

[

](https://www.messenger.com/t/skyscanner)

How can I display search results in a template format?

l5t commented

You will find more info in the messenger doc.
"To create a scrollable carousel, include multiple generic templates in the elements array of the request."
https://developers.facebook.com/docs/messenger-platform/send-messages/template/generic

Thanks for the reply..I know they are using a generic template to display the flight results..
In the image url place they are creating a dynamic image with flight details on searching a flight to book..Can you tell me how it is possible?

l5t commented

What do you mean by dynamic image? cc @amuramoto

https://i.imgur.com/VRvO2kj.png
In the above link..the generic template has dynamic results in the image. They are showing flight results in an image. Can we provide a html link in the place of an image url?

@l5t @amuramoto Can any one of you please provide me your email Id, I have a small doubt regarding the above question i have posted. I am unable to explain my issue here.. Kindly help.