Back to Parent

Outcome


Intention

The main reason I sought to build this project was to promote circular and sharing economy practices. As a person who has moved through 5 different cities across 2 countries in the past year, I can say from personal experience that it is a very painful process to setup a place, use it and finally, find people to pass on the things that one initially started with.  For instance - mattresses, table, chair, bed frame, lamps, even clothes that are in a good condition. Another thought behind this was the model of sharing economy, suppose I want to use a drilling machine to drill 4/5 holes in my apartment. Now the upfront cost of purchasing this would be too much, but I wouldn't mind paying a few dollars to rent the machine for a few hours. Building up on these experiences, I sought to build a chatbot which can enable this. 

Process

The following points given below explain the process of developing the bot. Although many companies have their own shopping bots, this bot connects buyers and sellers, thereby promoting the sharing economy. Anyone can sell any product at anytime by uploading a picture of it.

1. Bot Conversation Flow

This is the 'ideal' way a conversation is supposed to happen through the Accio bot. There would be many border cases, and also some situation in which sequential questions need to be asked to users, along with sufficient help along the way. 

Flowchart   accio2
Show Advanced Options

2. Bot Personality

Accio is aimed to be a fun, friendly and helpful bot. The main reason to build on the smalltalk feature (offered by Dialogflow) is to handle all cases where users perform actions not intended or perceived as usual in context of the bot for eg. I am bored, I am sleepy, Do not talk to me, Tell me a joke etc. 

Screen shot 2018 10 19 at 6.40.50 pm
Show Advanced Options
Screen shot 2018 10 19 at 6.41.24 pm
Show Advanced Options

3. Data Diagram

The following data diagram illustrates how the user data is going to be stored on the server. 

  1. Accio_userdetails: records the unique details of a person. Later this same table will be used to reference other tables based on the user_id
  2. Accio_purchases: records the purchase details such as the amount paid and the product that has been purchased.
  3. Accio_products: lists the product price, the quantity purchased and it's price.

Data diagram
Show Advanced Options

4. The Ideal Flow for the user interaction with the bot

Previously the bot was called 'buy sell' while testing the interaction in Botsoceity. 

Botsoceity is a useful too for mocking up sample interactions with a bot. https://botsociety.io/

Mebot mockup 8f764dbc9098
Show Advanced Options

Final Product

Detail what you created. What methods or techniques did you use? What tools and technologies were involved? Include images, code or video.

1. Gems Used

the following is the code used in the Gemfile

Show Advanced Options

2. Response Determination and output using app.rb file:

The following code piece is about how the response is given based on the detected intents. By no means it is able to cover use cases, and that being said, the bot is still under development. 

Show Advanced Options

3. Database: Listing tasks in the REST/ CRUD approach

Show Advanced Options

Accio Bot Video

Please watch the video in fullscreen mode 

Show Advanced Options

Reflection

I personally think that this project was too large to be built in a mini and I might require another mini or say 2 weeks to get a full blown working prototype.

1. Milestones Ahead:

  1. To detect intents more smoothly, currently, have to dig into Dialogflow interaction logs files to check which parameters are missing and which ones are populating data to the user via Twilio
  2. Dialogflow offers sentiment analysis, how can that be used to help users when they tell accio that they’re bored or they’re happy. (apparently dialogflow agent is responding to those queries but am unable to populate it on the screen)
  3. Replacing rakuten API with craigslist scraper or amazon product search. Later replacing the API with an actual product seller. 
  4. Showing product images captured from url in the form of cards (use messenger as a platform maybe..)
  5. Migrate to a platform better suited for online product exchange such as Google Assistant.

2. Learning from Dialogflow Integration:

When I first experimented with Dialogflow, I ended up hooking it just to Twilio due to which intent detection and answers were being given by Dialogflow itself without the user inputs touching the ruby code at all. In the second iteration, Dialogflow was used to pick up intents while the user queries were answered using the Ruby programme. 

the dialogflow ruby integration for intent detection can be found here: https://github.com/Harshikerfuffle/flying-unicorns/blob/master/technical_guide.md

3. Interact with Accio

Please WhatsApp "join eggplant-emu" on number +1 (415) 523 8886

Drop files here or click to select

You can upload files of up to 20MB using this form.