- Hands-On Chatbots and Conversational UI Development
- Srini Janarthanam
- 233字
- 2021-07-02 19:15:27
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:

- 物聯網與北斗應用
- 智能網聯汽車V2X與智能網聯設施I2X
- Spring Boot 2.0 Projects
- 萬物互聯:蜂窩物聯網組網技術詳解
- Metasploit Penetration Testing Cookbook
- 數字調制解調技術的MATLAB與FPGA實現:Altera/Verilog版(第2版)
- 5G技術與標準
- 深入理解Nginx:模塊開發與架構解析
- ElasticSearch Server
- 無線傳感器網絡定位方法及應用
- XSS跨站腳本攻擊剖析與防御
- 企業網絡組建與維護項目式教程
- Citrix XenDesktop 5.6 Cookbook
- 新編 中文版CorelDRAW入門與提高
- Hands-On Full Stack Web Development with Angular 6 and Laravel 5