简体   繁体   中英

Is there a way to show dynamic suggestion chips in dialogflow or dynamic list response?

I am trying to show stores to the user, but that stores need to be dynamic and should come from the database according to the user's current location.

User at Location1

user: show nearby stores
assistant: I need your location, can I get that?
user: yes
assistant: you are at location1, these are the stores near you.
    Store1, Store2, Store3 (Suggestion Chips)

suppose if tomorrow the user is at a different location and ask the same question then he should be able to see other stores.

User at Location2

user: show nearby stores
assistant: I need your location, can I get that?
user: yes
assistant: you are at location2, these are the stores near you.
    Store4, Store5, Store6 (Suggestion Chips)

I want to show these stores dynamically according to the user's location, in the form of suggestion chips, or in the form of list response.

Are you using a webhook? That would be the standard way of doing anything dynamic.

This codelab shows how to use the Dialogflow inline editor for dynamic responses. You can use standard JavaScript to implement your decision logic and return dynamic suggestion chips.

If you want to get the users location, you need to use Permissions, there are neat helpers for that as well.

If you have more information on what you have tried so far, we can help you with more specific resources.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM