Data from MYSQL to Dropdown

(Fabio) #1

Hi

Does anybody know how to add dropdowns in the chatbot, I need to populate a drop down from data in a MYSQL DB

I need the User to Select a Make and Model from within the bot

any assistance is greatly appreciated.

(Daniel Beckett) #2

Hi @fabzster

Unfortunately drop-down boxes aren’t supported in the bot. You could instead output your choices to an Ask a Question action with the question type set to choice.

(Fabio) #3

many thanks for the prompt reply, it is much appreciated

hmm see I have a database with Make Model, Device Price and based off that selection will calculate the premium from Device Value.

I saw somewhere that you could include something from an html page within the bot, if so I could just create that and display it, do you know if that is possible?

(Daniel Beckett) #4

If you’re showing product information then a card set could be used - you can populate it with information from your database and include images.

In regards to displaying web content, if your bot is on Facebook Messenger then their WebView template could be used.

1 Like
(Fabio) #5

thanks, I will have a look at the cards functionality, it looks like I should be able to display the selected model in that fashion but to actually select it from a list somehow would be key as there are hundreds of models for some Makes.

Perhaps I could use a LIKE query to pull back less results and perhaps display them as a couple of more narrowed down choices.

(Fabio) #6

The LIKE query fails as it tries to escape the %, is there a specific way to do this?

I have tried

(’:placeholder%’)
(:placeholder%)
(:placeholder)
:placeholder%
:placeholder

(Karen Barker) #7

Hi @fabzster

Please see here for an explanation of how to achieve this.