Now that we have a setup to test the chatbot and have explored a variety of ways information can be presented to the user, let's examine the ways in which conversation flow can be managed. The basic model available to us is the waterfall model, where the conversation is composed of a sequence of steps. Let's take the example of booking a table at a restaurant where the conversation proceeds in the following way: get the time of reservation, the number of people at the table, and the name of the user:
// Bot Dialogsvar bot = new builder.UniversalBot(connector, [ function (session) { session.send('Welcome to New India restaurant!'); builder.Prompts.time(session, 'Table reservations. What time?'); }, function (session, results) ...