Link to live site here
This chatbot fulfills all the below requirements
- ChatBot interface would be like a chat interface
- No need for authentication but we should be able to store user session based on devices
- When a customer lands on the chatbot page, the bot should send these options to the customer: Select 1 to Place an order Select 99 to checkout order Select 98 to see order history Select 97 to see current order Select 0 to cancel order
- When a customer selects “1”, the bot should return a list of items from the restaurant. The order items can have multiple options but the customer should be able to select the preferred items from the list using this same number select system and place an order.
- When a customer selects “99” for an order, the bot should respond with “order placed” and if none the bot should respond with “No order to place”. Customer should also see an option to place a new order
- When a customer selects “98”, the bot should be able to return all placed orders from previous order to present orders
- When a customer selects “97”, the bot should be able to return current order and return no current order if none
- When a customer selects “0”, the bot should cancel the order if there is.
- Clone this repo to your local machine
- In the CLI run npm install to install all node modules.
- Update env with env.example file
- Run
npm run start
on the CLI or runnpm run dev
to run the app in development mode
-
Host: 4000
-
Route: /
-
Method: GET
-
ChatBot Response: Welcome to the chatbot --your name--
-
User Response: "String"
Success
Chat bot: Select 1 to Place an order Select 99 to checkout order Select 98 to see order history Select 97 to see current order Select 0 to cancel order
- Route: /
- Method: GET
- Body: 1
- ChatBot Response
Success
Chat bot: Here are the items you can order: 1 - Pizza 2 - Burger 3 - Pasta 4 - Salad 5 - Sandwich 6 - Fries 7 - Soda 8 - Beer 9 - Wine 10 - Coffee Please select a number to add to order
- Route: /
- Method: GET
- Body: 1
- ChatBot Responses
Success
Chat bot: Pizza added to order
- Route: /
- Method: GET
- Body: 97
- ChatBot Response
Success
Chat bot: Current order: Burger - 2 Pizza - 1 Pasta - 1
- Route: /
- Method: GET
- Body: 99
- ChatBot Response
Success
Chat bot: order placed
- Route: /
- Method: GET
- Body: 98
- ChatBot Responses
Success
Chat bot: Order 1: Burger - 2 Pizza - 1 Pasta - 1
- Route: /
- Method: GET
- Body: 0
- ChatBot Responses
Success
Chat bot: Order cancelled Select 1 to Place an order Select 99 to checkout order Select 98 to see order history Select 97 to see current order Select 0 to cancel order
- Route: /
- Method: GET
- Body: 98
- ChatBot Responses
Success
Chat bot: No order history
- Route: /
- Method: GET
- Body: 97
- ChatBot Responses
Success
Chat bot: No current order Select 1 to Place an order Select 99 to checkout order Select 98 to see order history Select 97 to see current order Select 0 to cancel order
- Route: /
- Method: GET
- Body: 0
- ChatBot Responses
Success
Chat bot: No order to cancel Select 1 to Place an order Select 99 to checkout order Select 98 to see order history Select 97 to see current order Select 0 to cancel order