Damage Charges
The damage management system allows fleet operators to report, track, and manage damage to vehicles. When damage is reported, the system creates a task in the fleet management queue for investigation and resolution. This guide covers how damage reports work and how they integrate with the billing system.
How Damage Reporting Works
Current Implementation
The damage system operates as a task-based workflow:
Damage Detected
Damage is identified by customers, field technicians, or through IoT sensors
Report Submitted
Damage report is submitted via API or dashboard
Vehicle Resolved
System identifies the vehicle from the identifier provided
Task Created
A critical priority task is created in the fleet ops queue
Investigation
Task appears in dashboard for technician investigation
Assessment
Damage is assessed and documented with photos
Resolution
Charges applied to customer if applicable, repairs scheduled
Integration with Tasks
Damage reports are stored in the tasks table with:
- Priority:
critical- ensures immediate visibility - Tag:
[damage]prefix in title for easy filtering - Status:
open- awaiting investigation - Vehicle Link: Associated with the damaged vehicle
Critical Priority
Damage reports are always created with critical priority to ensure they receive immediate attention from your operations team.
Damage Detection Sources
Damage can be detected through multiple channels:
| Source | Description | Example |
|---|---|---|
| Customers | Reporting issues through the mobile app | "Scooter brake not working" |
| Field Technicians | During routine inspections | Pre-ride vehicle checks |
| End-of-Ride Photos | AI or manual review of photos | Post-ride damage visible |
| IoT Sensors | Unusual vehicle behavior or alerts | Impact detection, fall alerts |
Reporting Damage via API
Endpoint
POST /api/damages
Purpose: Creates a new damage report task for a vehicle
Request Format
{
"vehicle_number": "VEH-123",
"note": "Left handlebar bent, possibly from collision"
}
Parameters
| Field | Type | Required | Description |
|---|---|---|---|
vehicle_number | string | Yes | Vehicle identifier (number, QR, or UUID) |
note | string | Yes | Description of the damage (min 1 character) |
Success Response (200)
{
"ok": true
}
Error Responses
| Status | Error | Cause |
|---|---|---|
| 400 | Validation error | Invalid or missing fields |
| 404 | Vehicle not found | Vehicle identifier doesn't exist |
| 400 | Failed to add damage | Database error |
Vehicle Resolution
The damage API accepts multiple vehicle identifier formats:
| Input Type | Example | Resolution Method |
|---|---|---|
| Vehicle Number | VEH-123 | Matches vehicle_number field |
| QR Code | QR-ABC123 | Matches qr_code field |
| UUID | 550e8400-... | Matches id field |
| IoT IMEI | 123456789012345 | Matches iot_imei field |
This flexibility allows damage reports from:
- Field technicians scanning QR codes
- Customer support using vehicle numbers
- IoT systems using IMEI identifiers
- Backend systems using UUIDs
Damage Workflow
Step 1: Detection
Identify damage through one of the detection sources. Document as much detail as possible about the damage location and severity.
Step 2: Report Creation
Submit the damage report via:
- The
/api/damagesendpoint - Creating a task directly in the dashboard with
[damage]prefix
Step 3: Investigation
- Task appears in the dashboard under Tasks or Fleet Ops
- Critical priority ensures immediate visibility
- Filter by
[damage]tag to see all damage reports - Assign to a technician for investigation
Step 4: Assessment
The technician should:
- Locate and inspect the vehicle
- Document the damage with photos
- Estimate repair costs
- Determine if customer is liable
Step 5: Resolution
Based on assessment:
- Minor damage: Note in task, close as resolved
- Repair needed: Schedule maintenance, update vehicle status
- Customer liable: Initiate charge process
Charging Customers for Damage
Manual Charge Process
Currently, damage charges are processed manually through the dashboard:
Identify Liable Customer
Check ride history for the vehicle around the time damage occurred. Review end-of-ride photos if available.
Calculate Charge Amount
Based on repair/replacement costs, service agreement terms, and damage severity
Apply Charge
Navigate to customer's profile and use wallet debit or create Stripe charge
Update Task
Mark the damage task as completed with resolution notes
Wallet Debit
For customers with wallet balances, you can debit their wallet directly:
- Navigate to Customers and find the customer
- View their profile
- Create a wallet transaction for the damage amount
- Document the charge reason
Stripe Charge
For direct card charges when wallet is insufficient:
- Navigate to the customer's profile
- Use the charge feature with their saved payment method
- Include description: "Damage charge: [description of damage]"
- Document the task ID and vehicle UUID for reference
Customer Communication
Always communicate with the customer before applying damage charges. Explain the damage, show evidence, and give them an opportunity to respond. This reduces disputes and maintains customer relationships.
Service Agreement Terms
The Levy Service Agreement includes damage liability provisions:
Customer Responsibilities
Per the standard service agreement:
- Customers are responsible for damage during their rental period
- Damage charges may be assessed for negligent use
- Maximum liability caps may apply based on agreement terms
Damage Assessment Categories
| Category | Examples | Typical Charge |
|---|---|---|
| Minor cosmetic | Scratches, scuffs | $0-25 |
| Moderate | Dents, broken mirrors | $25-100 |
| Significant | Bent frames, broken displays | $100-500 |
| Major | Total loss, theft | Up to replacement cost |
Evidence Requirements
To successfully charge for damage:
- Timestamp evidence - When damage occurred
- Ride association - Which customer had the vehicle
- Photo documentation - Before/after images
- Damage assessment - Professional evaluation
Dashboard Integration
Viewing Damage Reports
- Navigate to Dashboard > Tasks
- Filter by priority:
Critical - Search for
[damage]in title - Or use tag filter if available
Task Actions
| Action | Description |
|---|---|
| Assign | Assign to technician for investigation |
| Update Status | Move through workflow stages |
| Add Notes | Document findings and resolution |
| Complete | Close task when resolved |
| Link to Ride | Associate with specific ride if identified |
Fleet Map View
Damaged vehicles may be:
- Marked with special status indicator
- Removed from available fleet
- Flagged for retrieval
Reporting and Analytics
Finding Damage Trends
Monitor damage patterns to identify:
- Problematic vehicles with repeated damage
- High-damage locations or zones
- Time patterns (weekend vs weekday)
- Customer patterns
Useful Queries
Damage Tasks in Last 30 Days
SELECT
DATE(created_at) as date,
COUNT(*) as damage_count
FROM tasks
WHERE title LIKE '[damage]%'
AND created_at > NOW() - INTERVAL '30 days'
GROUP BY DATE(created_at)
ORDER BY date;
Vehicles with Most Damage Reports
SELECT
v.vehicle_number,
v.model,
COUNT(t.id) as damage_count
FROM vehicles v
JOIN tasks t ON t.vehicle_uuid = v.id
WHERE t.title LIKE '[damage]%'
GROUP BY v.id, v.vehicle_number, v.model
ORDER BY damage_count DESC
LIMIT 20;
Unresolved Damage Reports
SELECT
t.id,
t.title,
t.created_at,
v.vehicle_number,
t.assigned_to
FROM tasks t
JOIN vehicles v ON v.id = t.vehicle_uuid
WHERE t.title LIKE '[damage]%'
AND t.status IN ('open', 'in_progress')
ORDER BY t.created_at ASC;
Best Practices
For Field Technicians
- Be descriptive - Include specific damage location and type
- Include estimates - Note repair difficulty if known
- Take photos - Document damage visually before repair
- Act quickly - Critical priority means immediate attention
For Fleet Managers
- Review daily - Check damage reports each morning
- Track patterns - Identify problematic vehicles or locations
- Document thoroughly - Maintain records for liability purposes
- Follow up - Ensure all damage reports reach resolution
For Customer Support
- Verify before charging - Confirm damage attribution
- Communicate clearly - Explain charges to customers
- Document disputes - Record customer responses
- Escalate when needed - Complex cases go to management
Future Enhancements
The damage system is planned for expansion:
Planned Features
-
Dedicated Damage Table
- Separate from tasks for better tracking
- Include cost estimates, photos, liability status
- Link to specific rides
-
Automated Charging
- Automatic charges based on damage assessment
- Integration with payment retry system
- Customer notification workflow
-
Photo AI Analysis
- Automatic damage detection from end-of-ride photos
- Severity classification
- Before/after comparison
-
Insurance Integration
- Claim submission workflow
- Insurance carrier API integration
- Coverage tracking
-
Damage Scoring
- Vehicle damage history score
- Predictive maintenance triggers
- Fleet health metrics
Troubleshooting
Common Issues
"Vehicle not found" error
Cause: Vehicle identifier doesn't match any record
Solutions:
- Verify the vehicle number format
- Check if vehicle exists in database
- Try alternative identifiers (QR, IMEI, UUID)
Task not appearing in dashboard
Cause: Filtering or permissions issue
Solutions:
- Clear task filters
- Check user's subaccount access
- Verify task was created (check database)
Unable to charge customer
Cause: Customer has no payment method or insufficient funds
Solutions:
- Check if customer has payment methods on file
- Verify Stripe customer ID exists
- Consider wallet debit if balance exists
- Contact customer to add payment method
Diagnostic Queries
Check if vehicle exists
SELECT id, vehicle_number, qr_code, status
FROM vehicles
WHERE vehicle_number = 'VEH-123'
OR qr_code = 'VEH-123';
Find damage tasks for a vehicle
SELECT t.*, v.vehicle_number
FROM tasks t
JOIN vehicles v ON v.id = t.vehicle_uuid
WHERE v.vehicle_number = 'VEH-123'
AND t.title LIKE '[damage]%'
ORDER BY t.created_at DESC;
Recent damage reports
SELECT
t.id,
t.title,
t.status,
t.created_at,
v.vehicle_number
FROM tasks t
JOIN vehicles v ON v.id = t.vehicle_uuid
WHERE t.title LIKE '[damage]%'
ORDER BY t.created_at DESC
LIMIT 20;
What's Next?
- Stripe Setup - Configure Stripe integration
- Payment Methods - Managing customer cards
- Automatic Refunds - How automatic refunds work
Damage Management Ready
With a clear damage reporting and resolution workflow, you can protect your fleet investment while maintaining fair customer relationships. Regular monitoring of damage trends helps identify issues before they become costly problems.