What it does

Bmatch is a chatbot built on Telegram and Facebook messenger platform that matches voluntary non paid blood donors to recipients based on certain criteria such as blood group and location of the recipient. It also provides additional details such as distance and estimated time of arrival to the recipient's destination. A user can also search for the nearest blood drive and blood bank to their location. All this is done with the help of here routing, search, and data layers. Wit AI was also used to integrate NLP into the chatbot which enabled us to fetch structured data from users' chat.

How it works

  1. Telegram: Visit t.me/bmatchbot
    Facebook Messenger: Visit m.me/bmatchbot (Note: The Facebook messenger bot is currently not live because individual verification has been put to a hold by facebook. Send an email to bmatchbot@gmail.com to be added as a tester to the bot.)
  2. Tap /start button (Telegram) or tap the Get Started button (Facebook messenger).
  3. Registration: fill in the necessary information required such as phone number, gender, blood group/type, age, country and your current location. (The entered current location is queried on here's search API and results are displayed. You'd have to select from the list of displayed addresses)
  4. Help: Send "help" to display the bot's menu.
  5. Register as donor: Send "register as a donor" or tap => Donor > Register in the menu. Tap "yes" to proceed donor registration after reading the details of what it means.
  6. Request for a donor: Send "request for a donor" or tap => Donor > Request in the menu. Tap "yes" to proceed donor request after reading the details of what it means.
  7. Search for blood bank: Send "search for a blood bank" or tap => Blood Bank > Search in the menu. Fill in the location to fetch the nearest blood bank.
  8. Search for blood drive: Send "search for a blood drive" or tap => Blood Drive > Search in the menu. Fill in the location to fetch the nearest blood drive.

Core features

  1. Register as a donor: It makes it possible for willing blood donors to register through the chatbot. The user would have to tap or send "yes" to continue with donor registration or "no" to cancel registration as a donor. A user can also opt-out or unregister as a blood donor to stop receiving blood donor requests.
    Test Phrase:
    To register, try sending: Register as a donor
    To opt-out, try sending: Opt out from donor registration

  2. Request for a donor: Bmatch makes it possible for recipients to request for a blood donor. The recipient is matched based on the location and blood group of the available donor. Personal details such as name, phone number, gender, blood group, and the current location(health center) of the recipient would be sent to the matching blood donor. The current location of the recipient is queried with the here search API. This makes it easy for us to restrict users to input known locations on the here location service. When a match is found, additional details such as the distance and estimated time of arrival to the recipient is sent to the blood donor. The additional details(distance and eta) are fetched using the here routing API.
    Test Phrase:
    To request, try sending: Request for a donor

  3. Search for blood bank: Users can search for the nearest blood bank close to a selected location. The entered location is queried on the here search API to restrict users to input known locations on the here location service. Blood banks are fetched from three sources:
    1. Here places data layer: Blood banks from Johannesburg, South Africa are fetched and updated into our database weekly using the data from the places layer.
    2. Bmatch Partner: Blood banks are manually stored in our database upon request by users to do so. These blood banks are validated by bmatch before it is stored.
    3. Here Search API (Browse): Blood banks are also fetched from the search API and filtered by category.

    Test Phrase:
    To search, try sending: Find the nearest blood bank close to me.

  4. Search for blood drive: The blood drive is created and stored in the database upon request by users. Users can now search for the nearest blood drive close to a selected location. The entered location is queried on the here search API to restrict users to input known locations on the here location service.
    Test Phrase:
    To search, try sending: Find the nearest blood drive close to me.

Other features

  1. Enlist Blood Bank: Blood banks can contact us to enlist their blood bank on our platform.
    Test Phrase:
    To enlist, try sending: Enlist blood bank.

  2. Organize Blood Drive: A user can organize a blood drive in a selected location. To moderate creation of blood drives, interested individuals would have to contact us to create one.
    Test Phrase:
    To organize, try sending: Organize a blood drive

How we built it

Tools Used:

  1. Chatbot Channel: Telegram, Facebook Messenger.
  2. Location Service: Here data layer, search, and route service.
  3. Backend: Node JS/Sails JS
  4. Database: Redis, MongoDB
  5. Natural Language Processing: Wit AI
  6. External APIs: Telegram Bot API, Facebook Messenger API, Wit AI API.

Challenges we ran into

We initially built the chatbot on the Facebook messenger platform but when we were about to go live, we noticed we couldn't because we needed to do the individual verification for the Facebook app. Due to covid19, Individual verification for apps is currently paused on the Facebook developers portal so we could not go live with the Facebook messenger platform. We decided to also build the chatbot on the Telegram platform.

What's next for Bmatch

  1. Complete integration with the Facebook Messenger platform.
  2. Restrict requests for blood donors to come from only recipients in known health centers (clinics, hospitals).
Share this project:

Updates