Inspiration

Whenever we go to supermarket for buying groceries, we either end up buying more or sometimes less. This leads to wastage or an extra trip to supermarket. To avoid this, we need to carry the list of grocery Items that we need to buy.

In the age of technology, we wanted something to help us organize our shopping behaviors and also share the responsibility among joint family members. This app would help us create a detailed list of groceries and also share it with someone who can bring it to us.

What it does

-This bot will help user to compile the list of grocery items that is needed. -This application is end to end solution for buying groceries.

  • The user can generate the list and save it for future
  • Once the list is generated, the user can email the list.
  • There is also an option to order online. If user chooses that option, the list will be forwarded to the other app.
  • There is no need to search for items when ordering online as the app will receive the grocery list.

How I built it

  1. I have created a Node server that subscribes to webhooks to receive the messages from messenger.
  2. The app uses Web Views to collect multiple data from user. The user can select all the grocery items at once.
  3. The application uses wit.ai NLP processing if the user wants to Add/Remove any item.
  4. The app provides user with the quick replies to capture user inputs. Quick replies help the bot to serve a purpose and follow its workflow.
  5. The app uses handover protocol to transfer the control to another app. There are 2 applications - one for generating the list and other is order delivery app. When the list is generated, the application passes the control to order delivery app along with the grocery list. The user can now order its items from that app.
  6. The user can choose to save its list. At any point, the user can use the saved list and modify it according to its requirements.
  7. The app provides the option to email the grocery list. The email address of the sender is also retrieved using quick reply.

Challenges I ran into

  1. When the user send multiple messages, the quick reply is trimmed sometimes. This happens even when the quick reply is the last message as well. To avoid this, I have avoided to send multiple messages with quick reply.
  2. Webviews are a great feature. Having no node js background, it took me lot of time to implement them.
  3. While working on handover protocols, it was difficult to understand which thread has control sometimes. Suppose the secondary app has control and it went into some error or was down, the control never came back to primary. After understanding thoroughly the concepts, I had implemented a solution to take the control from secondary.

Accomplishments that I'm proud of

  1. Learning new Technologies is always fun. In this time, I could learn and implement everything that I had never worked before.
  2. Completing the app within limited time is a big achievement for me.

What I learned

  1. Learnt facebook messenger platform concepts. Though I implemented Quick replies and Handover, I did learn the other concepts as well.
  2. Basic of NLP using wit and dialog flow.

What's next for ComestibleBot - User's Indian Groceries List Generator

  1. Completing the order delivery app.
  2. Web views give the option of sharing. This is definitely a good feature for this app as one partner can create the list and share the order delivery webview with the other one to order.
  3. Generating customized grocery list according to the number of people at home.
  4. Implementation of one time notification if any of the grocery item is unavailable in order delivery app.
Share this project:

Updates