官术网_书友最值得收藏!

User input cards

As you can imagine, building the blocks for every cuisine and location combination can become a laborious task. Let's try to build the same functionality in another way—forms. In order to use forms, the user input card needs to be used. Let's create a new block called Restaurant_search and to it, let's add a User Input card. To add a User Input card, click ADD A CARD, click the + icon, and select the User Input card.

Add all the questions you want to ask the user under MESSAGE TO USER. The answers to each of these questions can be saved to variables. Name the variables against every question. These variables are always denoted with double curly brackets (for example, {{restaurant_location}}):

Information provided by the user can also be validated before acceptance. In case the required information is a phone number, email address, or a number, these can be validated by choosing the appropriate format of the input information. After the user input card, let's add a Go to Block card to redirect the flow to the results page:

And add a block where we present the results. As you can see here, the variables holding information can be used in chatbot utterances. These will be dynamically replaced from the context when the conversation is happening:

The following screenshot shows the conversation so far on Messenger:

主站蜘蛛池模板: 海口市| 当雄县| 宁武县| 彰化县| 大安市| 北碚区| 普宁市| 米脂县| 巴彦淖尔市| 兴山县| 临湘市| 中方县| 苍梧县| 仪陇县| 三台县| 上林县| 邳州市| 牡丹江市| 珲春市| 和林格尔县| 辉县市| 景洪市| 炎陵县| 吉水县| 乌鲁木齐市| 鄂温| 延川县| 汶上县| 农安县| 赤水市| 桃园市| 菏泽市| 秦皇岛市| 西华县| 昌吉市| 苍山县| 衢州市| 册亨县| 霍城县| 克什克腾旗| 永登县|