We noticed that marketplace sellers had a specific need for a system that would allow them to better manage their listings on the Facebook Marketplace. Currently, a seller has to manage all their potential customers in individual chats with them as well as maintaining order and punctual response times. This may be manageable for small numbers of listings, but fails to scale and can grow to be difficult to maintain with many listings.

What it does

We have created a sales assistant bot that includes the following features:


  • Maintain their own Marketplace listings in one place, where they can add listings through the Share > Send as Message buttons on the Marketplace posting
  • Setup queues for listings so fair order can be enforced
  • Setup frequently asked questions (FAQ) for each listing that buyers can refer to
  • Notification system for progress on the order of queues (i.e. when someone exits or enters)


  • Manage listings that they are interested in by adding or removing themselves to queues
  • Notification system for progress in queues (i.e. moving forward in line)

Chat Rooms:

  • Reminder system that notifies the sellers to reply in a timely fashion (by default, this is set to 24 hours and 48 hours) as well as kicking out buyers who fail to reply within 48 hours

How we built it

We worked with the Node.js SDK provided by Facebook for Messenger to handle message demultiplexing. We also used Firebase as a real-time data store to persist context as well as queue and listing information.

Challenges we ran into

We had difficulty figuring out the best way to persist and manage state between messages. Each message sent from the users did not provide much information, so we had to choose key events to prompt entrance into a state so that we could make various assumptions such as which listing the user is talking about. We also had difficulty with removing the reliance of quick replies, and we were unable to allow the users to talk naturally with the bot through messages without using formal commands.

Accomplishments that we're proud of

We are proud that we were able to acquaint ourselves with Firebase for real-time data storage as it was different to the convention SQL and NoSQL databases that we are used to working with. Having also joined the hackathon rather late, we also are proud of the work that we accomplished in the time that we had!

What we learned

With none of us having ever worked with bots and parsing responses in the way that this project did, we learned a lot about the work and thought that goes into building assistant technologies. On the development processes side, we also learned a lot about collaboration and team efforts that goes into maintaining a repository with continuous integration. The importance of clean code was a necessity and was enforced through diligent code reviews at every step, allowing each of us to synchronize ourselves with all the features that were incrementally being added to the bot.

What's next for Sales Assistant

We see this as a great starting point for leveraging the Facebook Marketplace as a platform for small entrepreneurs to manage their businesses, especially by consolidating conversations into one system. Next, we would like to add NLP to be able to more flexibly manage replies from users.

Share this project: