AI Taxi Dispatch Operator
Tags: devchallenge, twiliochallenge, ai, twilio
Published: 2024-06-23 22:57:27

*This is a submission for [Twilio Challenge v24.06.12](https://dev.to/challenges/twilio)*

## What I Built
<!-- Share an overview about your project. -->
Optimizing Business Efficiency with AI Operators
Many businesses spend hours daily taking orders over the phone from prospective clients, leading to less productive employee time and increased operational costs.

AI Operators can revolutionize this process by intuitively collecting orders from prospective clients and notifying the business through email or external APIs when an order is ready for fulfillment. This automation will enhance employee productivity and reduce business costs by streamlining the manual order collection process.

A compelling proof of concept for such AI Operators is the AI Taxi Dispatch Operator. This solution enables taxi companies to automate the booking process and dispatch drivers and vehicles using the company's dispatch system via APIs or manual assignments.

In this implementation, Twilio WhatsApp messaging is utilized to create an AI operator built with OpenAI technology. The AI operator gathers all necessary information from the user, sends out dispatch requests through the company's dispatch API, and notifies both the company and the user when a driver has been dispatched.

By integrating AI Operators, businesses can significantly improve efficiency, reduce costs, and provide better service to their clients.
## Demo
<!-- Share a link to your app and include some screenshots here. -->

### Github Repo
{% embed https://github.com/alabamustapha/twilio-taxi-operator %}

### Youtube Demo and Screenshots

#### Demo 1 
{% embed https://www.youtube.com/watch?v=cQwJxFGeb_E %}

#### Demo 2: App and Explanation 
{% embed https://youtu.be/pQlmuRrEmpI %}


![Bookings from database](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9epx13p3mn87aaj4hrt5.png)


![Twilio SMS Failover message](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vcqg78qkfyhnpnvymp0t.jpg)


![Email notifications to admin](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lkgoedk96org0cqjksae.png)


![Booking requested remain notifications](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/72z4cv2vdauwu7z63b9f.png)





## Twilio and AI
<!-- Tell us how you leveraged Twilio’s capabilities with AI -->
Twilio WhatsApp Messaging was used as the primary communication medium for the users. Messages sent to the WhatsApp number are processed through webhook by a web app built on Laravel. These incoming messages are sent to an AI assistant powered by the OpenAI GPT4 model. The AI assistance is tasked to handle the conversation until all required details to request a booking are provided after which the booking details is sent to the database for dispatching followed by email notification to admin and dispatch notification to the user with drivers details 

## Additional Prize Categories

<!-- Does your submission qualify for any additional prize categories (Twilio Times Two, Impactful Innovators, Entertaining Endeavors)? Please list all that apply.  -->

### Twilio Times Two
I used the Twilio WhatsApp Messaging feature for the interaction between the user and the operator. Twilio SMS Feature is used for failover notifications.

### Impactful Innovators
This product will help companies reduce operation costs, save time, and increase lead generation.


<!-- Team Submissions: Please pick one member to publish the submission and credit teammates by listing their DEV usernames directly in the body of the post. -->

<!-- Don't forget to add a cover image (if you want). -->

<!-- Thanks for participating! → -->