Understanding Client Statistics
Learn about automatically calculated metrics, revenue tracking, and client performance data
Overview
Client statistics are automatically calculated based on orders assigned to each client. These metrics update in real-time whenever orders are created, completed, or deleted, providing instant insights into client value and engagement.
Statistics are stored directly on client records and displayed throughout the interface, including the dashboard overview cards, table view, card view, and detailed client modals.
Order Count Metrics
Total Orders
This metric counts all orders assigned to a client regardless of their status. It includes pending, processing, completed, and cancelled orders.
- Client list (table and card view) - Shows in the Orders column
- View Client modal - Displays in the statistics section
- Client overview cards at the top of the Clients page
Display Format: In the table view, this appears in a blue badge with white text. In card view, it's shown next to "Orders:" label at the bottom of each card.
Completed Orders
Tracks the number of orders with "Completed" status. This metric is used for calculating revenue-based statistics since only completed orders contribute to revenue.
Note: This statistic is primarily used internally for calculations but is visible in the View Client modal. The difference between Total Orders and Completed Orders shows how many active or cancelled orders a client has.
Revenue Metrics
Total Revenue
The sum of all completed order amounts for a client. This is always stored and calculated in USD, regardless of your display currency preference.
- System finds all orders where clientId matches the client
- Filters to only include orders with status = "completed"
- Sums the total amount from each completed order
- Stores result in USD on the client record
- Order 1 (Completed): $150.00
- Order 2 (Completed): $275.50
- Order 3 (Pending): $100.00 - Not included
- Order 4 (Completed): $89.25
- Total Revenue: $514.75
Display Format: Total revenue is displayed in your selected currency using the current exchange rate. For example, if your currency is set to EUR, a client with $500 USD revenue might display as €465.50 depending on the exchange rate.
Note: Revenue appears in the Revenue column of the table view (right-aligned), at the bottom of cards in card view, and in the statistics section of the View Client modal.
Average Order Value
Calculates the typical value of each completed order for a client. This helps identify high-value versus high-volume clients.
- Total Revenue: $1,250.00
- Completed Orders: 5
- Average Order Value: $1,250.00 ÷ 5 = $250.00
Display Location: This metric appears in smaller text below the total revenue in the table view and is visible in the View Client modal. It shows as "Avg: $XXX.XX" in the Revenue column.
Date and Timing Metrics
Last Order Date
Records the timestamp of the most recent order created for this client, regardless of order status. This helps identify active versus dormant clients.
- Updates when a new order is created for the client
- Stores as a Unix timestamp (milliseconds since 1970)
- Does not update when order status changes
- May update to an older date if the most recent order is deleted
Use Case: Use this to identify clients who haven't ordered recently. For example, clients with no orders in the last 90 days might benefit from a follow-up contact or promotional offer.
Client Age (Created At)
The createdAt timestamp records when the client profile was first added to your system. This never changes and helps track the length of your relationship with each client.
- Client added 6 months ago with 12 orders = Active, engaged client
- Client added 2 years ago with 2 orders = Infrequent but long-term relationship
- Client added 1 week ago with 5 orders = New but very active client
Last Updated
The updatedAt timestamp changes whenever you edit the client's information (name, email, address, etc.). This is separate from order-related updates.
Note: The client list is sorted by updatedAt by default, with most recently updated clients appearing first. This makes it easy to find clients you've recently worked with.
Dashboard Overview Statistics
Stat Cards at Top of Page
At the top of the Clients page, four stat cards provide quick insights into your client base:
- Total Clients: Count of all client records in your database
- Active Projects: Currently shows "—" (not yet implemented)
- Countries: Count of unique countries from client addresses
- This Month: Currently shows "—" (not yet implemented)
Countries Calculation: The system extracts the country field from each client's address and counts unique values. Clients without addresses or without a country specified are not included in this count.
When and How Statistics Update
Automatic Updates
Client statistics are recalculated automatically in these scenarios:
- New Order Created: Total Orders increases, Last Order Date updates
- Order Completed: Completed Orders increases, Total Revenue increases, Average Order Value recalculates
- Order Deleted: All relevant statistics recalculate based on remaining orders
- Order Status Changed: If changing to/from completed, revenue metrics update
- Order Amount Modified: Revenue and average order value recalculate
Real-Time Updates: Because the system uses Firebase's real-time listeners, changes to orders trigger immediate recalculation and display of client statistics. You don't need to refresh the page to see updated numbers.
What Doesn't Trigger Updates
These actions do NOT affect client statistics:
- Editing client name, email, phone, or other contact information
- Updating client address
- Adding or modifying tags
- Changing notes
- Viewing client details
Note: Only order-related actions affect order and revenue statistics. Client information updates only change the updatedAt timestamp.
Currency and Display Format
Storage vs Display Currency
Understanding how currency affects client statistics is important for international users:
- Storage: All revenue values are stored in USD in the database
- Display: Revenue is converted to your selected currency for display
- Conversion: Uses current exchange rates via currency API
- Symbol: Displays appropriate currency symbol (€, £, ¥, etc.)
- Client has $1,000 USD total revenue (stored value)
- Your currency preference is set to EUR
- Current exchange rate is 1 USD = 0.93 EUR
- Display shows: €930.00
Tip: If you change your currency preference, all revenue displays throughout the client interface will immediately update to show values in the new currency. The underlying stored values remain in USD and don't change.
Empty Statistics Display
When a client has no completed orders or no revenue:
- No Revenue: Shows "—" (em dash) instead of $0.00
- No Orders: Shows "0" for order counts
- No Average: Shows "—" when there are no completed orders to calculate average
Using Statistics for Business Insights
Identify High-Value Clients: Sort by total revenue to see which clients contribute the most to your business. These are prime candidates for special attention, loyalty programs, or premium services.
Distinguish Volume vs Value: Compare Total Orders with Average Order Value. High volume with low average suggests bulk/wholesale clients. Low volume with high average indicates custom or premium work.
Re-engage Dormant Clients: Review Last Order Date to identify clients who haven't ordered recently. Reach out with new offerings or special promotions to re-engage them.
Track Geographic Distribution: Use the Countries stat to understand your market reach. Consider language support or shipping optimization for regions with many clients.
Monitor Growth Patterns: Track when clients were added (createdAt) alongside their revenue and order frequency to identify successful client acquisition channels and seasons.
Related Articles
Adding New Clients
Learn how to create client profiles with complete information
Managing Client Information
Edit, view, and update existing client details
Search and Organization
Find and organize clients efficiently with search and tags
Creating Orders
Learn how orders connect to clients and update statistics