The Insurance Workflow Management System is a full-stack web application developed using Python Flask, integrating traditional insurance management workflows with Machine Learning (Fraud Detection) and Natural Language Processing (Customer Sentiment Analysis).
The platform simulates a real-world insurance ecosystem including:
- User authentication and profile management
- Multi-category policy registration
- QR-based policy verification
- Claim processing and renewal system
- SMS notifications via Twilio API
- Fraud detection using Decision Tree classifier
- Customer satisfaction classification using NLP
This project demonstrates the integration of Web Development + Database Systems + Machine Learning + API Integration into a unified intelligent system.
Traditional insurance management systems:
- Require manual claim verification
- Lack automated fraud detection
- Do not integrate sentiment analytics
- Do not provide dynamic renewal alerts
- Lack transparent policy verification mechanisms
This project addresses these limitations by building an intelligent, automated insurance workflow platform capable of:
- Detecting fraudulent claims using ML
- Classifying customer feedback using NLP
- Generating QR codes for policy validation
- Sending real-time SMS notifications
- Managing the complete lifecycle of insurance policies
Frontend (HTML/CSS + Jinja)
↓
Flask Application Layer
↓
Business Logic Layer
↓
Database (SQLite + JSON)
↓
ML Modules (Fraud + NLP)
↓
External API (Twilio SMS)
- Python 3.x
- Flask (Web Framework)
- SQLAlchemy (ORM)
- SQLite (Relational DB)
- JSON-based structured storage
- HTML5
- CSS3
- Jinja2 Templating Engine
- Responsive UI Design
- Scikit-learn
- Pandas
- NumPy
- Joblib (Model Serialization)
- Twilio SMS API
- QR Code Generation Library
Predict whether a submitted insurance claim is fraudulent based on structured features.
-
insurance_claims.csv -
Contains structured attributes:
- Demographic features
- Policy details
- Incident type
- Claim amounts
- Vehicle details
- Injury & property damage info
- Decision Tree Classifier
- Accuracy: 77%
- Trained and serialized using
joblib - Tested using structured policy samples
sklearn.tree.DecisionTreeClassifiersklearn.model_selection.train_test_splitsklearn.metricspandasnumpyjoblib
- Load structured claim dataset
- Encode categorical features
- Split into train/test sets
- Train Decision Tree model
- Evaluate accuracy
- Serialize model (.joblib)
- Load model for prediction
Classify customer feedback as:
- Positive
- Negative
- Text preprocessing
- Basic polarity classification
- Feedback storage in
feedback.txt
sklearn.feature_extraction.textsklearn.linear_model/ classification modelpandasre(regular expressions)
- User submits feedback
- Feedback stored in text file
- Run sentiment classifier
- Label feedback polarity
- Signup
- Login
- Logout
- Session management
- Profile photo upload
- SQLite database storage
SQLAlchemyFlask-Login- SQLite
User details stored in:
instances/users.db
- Car Insurance
- Bike Insurance
- Travel Insurance
- Health Insurance
- Business Insurance
- Home Insurance
- Submit structured form
- Generate unique policy ID
- Generate QR code
- Save policy in
policies.json - Send SMS confirmation
Each policy contains a unique QR code linking to structured policy data.
Libraries used:
qrcodePillow
- User submits claim amount
- Insurance amount reduced
- Claim recorded in policy
- SMS alert triggered
- Update expiry date
- SMS renewal notification
- Expiry tracking mechanism
Integrated using Twilio API.
Notifications triggered for:
- Policy creation
- Claim submission
- Expiry alerts
- Renewal confirmation
Libraries used:
twilio.rest.Client
| Component | Storage Type |
|---|---|
| User Accounts | SQLite (Relational DB) |
| Policies | JSON File |
| Feedback | Text File |
| Fraud Model | Joblib Serialized Model |
| QR Codes | Static Folder Images |
- flask
- flask_sqlalchemy
- flask_session
- werkzeug
- sqlite3
- SQLAlchemy ORM
- scikit-learn
- pandas
- numpy
- joblib
- sklearn.feature_extraction.text
- sklearn.naive_bayes / logistic regression (if used)
- qrcode
- pillow
- twilio
- datetime
- uuid
- json
- os
- re
git clone https://github.com/yourusername/insurance-workflow-management.git
cd insurance-workflow-managementpip install -r requirements.txtpython app.pyOpen browser:
http://localhost:5000
jupyter notebook fraud_detection_model.ipynbpython customer_satisfaction.py| Model | Accuracy |
|---|---|
| Decision Tree Fraud Detection | 77% |
| Sentiment Classifier | Binary Classification |
- Full-stack application architecture
- REST-like route management
- ORM-based relational database design
- Structured + unstructured data handling
- Model serialization & loading
- Fraud analytics integration
- Real-time notification systems
- QR-based verification system
- State-based workflow automation
The Insurance Workflow Management System (IWMS) is a comprehensive web application designed to streamline the management of insurance policies, claims, and customer interactions while improving the efficiency and security of insurance workflows. The application provides seamless features such as user account creation, policy management, real-time alerts, customer feedback analysis, and fraud detection. Built using Python, HTML, and CSS, IWMS integrates machine learning (ML) and natural language processing (NLP) to offer a reliable, intelligent solution for insurance companies to enhance customer experience and operational security.
- User Registration and Login: Users can register and log in, creating personalized accounts with secure credentials.
- Profile Management: Users can view and manage their account information, with a navigation bar for easy access across the application.
- QR Code Verification: Each policy is verified through a QR code, ensuring data security and authenticity.
- Policy Registration: Users can explore various insurance policies (e.g., Car, Bike, Travel, Health, Business) and select options based on their needs.
- Detailed Forms: Each policy type has a specific form to collect relevant information (e.g., car model, health conditions).
- Policy Overview: Registered policies are displayed with key details, and users can initiate claims directly from their account dashboard.
- Real-time Notifications: SMS alerts are sent to users when new policies are created, claims are submitted, and renewals or expirations are upcoming.
- Comprehensive Information: Users have access to detailed descriptions of each insurance policy type, including coverage details, inclusions, and exclusions.
- Centralized Info Centre: All coverage information is accessible through an Info Centre, with consistent visual styling to ensure clarity.
- Feedback Collection: Customers can submit feedback through a dedicated support interface.
- NLP-Based Sentiment Analysis: Feedback is analyzed with TextBlob, an NLP library, to detect sentiment (positive, neutral, negative).
- Feedback Management: Customer satisfaction is categorized based on feedback sentiment, allowing for efficient handling of support cases and follow-up.
- Policy Creation Alerts: SMS notifications are sent to users upon successful policy creation.
- Claim Status Notifications: When a claim is processed, users receive updates via SMS.
- Expiration Reminders: Automatic alerts are sent to users when their policies are nearing expiration, enabling timely renewals.
- Twilio Integration: Twilio API is integrated for reliable SMS delivery, ensuring secure and instant communication with users.
- Claim Collection: Users can submit claims for their policies, which are stored and managed in the application’s database.
- Random Forest Classifier for Fraud Detection: A machine learning model trained on insurance data identifies potential fraudulent claims by analyzing claim patterns and flagging suspicious entries.
- Policy Data Management: All claim and policy updates are saved in JSON format, enhancing data accessibility and integrity.
- QR Code Generation: QR codes are generated for each policy, offering an added layer of security for policy validation.
- Python: Primary programming language for back-end logic, ML model training, and NLP processing.
- HTML/CSS: Front-end languages for structuring and styling the user interface.
- OpenCV: Used for image processing and handling any image-based requirements.
- TensorFlow: Facilitates the development of ML models, particularly the fraud detection model.
- TextBlob: NLP library used for sentiment analysis in customer feedback.
- Twilio API: Integrates SMS functionality to send real-time alerts to users.
- LabelImg: Image annotation tool used for creating labeled datasets for any visual data processing.
- Random Forest Classifier: Trained model used to detect fraudulent claims based on historical data. The classifier flags suspicious entries, which can be reviewed by administrators for further action.
- JSON: Used to store policy and claim information in a structured format, ensuring efficient data retrieval and updates.
- Database Interaction: The system retrieves, stores, and updates user-specific policy information to maintain accurate records and provide up-to-date notifications.
- Account Creation: Users start by creating an account, with options to register or log in if they are returning users.
- Policy Selection: After login, users can browse policy options and fill out forms to register their chosen policy.
- Claim Submission: Users can submit claims on their policies and receive real-time notifications regarding their claim status.
- Feedback Submission: Users can provide feedback, which is automatically analyzed for sentiment to help improve customer experience.
- Alerts: SMS notifications inform users about policy updates, upcoming renewals, and other important actions.
- Policy Verification: Users can verify policies using the generated QR code, ensuring security and authenticity.
- User Information Management: Developers can access user information and feedback to manage operations and enhance service quality.
- Feedback Analysis: Negative feedback triggers alerts to management, allowing for quick resolution of user issues.
- Fraud Detection: The fraud detection model identifies potentially fraudulent claims, enabling administrators to take necessary action.