0% found this document useful (0 votes)
103 views74 pages

Final Project

Uploaded by

100Gaurav Mishra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
103 views74 pages

Final Project

Uploaded by

100Gaurav Mishra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

A PROJECT REPORT ON

ChatBot using Python

TITLE: ChatBot For Food delivery

Submitted in partial fulfillment of the requirement for the award of the degree of

MASTER OF COMPUTER APPLICATIONS

Submitted by:

Anmol Pandey University Roll No. 1102693

Under the Guidance of

Mrs. Neelam Singh


(Associate Professor)

Department of Computer Applications


Graphic Era (Deemed to be University)
Dehradun, Uttarakhand

April-2024
CANDIDATE’S DECLARATION
I/we hereby certify that the work which is being presented in the Project Report entitled
“ChatBot” in partial fulfillment of the requirements for the award of the Degree of Master
of Computer Applications in the Department of Computer Applications of the Graphic Era
(Deemed to be University), Dehradun shall be carried out by the undersigned under the
supervision of Mrs. Neelam Singh (Associate Professor) , Department of Computer
Applications, Graphic Era (Deemed to be University), Dehradun.

Name : Anmol Pandey University Roll no : 1102693


signature

The above mentioned students shall be working under the supervision of the
undersigned on the “ChatBot Using Python”

Signature Signature

Supervisor Head of the


Department

Internal Evaluation (By DPRC Committee)

Status of the Project Report: Accepted / Rejected

Any Comments:

Name of the Committee Members: Signature with Date

1.

2.

2
Table of Content
Page No.
Abstract
Acknowledgement
Chapter 1. Introduction
Chapter 2. System Analysis
2.1. Introduction
2.2 Objectives
2.3 Functional Requirenments
2.4 Non-Functional Requirenments
2.5 System Architecture
2.6 Data Flow
2.7 System Integration
Chapter 3. Identificaiton of Need
3.1. Current Challenges in Food Delivery
3.2. Benefits of Implementing Chatbot
3.3. Specific Needs Addressed by chatbot
Chapter 4. Preliminary Investigation
4.1. Current State Analysis
4.2. Problem Identification
4.3. Potential benefits of Chatbot
4.4. Feasibility Analysis
4.5. Scope and Requirements
4.6. StakeHolder Input
Chapter 5. Project Planning
5.1. Project Scope
5.2. Project Objectives
5.3. Resources Requirements
5.4. Timeline and MileStones
5.5. Risk Management
Chapter 6. Software Requirenments Specialization(SRS)
6.1. Scope
6.2. System Overview
6.3. System Architecture
6.4. Interface Requirnments
Chapter 7. Database Connectivity
7.1. Set up Database
7.1. Functions in the Database
Chapter 8. User Interface Design
8.1. HTML Code for Inteface
Chapter 9. Coding
9.1. Code for Integration of Dialogflow with Backend

3
9.2. Code fir integration of Dataabase with project
9.3. Generic helper Class
Chapter 10. Database Security
Chapter 11. Cost Estimation of the project
Chapter 12. Future Enhancements
Chapter 13. Pert Chart / Gaant Chart
13.1. Pert Chart
13.2. Gantt Chart
Chapter 13. Pert Chart / Gaant Chart
13.1. Pert Chart
13.2. Gantt Chart
Chapter 14. Glossary

4
Abstarct

This project aims to develop a chatbot using Python programming language to facilitate
natural language interactions between users and a food delivery service. Leveraging Python's
robust libraries and frameworks, including NLTK (Natural Language Toolkit) and
TensorFlow, the chatbot will employ machine learning and natural language processing
techniques to understand user queries, process orders, and provide personalized
recommendations. The project will follow a systematic approach, starting with data
collection and preprocessing, followed by model training and evaluation to ensure accurate
and contextually relevant responses. The chatbot will be integrated with existing food
delivery platforms, enabling users to place orders, track deliveries, and resolve inquiries
seamlessly. The outcomes of this project will include an efficient and user-friendly chatbot
solution that enhances customer experience, increases operational efficiency, and drives
business growth in the competitive food delivery services industry.

5
1. Introduction
In recent years, the healthcare industry has witnessed a rapid transformation driven by
advancements in technology. One of the notable innovations is the integration of artificial
intelligence (AI) and natural language processing (NLP) into healthcare services, leading to
the development of intelligent chatbots. These chatbots have the potential to revolutionize the
way healthcare services are delivered, offering efficiency, accessibility, and personalized
user experiences.

This project focuses on the development of a Chatbot for Medicine Delivery, leveraging the
capabilities of Dialogflow, a natural language understanding platform by Google. The
primary objective of this project is to streamline the process of ordering medicines, making it
more efficient and user-friendly for patients and healthcare providers alike.

The chatbot developed in this project is designed to handle various tasks, including receiving
medicine orders, providing information about available medicines, and updating users on the
status of their orders. The integration with a backend database ensures that the chatbot can
manage and retrieve data effectively, supporting real-time interactions and order processing.

Moreover, the project includes the creation of a user-friendly website that serves as an
interface for interacting with the chatbot. This website not only facilitates easy
communication between users and the chatbot but also provides additional functionalities
such as viewing order history, checking medicine availability, and accessing healthcare
information.

The need for such a chatbot arises from the increasing demand for efficient and accessible
healthcare services. Traditional methods of ordering medicines often involve long wait times,
manual processing, and limited accessibility, especially in remote areas. By introducing an
AI-powered chatbot, this project aims to address these challenges, providing a solution that is

6
available 24/7, capable of handling multiple queries simultaneously, and accessible from
anywhere with an internet connection.

The development of this chatbot involves several key steps, including designing the chatbot's
conversational flow, integrating Dialogflow with the backend database, and developing the
website interface. Each component is meticulously crafted to ensure a seamless user
experience and reliable performance.

This report will delve into the detailed methodology, system design, implementation process,
and testing strategies employed in the development of the Chatbot for Medicine Delivery.
Through this project, we aim to demonstrate the potential of AI in enhancing healthcare
services and provide a foundation for future innovations in this field.

7
2. System Analysis

2.1. Introduction
The food delivery industry has seen substantial growth, particularly with the advent of digital
platforms that streamline the process of ordering and delivering food. To further enhance
customer experience and operational efficiency, the integration of AI-powered chatbots has
become increasingly popular. This system analysis focuses on a food delivery chatbot
developed using Dialogflow, which includes HTML support for a user-friendly website and
database support for managing orders, menus, and customer information.

2.2. Objectives
The primary objectives of the food delivery chatbot system are:

 Automate Order Processing: Facilitate seamless and efficient order taking through
natural language interactions.
 Enhance User Experience: Provide a user-friendly interface for customers to interact
with the chatbot via a website.
 Efficient Data Management: Utilize a robust database to manage orders, customer
data, and menu items.
 Integrate Systems: Ensure smooth integration between the chatbot, database, and
website.

8
2.3. Functional Requirements
The functional requirements for implementing a chatbot in the food delivery services
industry encompass various aspects aimed at enhancing user experience, operational
efficiency, and business growth. Firstly, the chatbot should facilitate seamless order
placement, allowing users to browse menus, customize orders, and make payments
effortlessly. Integration with payment gateways and order management systems is essential
to ensure secure transactions and timely processing. Additionally, the chatbot should provide
real-time order tracking capabilities, enabling users to monitor the status of their orders and
receive updates on delivery times. This functionality enhances transparency and trust,
contributing to overall customer satisfaction. Furthermore, the chatbot should offer
personalized recommendations based on user preferences, order history, and dietary
restrictions, enhancing upselling opportunities and driving higher order values. It should also
provide responsive customer support, addressing inquiries, and resolving issues promptly to
maintain positive customer relationships. Operational functionalities such as automating
routine tasks, managing reservations, and analyzing customer data for insights and decision-
making are crucial for streamlining operations and driving business growth. Lastly, the
chatbot should be scalable and adaptable, capable of integrating with existing systems and
evolving alongside changing customer needs and technological advancements. By fulfilling
these functional requirements, the chatbot can effectively contribute to the success and
competitiveness of food delivery services in the dynamic market landscape.

2.4. Non-Functional Requirements


In addition to functional requirements, the implementation of a chatbot in the food delivery
services industry entails several crucial non-functional requirements to ensure optimal
performance, security, and scalability. Firstly, reliability is paramount, necessitating that the
chatbot operates consistently and efficiently without unexpected downtime or disruptions.
This reliability ensures that customers can access the service seamlessly, leading to
heightened satisfaction and trust in the platform. Secondly, scalability is essential to
accommodate fluctuating user demand, especially during peak hours or promotional periods.
The chatbot should be capable of handling increased traffic and user interactions without

9
sacrificing performance or responsiveness. Security is another critical consideration,
requiring robust measures to safeguard sensitive user data, payment information, and
transactional details. Implementing encryption, access controls, and compliance with data
protection regulations are imperative to mitigate cybersecurity risks and instill confidence in
users regarding their privacy and security. Moreover, performance optimization is essential
to ensure that the chatbot delivers prompt responses and operates efficiently across various
devices and platforms. This includes optimizing response times, minimizing latency, and
optimizing resource utilization to enhance user experience. Lastly, maintainability is crucial
for the long-term sustainability of the chatbot, necessitating clear documentation, modular
design, and regular updates to address bugs, incorporate new features, and adapt to evolving
user needs and technological advancements. By addressing these non-functional
requirements comprehensively, the chatbot can deliver a robust, secure, and scalable solution
that enhances customer satisfaction and drives business success in the competitive food
delivery services landscape.

2.5. System Architecture


The food delivery chatbot system comprises the following components:

1. Dialogflow Chatbot

 Handles natural language understanding and processing.

 Manages conversations with users, including order taking and responding to


queries.

2. HTML Support Website

 Provides a graphical user interface for users to interact with the chatbot.

 Displays menu items, allows users to place orders, and manage their accounts.

3. Database

 Stores user information, order details, menu items, and transaction records.

 Ensures data integrity and supports efficient data retrieval and updates.

10
4. Integration Layer

 Facilitates communication between the chatbot, database, and website.

 Ensures seamless data exchange and synchronization across all components.

2.6. Data Flow


1. User Interaction with Chatbot

 Users interact with the chatbot via the website or other messaging platforms.

 The chatbot processes user inputs, queries the database if needed, and
responds accordingly.

2. Order Placement

 The chatbot guides users through the order placement process.

 Order details are captured and stored in the database.

 Confirmation and order status updates are communicated back to the user.

3. Menu Management

 The system retrieves the latest menu information from the database.

 Users can browse the menu, and the chatbot can provide detailed information
about specific items.

4. Account Management

 Users can create and manage their accounts through the website.

 Account details are stored in the database, and any updates are synchronized.

2.7. System Integration

11
 Dialogflow and Database Integration

 Dialogflow's webhook functionality is used to connect the chatbot with the


backend database.

 Fulfillment scripts handle database queries and updates based on user


interactions.

 Website and Chatbot Integration

 The website embeds the chatbot interface, allowing users to interact with the
chatbot directly.

 API calls facilitate data exchange between the website and chatbot.

 Database and Website Integration

 The website retrieves and displays data from the database, such as menu items
and user order history.

 Any updates made via the website are reflected in the database and
synchronized with the chatbot.

12
3. Identification of Need
In the contemporary digital landscape, businesses and services continuously seek ways to
enhance user experience, streamline operations, and maintain a competitive edge. Chatbots,
powered by artificial intelligence (AI) and natural language processing (NLP), have emerged
as a vital tool in achieving these goals. This section explores the specific needs and
motivations behind developing a chatbot project, particularly in the context of food delivery
services.

3.1. Current Challenges in Food Delivery Services


Food delivery services face several challenges in the current landscape. One major challenge
is the high level of competition in the market, with numerous platforms vying for market
share. This intense competition can lead to price wars and reduced profit margins for food
delivery companies. Additionally, ensuring timely and efficient delivery remains a challenge,
especially during peak hours or in densely populated areas where traffic congestion and
delivery logistics can cause delays.

Another significant challenge is maintaining food quality and safety standards throughout the
delivery process. Ensuring that food remains fresh and uncontaminated during transportation
requires robust packaging and handling protocols. Moreover, addressing dietary restrictions,
allergies, and food preferences accurately adds complexity to the ordering process and
increases the risk of errors.

Furthermore, labor issues, including driver shortages and labor disputes, can impact the
availability and reliability of delivery personnel. Ensuring fair compensation and working
conditions for delivery drivers while balancing the operational costs of the business poses a
continuous challenge for food delivery companies.

Regulatory compliance is also a significant concern, with various jurisdictions imposing


regulations on food delivery services regarding food safety standards, labor practices, and
data privacy. Navigating these regulations while maintaining operational efficiency can be
challenging, particularly for companies operating across multiple regions.

13
Lastly, technological advancements and consumer preferences are constantly evolving,
requiring food delivery services to innovate and adapt quickly to stay competitive. This
includes investing in advanced delivery tracking systems, mobile apps, and AI-driven
personalization to enhance the user experience and meet evolving customer expectations.

Addressing these challenges requires a holistic approach that integrates technological


innovation, operational efficiency, regulatory compliance, and a focus on customer
satisfaction. By effectively navigating these challenges, food delivery services can maintain
their competitive edge and sustain long-term success in the dynamic and rapidly evolving
market landscape.

3.2. Benefits of Implementing a Chatbot


Implementing a chatbot in the food delivery services industry can bring several benefits to
both businesses and customers. Firstly, chatbots provide 24/7 availability, allowing
customers to place orders, track deliveries, and resolve queries at any time of the day,
enhancing convenience and accessibility. This round-the-clock support can lead to increased
customer satisfaction and loyalty.

Additionally, chatbots streamline the ordering process by providing a user-friendly interface


for placing orders and customizing preferences. By leveraging natural language processing
(NLP) capabilities, chatbots can understand and process complex orders, dietary restrictions,
and special requests accurately, reducing errors and enhancing the overall ordering
experience.

Moreover, chatbots can offer personalized recommendations based on user preferences, order
history, and browsing behavior, enhancing upselling and cross-selling opportunities for food
delivery businesses. By analyzing customer data and behavior, chatbots can suggest relevant
menu items, promotions, and discounts, driving higher order values and revenue generation.

Furthermore, chatbots can improve operational efficiency by automating routine tasks such
as order processing, reservation management, and customer support inquiries. This

14
automation frees up human resources to focus on more complex tasks and enhances overall
productivity.

In terms of customer support, chatbots can provide instant assistance and resolve common
queries and issues without the need for human intervention. This reduces wait times for
customers and improves response times, leading to higher levels of customer satisfaction and
retention.

Moreover, chatbots can integrate with existing systems and platforms, including websites,
mobile apps, and social media channels, providing a seamless omnichannel experience for
customers. This consistency across channels enhances brand visibility and strengthens
customer engagement and loyalty.

Overall, implementing a chatbot in the food delivery services industry can lead to improved
customer satisfaction, increased sales, enhanced operational efficiency, and strengthened
competitive advantage. By leveraging chatbot technology, food delivery businesses can meet
the evolving needs and expectations of customers in a fast-paced and competitive market
landscape.

3.3. Specific Needs Addressed by the Chatbot


The implementation of a chatbot in the food delivery services industry addresses several
specific needs, enriching both customer experience and operational efficiency. Firstly, the
chatbot fulfills the demand for instant accessibility and responsiveness by providing 24/7
availability for placing orders, tracking deliveries, and resolving inquiries. This addresses the
modern consumer's desire for convenience, allowing them to engage with the service at their
convenience, whether during peak hours, late nights, or weekends. Moreover, the chatbot
streamlines the ordering process by offering a user-friendly interface that accommodates
diverse preferences and dietary requirements. Through natural language processing (NLP)
capabilities, the chatbot accurately interprets and processes complex orders and
customizations, minimizing errors and enhancing order accuracy. Additionally, by providing
personalized recommendations based on user preferences and order history, the chatbot

15
facilitates upselling and cross-selling opportunities, thereby increasing revenue potential for
food delivery businesses. Operationally, the chatbot automates routine tasks such as order
processing, reservation management, and customer support inquiries, freeing up human
resources to focus on more strategic initiatives. By addressing these specific needs, the
chatbot not only enhances customer satisfaction and loyalty but also drives operational
efficiency and revenue growth in the competitive food delivery services industry.

16
4. Preliminary Investigation
The preliminary investigation for the Food Delivery Chatbot project involves understanding
the current state of food delivery services, identifying existing problems, exploring potential
solutions, and determining the feasibility of developing a chatbot to address these issues.
This investigation is crucial in laying the foundation for the project and ensuring its
alignment with business goals and customer needs.

Objectives

The primary objectives of the preliminary investigation are:

1. To analyze the current food delivery process and identify pain points.

2. To evaluate the potential benefits of implementing a chatbot.

3. To assess the technical and operational feasibility of the project.

4. To define the scope and requirements of the chatbot system.

5. To gather stakeholder input and ensure alignment with business objectives.

4.1. Current State Analysis


1. Order Processing

 Orders are typically received through phone calls, mobile apps, or websites.

 Manual order processing can lead to errors and delays, especially during peak
hours.

2. Customer Support

 Customer inquiries about menu items, delivery status, and issues are handled
by human agents.

17
 Limited availability and long wait times can result in poor customer
satisfaction.

3. Scalability Issues

 During high demand periods, existing systems and staff may struggle to
handle the volume of orders and inquiries.

 Scaling the operation requires additional resources, which can be costly and
time-consuming.

4. User Experience

 Customers expect quick, efficient, and personalized service.

 The current system may not provide a consistent user experience due to
variability in human agent interactions.

4.2. Problem Identification


1. Operational Inefficiencies

 High operational costs due to the need for extensive customer support staff.

 Delays in order processing and handling customer inquiries.

2. Customer Dissatisfaction

 Long wait times for placing orders and receiving support.

 Inconsistent service quality affecting overall customer experience.

3. Data Management

 Inefficient handling of customer data and order information.

 Lack of real-time data analysis to inform business decisions and improve


services.

18
4.3. Potential Benefits of a Chatbot
1. Automation of Order Processing

 Automates the entire order process, reducing the likelihood of errors and
speeding up order fulfillment.

2. 24/7 Customer Support

 Provides round-the-clock assistance to customers, improving accessibility and


satisfaction.

3. Cost Reduction

 Reduces the need for a large customer support team, leading to significant
cost savings.

4. Scalability

 Easily scales to handle an increasing number of users and orders without


additional resources.

5. Personalized Service

 Leverages user data to provide tailored recommendations and responses,


enhancing user experience.

6. Data Collection and Analysis

 Collects valuable data on customer behavior and preferences, aiding in data-


driven decision-making.

4.4. Feasibility Analysis


1. Technical Feasibility

 Technology Availability: Dialogflow offers robust natural language


processing capabilities suitable for building the chatbot.

19
 Integration Capabilities: Existing APIs and webhook functionalities allow
for seamless integration with the database and website.

 Development Resources: Availability of skilled developers proficient in


Dialogflow, web development, and database management.

2. Operational Feasibility

 Stakeholder Support: Initial feedback from stakeholders indicates strong


support for the project.

 Change Management: Training and support for staff to adapt to the new
system can be managed effectively.

 Infrastructure: Existing IT infrastructure can support the new system with


minor upgrades.

3. Economic Feasibility

 Cost-Benefit Analysis: Initial investment in development and integration is


offset by long-term cost savings and increased revenue from improved
customer satisfaction.

 Funding Availability: Budget allocation for the project is feasible within the
current financial planning.

4.5. Scope and Requirements


1. Functional Requirements

 User Interaction: The chatbot must handle natural language inputs for
placing orders, answering queries, and providing order updates.

 Order Management: Facilitate new orders, customization, and order


tracking.

 Menu Information: Provide up-to-date menu details and recommendations.

20
 User Account Management: Allow users to create and manage their
accounts.

2. Non-Functional Requirements

 Performance: The chatbot should respond in real-time with minimal latency.

 Reliability: Ensure high availability and minimal downtime.

 Security: Protect user data and comply with data protection regulations.

 Usability: Design an intuitive interface for both the chatbot and the
supporting website.

3. Integration Requirements

 Database: Integration with a relational database for managing orders,


customer data, and menu items.

 Website: Integration with the existing website to provide a seamless user


experience.

4.6. Stakeholder Input


1. Business Owners and Managers

 Emphasize the need for reducing operational costs and improving customer
satisfaction.

 Support for leveraging technology to gain a competitive edge in the market.

2. Customer Support Staff

 Concerns about job security but positive about reducing repetitive tasks.

 Interest in training and development opportunities related to the new system.

3. Customers

21
 Desire for quicker service, real-time order tracking, and personalized
interactions.

 Positive feedback on the concept of a 24/7 available chatbot.

22
5. Project Planning
Effective project planning is crucial for the successful implementation of the Food Delivery
Chatbot. This phase involves defining the project scope, setting objectives, determining
resource requirements, creating a timeline, and identifying potential risks and mitigation
strategies. The following sections outline a comprehensive project plan for developing a food
delivery chatbot using Dialogflow, integrating it with a database, and providing a user-
friendly web interface.

5.1. Project Scope


The project aims to develop a chatbot for a food delivery service, which will:

1. Automate Order Processing: Allow users to place, customize, and track food orders
through natural language interactions.

2. Enhance Customer Support: Provide 24/7 customer support, answering queries


about menu items, delivery status, and other common inquiries.

3. Integrate with Existing Systems: Seamlessly integrate with the existing database
and website to ensure smooth data flow and user experience.

4. Collect and Analyze Data: Gather data on user interactions and preferences to
inform business decisions and improve services.

5.2. Project Objectives


1. Develop a Dialogflow Chatbot: Create a chatbot that can understand and respond to
user queries in natural language.

2. Create a User-Friendly Website: Develop a website interface that integrates with


the chatbot and provides an intuitive user experience.

23
3. Database Integration: Ensure the chatbot and website can interact with a backend
database for order management and user data.

4. Testing and Deployment: Conduct thorough testing to ensure the system's reliability,
performance, and security before deploying it.

5.3. Resource Requirements


1. Human Resources

 Project Manager

 Dialogflow Developer

 Web Developer

 Database Administrator

 UI/UX Designer

 Quality Assurance (QA) Tester

 Content Writer (for chatbot scripts and website content)

2. Technical Resources

 Dialogflow Platform Access

 Web Development Tools (HTML, CSS, JavaScript)

 Database Management System (e.g., MySQL, PostgreSQL)

 Hosting Services for the website and database

 Development and Testing Environments

3. Budget

 Costs for platform subscriptions, development tools, and hosting services.

 Salaries for project team members.

24
 Contingency fund for unexpected expenses.

5.4. Timeline and Milestones


1. Project Initiation (2 Weeks)

 Define project scope and objectives.

 Assemble project team.

 Conduct initial stakeholder meetings.

 Finalize project plan and timeline.

2. Requirement Analysis (3 Weeks)

 Gather detailed requirements from stakeholders.

 Document functional and non-functional requirements.

 Create use case scenarios and user stories.

3. Design Phase (4 Weeks)

 Design the chatbot conversational flow.

 Create wireframes and mockups for the website.

 Design the database schema.

 Review and finalize designs with stakeholders.

4. Development Phase (10 Weeks)

 Develop the Dialogflow chatbot.

 Build the website interface and integrate it with the chatbot.

 Implement the backend database and integrate it with the chatbot and website.

 Conduct unit testing during development.

25
5. Testing Phase (4 Weeks)

 Perform comprehensive testing, including functional, performance, and


security testing.

 Conduct user acceptance testing (UAT) with a select group of users.

 Identify and fix bugs or issues.

6. Deployment Phase (2 Weeks)

 Prepare deployment plan.

 Deploy the chatbot, website, and database to the production environment.

 Monitor initial usage and address any post-deployment issues.

7. Post-Deployment Support (Ongoing)

 Provide ongoing maintenance and support.

 Gather user feedback and make necessary improvements.

 Regularly update the chatbot and website based on new requirements and
feedback.

5.5. Risk Management


1. Potential Risks

 Technical Challenges: Issues with integrating Dialogflow with the database


and website.

 Resource Constraints: Unavailability of key team members or budget


overruns.

 Security Vulnerabilities: Data breaches or unauthorized access to user


information.

 User Acceptance: Resistance from users in adopting the new system.

26
2. Mitigation Strategies

 Technical Training: Provide training for team members on Dialogflow and


integration techniques.

 Resource Planning: Ensure backup resources and maintain a contingency


budget.

 Security Measures: Implement robust security protocols and conduct regular


security audits.

 User Engagement: Conduct user training sessions and gather feedback to


improve user acceptance.

27
6. Software Requirement Specifications (SRS)
This Software Requirement Specification (SRS) document outlines the functional and non-
functional requirements, system architecture, and other critical aspects of the Food Delivery
Chatbot project. The chatbot will automate order processing, provide customer support, and
integrate seamlessly with a website and a backend database.

The purpose of this SRS document is to detail the specifications and requirements for the
development and implementation of a food delivery chatbot using Dialogflow, supported by
a website and a database. This document serves as a guide for developers, designers, and
stakeholders to ensure a clear understanding of the project’s objectives and functionalities.

6.1. Scope
The food delivery chatbot project includes:

 Development of a Dialogflow-based chatbot.

 Integration with a web interface for user interactions.

 Connectivity with a backend database to manage orders, menu items, and customer
information.

 Provision of 24/7 customer support through the chatbot.

 Real-time order tracking and status updates.

6.2. System Overview


The system comprises the following components:

1. Dialogflow Chatbot: Handles natural language processing, understands user queries,


and facilitates order processing.

28
2. Web Interface: A user-friendly website where customers can interact with the
chatbot, browse the menu, place orders, and manage their accounts.

3. Database: Stores customer data, order details, menu items, and transaction history,
ensuring data integrity and accessibility.

4. Integration Layer: Ensures seamless communication between the chatbot, website,


and database.

6.3. System Architecture


1. Dialogflow Chatbot

 Utilizes Dialogflow for natural language processing and intent recognition.

 Handles user interactions and processes orders.

2. Web Interface

 Developed using HTML, CSS, and JavaScript.

 Integrates with the chatbot and provides a user-friendly platform for


interactions.

3. Database

 A relational database (e.g., MySQL, PostgreSQL) to store user data, orders,


and menu information.

 Ensures data consistency and supports efficient data retrieval and updates.

4. Integration Layer

 API calls and webhooks facilitate communication between the chatbot,


database, and website.

 Ensures data synchronization across all components.

29
6.4. Interface Requirements
1. User Interface (UI)

 A clean, intuitive design for the website and chatbot interface.

 Responsive design to ensure usability across various devices (desktops,


tablets, smartphones).

2. API and Webhooks

 APIs to facilitate communication between the chatbot and the database.

 Webhooks for real-time data updates and event handling.

30
7. DataBase Connectivity
To integrate the Dialogflow chatbot with the database and create a seamless flow for your
food delivery project, follow these steps for database connectivity. I'll assume you're using a
typical web stack with [Link] for the server-side logic. Below is a comprehensive guide
including necessary configurations and sample code.

Step-by-Step Guide for Database Connectivity

7.1. Set Up Your Database


Ensure your database is properly set up with the required tables and relationships. For
example, using MySQL, your database schema might include tables such as Medicine Items,
Orders and Order Tracking.

CREATE DATABASE Pandeji_Medical;

USE Pandeji_Medical;

CREATE TABLE Medicine_Items (

itemid INT AUTO_INCREMENT PRIMARY KEY,

name VARCHAR(100),

price INT

);

31
CREATE TABLE Orders (

orderId INT AUTO_INCREMENT PRIMARY KEY,

itemId INT,

quantity INT,

totalPrice INT

);

32
CREATE TABLE OrderTracking (

orderId INT AUTO_INCREMENT PRIMARY KEY,

status VARCHAR(20) ,

FOREIGN KEY (OrderId) REFERENCES Orders(OrderId),

);

ER Diagram for the database

7.2 Function in the Database

 To get price for items

33
CREATE DEFINER=`root`@`localhost` FUNCTION
`get_price_for_item`(p_item_name VARCHAR(255)) RETURNS decimal(10,2)
DETERMINISTIC
BEGIN
DECLARE v_price DECIMAL(10, 2);

-- Check if the item_name exists in the food_items table


IF (SELECT COUNT(*) FROM food_items WHERE name = p_item_name) > 0
THEN
-- Retrieve the price for the item
SELECT price INTO v_price
FROM food_items
WHERE name = p_item_name;

RETURN v_price;
ELSE
-- Invalid item_name, return -1
RETURN -1;
END IF;
END

Result is :

34
 To get total order Price

CREATE DEFINER=`root`@`localhost` FUNCTION `get_total_order_price`(p_order_id


INT) RETURNS decimal(10,2)

DETERMINISTIC

BEGIN

DECLARE v_total_price DECIMAL(10, 2);

-- Check if the order_id exists in the orders table

IF (SELECT COUNT(*) FROM orders WHERE order_id = p_order_id) > 0 THEN

-- Calculate the total price

SELECT SUM(total_price) INTO v_total_price

FROM orders

WHERE order_id = p_order_id;

RETURN v_total_price;

ELSE

-- Invalid order_id, return -1

RETURN -1;

END IF;

END

35
Result is :

36
8. User Interface Design
A well-designed user interface (UI) is essential for ensuring a smooth and intuitive user experience.
For this food delivery chatbot project, we'll focus on creating a clean, user-friendly interface that
allows users to interact easily with the chatbot. Below, I'll outline the key components and provide a
sample HTML, CSS, and JavaScript implementation for the UI.

Key Components of the UI

1. Header: Display the name and logo of the service.

2. Chat Window: A section where users can see the conversation with the chatbot.

3. Input Field: An input box for users to type their messages.

4. Send Button: A button to send the message.

5. Order Summary: A section to display the user's order summary (optional).

8.1. HTML Code for Interface:

<!DOCTYPE html>

<html>

<head>

<link rel="stylesheet" type="text/css" href="[Link]">

<link href="[Link]
rel="stylesheet">

<style>

body {

font-family: 'Roboto', sans-serif;

margin: 0;

37
padding: 0;

background-color: #f4f4f4;

color: #333;

.container {

max-width: 1200px;

margin: auto;

padding: 20px;

header {

background-color: #333;

color: white;

padding: 10px 0;

nav {

text-align: center;

nav a {

color: white;

text-decoration: none;

margin: 0 15px;

font-weight: 700;

transition: color 0.3s;

38
nav a:hover {

color: #ddd;

#home img {

width: 100%;

height: auto;

border-radius: 8px;

box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);

margin-bottom: 20px;

.photo-container {

display: flex;

justify-content: space-between;

flex-wrap: wrap;

margin: 20px 0;

.image-container {

position: relative;

width: 30%;

margin: 10px 0;

.image-container img {

width: 100%;

height: auto;

39
border-radius: 8px;

transition: transform 0.3s;

.image-container:hover img {

transform: scale(1.05);

.overlay {

position: absolute;

top: 0;

left: 0;

width: 100%;

height: 100%;

background-color: rgba(0, 0, 0, 0.5);

color: #fff;

display: flex;

align-items: center;

justify-content: center;

font-size: 18px;

opacity: 0;

transition: opacity 0.3s;

border-radius: 8px;

.image-container:hover .overlay {

opacity: 1;

40
}

.text-container {

display: flex;

flex-wrap: wrap;

justify-content: space-between;

margin: 20px 0;

.text-view {

flex: 1;

padding: 20px;

background-color: #fff;

margin: 10px;

border-radius: 8px;

box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);

transition: transform 0.3s, box-shadow 0.3s;

.text-view:hover {

transform: translateY(-5px);

box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);

.text-view h3 {

margin-top: 0;

section {

41
margin: 20px 0;

padding: 20px;

background-color: #fff;

border-radius: 8px;

box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);

#location, #contactus {

text-align: center;

#location h2, #contactus h2 {

margin-top: 0;

.chat-bot {

display: block;

margin: 20px auto;

border: none;

border-radius: 8px;

box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);

</style>

</head>

<body>

<div class="container">

<header>

42
<nav>

<a href="#home">HOME</a> |

<a href="#menu">MENU</a> |

<a href="#location">LOCATION</a> |

<a href="#aboutus">ABOUT US</a> |

<a href="#contactus">CONTACT US</a>

</nav>

</header>

<section id="home">

<img src="banner_m.jpg" alt="Banner Image">

</section>

<div class="photo-container">

<div class="image-container">

<img class="image" src="[Link]" alt="Azrithromycin">

<div class="overlay">113.23 Rs/ </div>

</div>

<div class="image-container">

<img class="image" src="[Link]" alt="Dolo 650">

<div class="overlay">27 Rs/</div>

</div>

<div class="image-container">

<img class="image" src="[Link]" alt="Norflox-TZ">

43
<div class="overlay">89 Rs/ </div>

</div>

</div>

<div class="text-container">

<div class="text-view">

<h3>Azrithromycin</h3>

<p>Azithromycin, sold under the brand names Zithromax and Azasite, is an antibiotic
medication used for the treatment of a number of bacterial infections.</p>

</div>

<div class="text-view">

<h3>Dolo-650</h3>

<p>Dolo 650 can be used for headaches, mild to high fevers, and any other type of bodily
aches.</p>

</div>

<div class="text-view">

<h3>Norflox-TZ</h3>

<p>Norflox TZ tablet treats diarrhoea and dysentery caused by amoebas, bacteria, or other
mixed organisms.</p>

</div>

</div>

<div class="photo-container">

<div class="image-container">

<img class="image" src="[Link]" alt="Meftal Forte">

44
<div class="overlay">120 Rs/ </div>

</div>

<div class="image-container">

<img class="image" src="[Link]" alt="Calcium Tablets">

<div class="overlay">220 Rs/ </div>

</div>

<div class="image-container">

<img class="image" src="[Link]" alt="Pregablin">

<div class="overlay">180 Rs/ </div>

</div>

</div>

<div class="text-container">

<div class="text-view">

<h3>Meftal forte</h3>

<p>Meftal Forte is used to relieve pain associated with muscles and joints, headache,
migraine, back pain, pain due to sprain, strain and injury, post-operative pain and dental pain.</p>

</div>

<div class="text-view">

<h3>Calcium Tablets</h3>

<p>Calcium supplements are salts of calcium used in a number of conditions.


Supplementation is generally only required when there is not enough calcium in the diet.</p>

</div>

<div class="text-view">

45
<h3>Pregablin</h3>

<p>Pregabalin is used to treat epilepsy and anxiety. It's also taken to treat nerve pain. Nerve
pain can be caused by different conditions including diabetes and shingles, or an injury.</p>

</div>

</div>

<div class="photo-container">

<div class="image-container">

<img class="image" src="[Link]" alt="Vitamin Tablets">

<div class="overlay">190 Rs/ </div>

</div>

<div class="image-container">

<img class="image" src="[Link]" alt="Paracetamol">

<div class="overlay">21.22 Rs/ </div>

</div>

<div class="image-container">

<img class="image" src="[Link]" alt="Azrithromycin">

<div class="overlay">123 Rs/ </div>

</div>

</div>

<div class="text-container">

<div class="text-view">

<h3>Vitamin Tablets</h3>

46
<p>Vitamin D is a group of fat-soluble secosteroids responsible for increasing intestinal
absorption of calcium, magnesium, and phosphate, and for many other biological effects.</p>

</div>

<div class="text-view">

<h3>Paracetamol</h3>

<p>It belongs to a group of medicines called analgesics (painkillers) and is used to treat
pain (including headache, toothache, back and period pain) and cold or flu symptoms.</p>

</div>

<div class="text-view">

<h3>Azrithomycin</h3>

<p>Azithromycin, sold under the brand names Zithromax and Azasite, is an antibiotic
medication used for the treatment of a number of bacterial infections.</p>

</div>

</div>

<section id="location">

<h2>Location</h2>

<p>38 Patli Gali, Mumbai</p>

<!-- Add map widget here -->

</section>

<section id="contactus">

<h2>Contact Us</h2>

<p>Got questions? Want to place an order? Call us at +91791234567 or email us at


info@[Link]</p>

47
</section>

<iframe class="chat-bot" width="350" height="430" allow="microphone;"


src="[Link]
900141125af4"></iframe>

</div>

</body>

</html>

48
9. Coding

9.1. Code for integration of DialogFlow with backend


from dns import rcode

from fastapi import FastAPI

from fastapi import Request

import db_helper

from [Link] import JSONResponse

import generic_helper

import stripe

import json

import os

app = FastAPI()

inprogress_orders = {}

stripe.api_key =
'sk_live_51PH4rmSH11E0ZkqDMor95GzIqXoMaUiQYesL8NXSUqWLWmgivYjrXQoMs
ogAgcn0ZdNdkG8LSpa2WcTbMsVmdna300oInNruv0'

@[Link]("/")

async def handle_request(request: Request):

49
payload = await [Link]()

intent = payload['queryResult']['intent']['displayName']

parameters = payload['queryResult']['parameters']

output_contexts = payload['queryResult']['outputContexts']

session_id = generic_helper.extract_session_id(output_contexts[0]['name'])

intent_handler_dict = {

'[Link] -context:ongoing-order': add_to_order,

'Order Complete - context : order-ongoing': order_complete,

'Track order - context: ongoing-tracking': track_order

if intent in intent_handler_dict:

# Call the corresponding function based on the intent

return intent_handler_dict[intent](parameters , session_id )

else:

# Handle the case when the intent is not found in the dictionary

return JSONResponse(content={"error": "Intent not found"})

50
def add_to_order(parameters: dict , session_id : str):

medicines = [Link]('Medicines', [])

quantity = [Link]('number', [])

# Check if both medicines and quantities are provided

if not quantity or not medicines:

return JSONResponse(content={"fulfillmentText": "Please provide both medicine


names and quantities."})

# Ensure all quantities are valid integers

try:

quantities = [int(qty) for qty in quantity]

except ValueError:

return JSONResponse(content={"fulfillmentText": "Invalid quantity format. Please


provide valid integers."})

# Check if the lengths of medicines and quantities match

if len(medicines) != len(quantities):

51
return JSONResponse(content={"fulfillmentText": "Please specify the quantity for each
medicine."})

else:

new_food_dict = dict(zip(medicines , quantity))

if session_id in inprogress_orders:

current_food_dict = inprogress_orders[session_id]

current_food_dict.update(new_food_dict)

inprogress_orders[session_id] = current_food_dict

else:

inprogress_orders[session_id] = new_food_dict

order_str = generic_helper.get_str_from_food_dict(inprogress_orders[session_id])

fulfillment_text = f"So far you have {order_str} in your order. Do you want anything
else?"

return JSONResponse(content={"fulfillmentText": fulfillment_text})

def order_complete(parameters: dict, session_id: str):

52
if session_id not in inprogress_orders:

fulfillment_text = "I am having trouble finding your order. Sorry! Can you place a new
order?"

else:

order = inprogress_orders[session_id]

order_id = save_to_db(order)

if order_id == -1:

fulfillment_text = "Sorry, I couldn't process your order due to some errors."

else:

order_total = db_helper.get_total_order_price(order_id)

fulfillment_text = (

f"Awesome. I have placed your order. "

f"Here is your order id #{order_id}. "

f"Your order total is {order_total}. "

f"To complete the payment, click [here]."

# Call a function to initiate the payment

client_secret = process_payment(int(order_total), 'inr')

if client_secret:

fulfillment_text += f" Your payment intent client secret is: {client_secret}"

else:

53
fulfillment_text += " There was an error processing your payment. Please try again
later."

del inprogress_orders[session_id]

return JSONResponse(content={

"fulfillment_text": fulfillment_text

})

def process_payment(amount, currency):

try:

payment_intent = [Link](

amount=amount,

currency=currency,

payment_method_types=['card']

return payment_intent.client_secret

except [Link] as e:

# Handle payment error

return None

def save_to_db(order : dict):

next_order_id = db_helper.get_nxt_order_id()

for medicines , quantity in [Link]():

54
db_helper.insert_order_items(

medicines ,

quantity ,

next_order_id

if rcode == -1:

return -1

print("hello 1 ")

print("hello 2 ")

return next_order_id

def track_order(parameters: dict):

order_id = [Link]('number', None)

if order_id is None:

return JSONResponse(content={"fulfillmentText": " 1 - Please provide a valid order


number."})

order_status = db_helper.get_order_status(order_id)

55
if order_status:

fulfilment_text = f"The order status for order id: {order_id} is: {order_status}"

else:

fulfilment_text = f"No order found with order id: {order_id}"

return JSONResponse(content={"fulfillmentText": fulfilment_text})

9.2. Code for integration of Database with Project


import [Link]

global cnx

cnx = [Link](

host="localhost",

user="root",

password="Gaurav@1510",

database="pandeyji_eatery"

def get_total_order_price(order_id):

cursor = [Link]()

56
query = f"SELECT get_total_order_price({order_id})"

[Link](query)

result = [Link]()[0]

[Link]()

return result

def insert_order_tracking(order_id , status):

cursor = [Link]()

insert_query = "INSERT INTO order_tracking (order_id , status) VALUES (%s ,%s)"

[Link](insert_query)

[Link]()

[Link]()

def insert_order_items(medicines, quantity, order_id):

try:

cursor = [Link]()

# Assuming 'insert_order_item' is the correct name of the stored procedure

57
[Link]('insert_order_item', (medicines, quantity, order_id))

[Link]()

[Link]()

return 1

except [Link] as err:

[Link]()

print("MySQL Error:", err)

return -1

def get_order_status(order_id):

global cnx # Access the global connection variable

cursor = [Link]()

query = "SELECT status FROM order_tracking WHERE order_id = %s" # Correct


placeholder syntax

try:

if isinstance(order_id, list):

order_id = order_id[0] # Assuming you're expecting only one order ID

order_id = int(order_id)

58
[Link](query, (order_id,))

result = [Link]()

except ([Link], ValueError) as e:

print("Error executing MySQL query:", e)

result = None

[Link]()

# Do not close connection here

if result is not None:

return result[0]

else:

return None

def get_nxt_order_id():

cursor = [Link]() # Create a cursor

query = "SELECT MAX(order_id) FROM orders"

[Link](query)

result = [Link]()[0]

59
[Link]()

if result is None:

return 1

else:

return result + 1

9.3. Generic Helper Class

import re

def extract_session_id(session_str : str):

import re

match = [Link](r"/sessions/(.*?)/contexts/",session_str)

if match:

extracted_string = [Link](1)

return extracted_string

return ""

def get_str_from_food_dict(food_dict):

return ", ".join([f"{int(value)} {key}" for key , value in food_dict.items()])

60
if __name__ =="__main__":

print(get_str_from_food_dict({"samosa":2 , "chole":5}))

61
10. Database security

Ensuring robust database security is essential for safeguarding sensitive information in your
medicine delivery chatbot project. Implementing stringent measures to protect data
integrity, confidentiality, and availability is paramount. This includes employing encryption
techniques to secure data both in transit and at rest, ensuring that sensitive information such
as user credentials and medical records are encrypted to prevent unauthorized access.
Implementing access controls and role-based permissions helps restrict database access to
authorized personnel only, reducing the risk of insider threats or unauthorized data
breaches. Regular security audits and vulnerability assessments should be conducted to
identify and address potential security weaknesses proactively. Additionally, implementing
measures such as database activity monitoring and logging can help detect and mitigate any
suspicious activities or unauthorized access attempts in real-time. Continuously updating
and patching database software and operating systems helps mitigate vulnerabilities and
ensure the latest security patches are applied. Lastly, implementing robust backup and
disaster recovery procedures ensures that data can be recovered in the event of a security
incident or system failure, minimizing the impact on operations and maintaining data
availability. By prioritizing database security measures, your project can effectively mitigate
risks and uphold the confidentiality, integrity, and availability of sensitive information.

62
11. Cost Estimation of the Project

Estimating the cost of developing a Food Delivery Chatbot project specifically in India
involves considering local rates for developers, infrastructure, and operational costs. Below is
a detailed cost estimation considering typical rates in India.

1. Development Costs

a. Personnel Costs:

 Developers:

 Backend Developer (Python, Flask): ₹1,000/hr

 Frontend Developer (HTML, CSS, JavaScript): ₹800/hr

 Database Administrator (MySQL): ₹1,200/hr

Assume:

 Backend development: 200 hours

 Frontend development: 150 hours

 Database setup and integration: 50 hours

Cost Calculation:

 Backend: 200 hours * ₹1,000/hr = ₹200,000

 Frontend: 150 hours * ₹800/hr = ₹120,000

 Database: 50 hours * ₹1,200/hr = ₹60,000

Total Personnel Costs: ₹200,000 + ₹120,000 + ₹60,000 = ₹380,000

b. Project Management:

 Project Manager: ₹1,500/hr, 50 hours = ₹75,000

c. Design:

63
 UI/UX Designer: ₹800/hr, 50 hours = ₹40,000

2. Infrastructure Costs

a. Hosting and Servers:

 Web Server:

 Local VPS or Cloud (e.g., AWS, DigitalOcean): ₹2,000/month

 Assume 6 months: 6 * ₹2,000 = ₹12,000

 Database Server:

 Local VPS or Cloud (e.g., AWS RDS): ₹3,000/month

 Assume 6 months: 6 * ₹3,000 = ₹18,000

b. Domain and SSL:

 Domain registration: ₹1,000/year

 SSL certificate: ₹3,000/year

Total Infrastructure Costs: ₹12,000 + ₹18,000 + ₹1,000 + ₹3,000 = ₹34,000

3. Operational Costs

a. API and Services:

 Dialogflow:

 Standard Edition: Free for small projects

 Paid Tier: ₹0.15 per text request

 Assume 50,000 requests: 50,000 * ₹0.15 = ₹7,500

b. Backup and Storage:

 Local Cloud Storage (e.g., AWS S3, DigitalOcean Spaces): ₹1,500/month

 Assume 6 months: 6 * ₹1,500 = ₹9,000

64
Total Operational Costs: ₹7,500 + ₹9,000 = ₹16,500

4. Maintenance Costs

a. Regular Updates and Monitoring:

 Developer time for updates and bug fixes: ₹1,000/hr

 Assume 10 hours/month: 10 * ₹1,000 = ₹10,000/month

 Assume 6 months: 6 * ₹10,000 = ₹60,000

5. Miscellaneous Costs

a. Contingency Fund:

 10% of total estimated costs to cover unexpected expenses

Summary of Costs

1. Development Costs:

 Personnel: ₹380,000

 Project Management: ₹75,000

 Design: ₹40,000

 Total Development Costs: ₹495,000

2. Infrastructure Costs: ₹34,000

3. Operational Costs: ₹16,500

4. Maintenance Costs: ₹60,000

5. Miscellaneous Costs:

 Contingency Fund (10% of ₹605,500): ₹60,550

Total Estimated Costs: ₹495,000 + ₹34,000 + ₹16,500 + ₹60,000 + ₹60,550 = ₹666,050

Detailed Breakdown

65
Category Subcategory Estimated Cost (INR)

Development Personnel ₹380,000

Project Management ₹75,000

Design ₹40,000

Infrastructure Web Server ₹12,000

Database Server ₹18,000

Domain and SSL ₹4,000

Operational API (Dialogflow) ₹7,500

Backup and Storage ₹9,000

Maintenance Updates and Monitoring ₹60,000

Miscellaneous Contingency Fund (10%) ₹60,550

Total ₹666,050

Conclusion

The total estimated cost for the Food Delivery Chatbot project developed in India is
approximately ₹666,050. This includes development, infrastructure, operational,
maintenance, and contingency expenses. Adjust these estimates based on actual hourly rates,
project scope, and specific service costs relevant to your project.

66
12. Future Enhancements
Future enhancements for the Food Delivery Chatbot project can significantly improve its
functionality, user experience, and scalability. Here are some potential enhancements:

1. Natural Language Processing (NLP) Improvements

 Enhanced Language Understanding:

 Integrate advanced NLP models like GPT-4 or other state-of-the-art language


models to improve the chatbot's understanding of user queries, especially
complex or ambiguous ones.

 Multi-language Support:

 Implement support for multiple languages to cater to a wider audience,


making the chatbot more inclusive and accessible.

2. User Experience (UX) Enhancements

 Voice Interaction:

 Enable voice interaction capabilities, allowing users to interact with the


chatbot via voice commands.

 Personalization:

 Use machine learning to analyze user preferences and provide personalized


recommendations for food items based on past orders and preferences.

 Interactive UI:

 Develop a more interactive and visually appealing user interface on the


website, including animations and dynamic content.

3. Expanded Functionalities

 Menu Customization:

 Allow users to customize their orders more effectively, such as specifying


dietary preferences, allergens, or custom ingredient requests.

67
 Real-time Order Tracking:

 Integrate real-time GPS tracking for delivery orders, providing users with live
updates on their order status and estimated delivery time.

4. Backend and Database Enhancements

 Scalability:

 Optimize the backend architecture to handle increased traffic and a larger


number of concurrent users.

 Advanced Analytics:

 Implement advanced data analytics to monitor performance, user behavior,


and sales trends, helping to make data-driven business decisions.

 Enhanced Security:

 Incorporate advanced security measures to protect user data and transactions,


including encryption, regular security audits, and compliance with data
protection regulations.

5. Integration with Other Services

 Payment Gateway Integration:

 Integrate multiple payment gateways to provide users with more options for
secure and convenient payments.

 Third-party Delivery Services:

 Partner with third-party delivery services to ensure wider delivery coverage


and faster delivery times.

 Social Media Integration:

 Allow users to log in and share their experiences on social media platforms
directly from the chatbot interface.

6. Marketing and Engagement

68
 Loyalty Programs:

 Implement a loyalty program to reward repeat customers with discounts,


points, or special offers.

 Push Notifications:

 Use push notifications to alert users about special deals, order status updates,
or new menu items.

7. AI and Machine Learning

 Predictive Ordering:

 Use machine learning to predict user orders based on historical data,


suggesting items they are likely to reorder.

 Chatbot Training:

 Continuously train the chatbot using new data to improve its responses and
accuracy over time.

8. Mobile Application

 Mobile App Development:

 Develop a dedicated mobile application for iOS and Android, offering a more
seamless and integrated user experience compared to a web-based interface.

9. Customer Support

 24/7 Customer Support:

 Implement a hybrid model where the chatbot can handle basic queries, and
complex issues can be escalated to human customer support agents available
24/7.

 Feedback System:

 Develop a robust feedback system within the chatbot to gather user feedback
and improve service quality.

69
10. Compliance and Accessibility

 Regulatory Compliance:

 Ensure that the chatbot and the entire system comply with local regulations
regarding data privacy, food safety, and online transactions.

 Accessibility Features:

 Add accessibility features to make the chatbot usable by people with


disabilities, such as screen reader compatibility and voice controls.

70
13. PERT Chart and Gantt chart

13.1. Pert Chart


A PERT (Program Evaluation Review Technique) chart is a project management tool used to
schedule, organize, and coordinate tasks within a project. Here’s how you can structure a
PERT chart for the Food Delivery Chatbot project:

1. Identify Tasks and Milestones:

 Requirement Analysis

 System Design

 Database Design

 Frontend Development

 Backend Development

 Chatbot Integration (Dialogflow)

 Payment Integration (Stripe)

 Testing

 Deployment

 Documentation

2. Determine Task Dependencies:

 System Design depends on Requirement Analysis.

 Database Design depends on Requirement Analysis.

 Frontend Development and Backend Development can start after System


Design.

 Chatbot Integration depends on Backend Development.

 Payment Integration depends on Backend Development.

71
 Testing starts after Frontend, Backend, Chatbot, and Payment Integration.

 Deployment depends on successful Testing.

 Documentation can be an ongoing process but finalizes after Deployment.

13.2. Gantt Chart


A Gantt chart is a type of bar chart that illustrates a project schedule. Below is an example of
a Gantt chart for the Food Delivery Chatbot project. The chart shows the start and end dates
of each task, along with dependencies.

72
73
14. Glossary

A chatbot is a conversational agent designed to interact with users via text or voice
commands. Dialogflow, a natural language understanding platform, is utilized to design and
integrate conversational interfaces into applications. In the context of this project, a
Medicine Delivery Chatbot is specifically tailored to assist users with ordering and managing
medicine deliveries. The system relies on a database, a structured collection of data, to store
and manage information related to medicines, users, orders, and other relevant entities.
Integration is crucial for the seamless operation of the chatbot, particularly with the website
where chatbot functionality is integrated to provide users with a conversational interface.
Natural Language Processing (NLP) techniques are employed to understand user intents,
extract important entities from user input, and fulfill user requests effectively. This fulfillment
process involves taking user input, processing it, and providing an appropriate response or
action. APIs and webhooks are used for communication and to enable custom callbacks for
specific actions. Authentication mechanisms, such as SSL/TLS encryption and HTTPS, ensure
secure communication and data exchange between the chatbot and other systems. Sessions
are maintained to preserve context and provide a personalized experience for users during
their interaction with the chatbot. User Interface (UI) and User Experience (UX) design
principles are applied to create an intuitive and user-friendly interface for the chatbot and
the integrated website. Analytics tools are employed to collect, measure, and analyze data,
enabling insights into usage patterns, user behavior, and performance metrics, which can be
used to optimize the chatbot's functionality and user experience over time.

74

You might also like