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

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:

主站蜘蛛池模板: 莆田市| 桑日县| 克什克腾旗| 垦利县| 松溪县| 和林格尔县| 松原市| 囊谦县| 曲靖市| 清流县| 阳春市| 兴安盟| 体育| 谷城县| 南和县| 漠河县| 桃园市| 金寨县| 奇台县| 交城县| 虞城县| 轮台县| 乌拉特后旗| 茂名市| 墨玉县| 营口市| 句容市| 大冶市| 宜宾县| 南充市| 平邑县| 内乡县| 海安县| 肇东市| 镇宁| 永善县| 沙雅县| 宝兴县| 诸城市| 林甸县| 宕昌县|