codeterrayt / WhatsAppCabBookingBot

WhatsApp Cab Booking Bot is a Node.js project for easy cab reservations via WhatsApp. It features user-friendly booking for passengers and convenient command-based management for owners. Enhance the cab booking experience with this streamlined solution in the familiar WhatsApp interface.
MIT License
8 stars 0 forks source link
automation booking-system bot cab-booking chatbot interactive javascript nodejs open-source whatsapp whatsapp-bot whatsapp-web-js

WhatsApp Cab Booking Bot 🚗✨

WhatsApp Cab Booking Bot is a Node.js project designed for booking cabs from WhatsApp. It includes two sections: one for users who can book cabs via chat on WhatsApp, and another for owners who can use commands to confirm, cancel, or view all bookings.

User Section

Users can effortlessly book cabs via chat on the WhatsApp bot by selecting available options, making the cab booking process more user-friendly.

Owner Section

Owners are equipped with specific commands that can be sent as messages to the WhatsApp bot, enabling them to manage bookings efficiently. The available commands include:

Owner Commands

Additionally, other commands are option-based and can be selected as needed:

Owners can use these commands to interact with the WhatsApp bot and stay informed about bookings or mark them as completed.

User Booking Process Flow

  1. Ask for Name and Save

    • Gather user information and save the name.
  2. Ask for Local or Outstation

    • Prompt the user to choose between a local or outstation ride.
  3. Ask for Day or Night

    • Inquire whether the user prefers a day or night journey.
  4. Ask for One-way or Return:

    • 1: Proceed to Step 5 for one-way details.
    • 2: Move to Step 4 for return journey details.
  5. Ask for Charges/Booking:

    • 1: Display the rate card to the user.
    • 2: Continue to Step 5 to finalize the booking.
  6. Ask for Pickup Location

    • Collect information about the pickup location.
  7. Ask for Drop Location

    • Obtain details about the drop-off location.
  8. Ask for Date

    • Prompt the user to specify the date of the ride.
  9. Ask for Time

    • Inquire about the preferred time for the journey.
  10. Confirm the Booking:

    • 1: Proceed to Step 10 for confirmation and thank you message.
    • 2: Move to Step 11 to select additional options.
  11. Thank You Message and "Cancel" Option

    • Express gratitude to the user and provide an option to cancel the booking.
  12. Select Option:

    • 1: Go back to Step 2 and ask for day or night again.
    • 2: Proceed to Step 3 and ask for the type of service.
    • 3: Reset the state, stop the booking, and send a thank you message.
    • 4: Restart the process, reset the state, and send the initial message from Step 1.

Booking Confirmation Process

When a user books a cab, the system follows a confirmation process involving the owner. The booking goes through the following stages:

  1. User Books Cab:

    • User completes the booking process.
  2. Message Sent to Owner:

    • The system automatically sends a message to the owner informing them about the new booking.
  3. Owner Confirmation:

    • Owner reviews the booking details.
    • If the owner confirms the booking, the cab is marked as booked.
    • If the owner does not confirm, the booking remains in a pending phase.
    • if the owner reject the booking, its marked as Cancelled

This confirmation process ensures that the cab is only fully booked when the owner confirms the user's booking request.

Cab Status

1 - PENDING 2 - CONFIRMED 3 - CANCELLED 4 - COMPLETED

Scan the QR Code:

Scan the displayed QR code with your WhatsApp mobile app.


Technologies and Dependencies

This project utilizes the following technologies and dependencies:

Installation Guide

Prerequisites

Clone the Repository

git clone https://github.com/codeterrayt/WhatsAppCabBookingBot.git
cd WhatsAppCabBookingBot

Install Dependencies

npm install

Run Project

node index.js

Scan the QR Code:

Scan the displayed QR code with your WhatsApp mobile app.


WhatsApp Cab Booking Bot

Feel free to contribute to the project by submitting issues or pull requests.

Happy cab booking! 🚗✨