Vip District Incentives AI Request Validator
An intelligent tool that automates the validation of purchase requests using AI-powered ticket analysis and configurable business rules.
What is this application?
This web application helps Vip District process and validate incentive purchase requests automatically. Instead of manually reviewing each purchase ticket, the system uses OpenAI's Vision AI to read and extract information from ticket images and PDFs, then validates that information against your business rules.
The result is a faster, more consistent validation process that saves hours of manual work while maintaining accuracy through configurable validation checks.
How does it work?
Upload Your Data
Upload 4 Excel files: Requests (with ticket URLs), Devices (serial numbers), Stores (valid VAT numbers), and Minimum Spend Rules. Set your allowed date range.
AI Analyzes Tickets in Parallel
The system processes multiple tickets simultaneously (configurable, default 5) using OpenAI Vision, extracting VAT numbers, dates, ticket IDs, and product amounts. Real-time progress updates show exactly how many tickets have been processed.
Validation Checks Run
The system runs 11 validation checks: missing data detection (required fields must be present), serial number verification, minimum spend rules, VAT validation, amount verification, date range check, request timing (within 15 days), duplicated entry detection (same ID/serial/URL), duplicated ticket detection (same ticket ID with different URL), ticket readability verification, and AI accuracy validation.
Review Results
View results in a clear table, see which checks passed or failed, manually override decisions if needed, and export everything to Excel.
The Validation Checks
Each request goes through these automated checks:
| Check | What it validates |
|---|---|
| 0. Missing Data | All required fields (Serial Number, Ticket URL) are present in the request file |
| 1. Serial Number | The device serial number exists in your devices file |
| 2. Minimum Spend Rule | A minimum spend rule is configured for the device type |
| 3. VAT in Stores | The ticket's VAT number (Partita IVA) matches a valid store |
| 4. Amount | At least one product on the ticket meets the minimum spend requirement |
| 5. Date Range | The ticket date falls within the allowed date range you specified |
| 6. Request Timing | The request was submitted within 15 days after the ticket purchase date |
| 7. Duplicated Entry | The same request ID, serial number, or ticket URL hasn't been already used in the file |
| 8. Duplicated Ticket | The ticket ID (extracted by AI from the receipt) hasn't been used in another request, even with a different URL |
| 9. Ticket Readable | The AI was able to read and extract information from the ticket |
| 10. Invalid Accuracy | The AI confidence level is at least 85% (below this threshold, manual review is required) |
How decisions are made
The final status is determined by the AI confidence and check results:
Duplicate detection: The system detects duplicates two ways: CHECK 7 identifies if the same request ID, serial number, or ticket URL appears more than once in the file; CHECK 8 uses the ticket ID extracted by AI to detect when the same physical ticket is submitted with different URLs. If a duplicate is found, the request is denied with a reference to the original request.
Previously processed tickets: If a ticket was already processed in this batch, it automatically gets the same validation result as the first occurrence.
Technology Stack
Key Features
- User Authentication — Secure login system with session management and cookie-based authentication
- Role-Based Access Control — Administrator and regular user roles with different permissions
- User Management — Admin panel to create, edit, activate/deactivate, and delete users
- AI-Powered Analysis — Automatically extracts data from ticket images and PDFs using OpenAI Vision
- Parallel Processing — Analyzes multiple tickets simultaneously (configurable via PARALLEL_CONCURRENCY, default 5) for significantly faster batch processing
- Real-Time Progress — Live progress bar with actual ticket count and estimated time remaining via Server-Sent Events
- PDF Support — PDFs are automatically converted to images for AI analysis
- Smart Caching — Ticket analysis results are cached to avoid redundant API calls and save costs
- Previously Processed Detection — Automatically identifies tickets that were already processed and reuses the original validation result
- Manual Override — Review and change any request's status manually when needed
- Batch Processing — Track processing history with user attribution and review past validation batches
- Excel Export — Download complete results as an Excel file with separate column indicating manual status changes
- AI Usage Dashboard — Monitor AI usage and costs (admin-only access)
- Force Re-analysis — Option to bypass cache and re-analyze tickets when needed