Skip to main content

Overview

The Dashboard API provides comprehensive analytics and key performance indicators for store owners. It includes sales metrics, order analytics, product performance data, and actionable insights to help store owners make informed business decisions. Location: convex/stores/dashboard.ts

Dashboard Overview

Get comprehensive dashboard metrics with key performance indicators.

Top Selling Products

Retrieve top-selling products based on quantity sold and revenue generated.
limit
number
Maximum number of products to return (default: 10)

Attention Items

Get items that need immediate store owner attention with priority levels.

Recent Orders

Get recent orders for quick overview and monitoring.
limit
number
Maximum number of orders to return (default: 5)

Complete Dashboard Component

Here’s a comprehensive dashboard implementation:

Dashboard Metrics

Sales Analytics

Track daily sales, revenue trends, and average order values

Order Management

Monitor active orders, order status, and fulfillment metrics

Product Performance

Identify top-selling products and inventory insights

Business Intelligence

Get actionable insights and attention items for business growth

Attention Item Types

The dashboard identifies various issues that need store owner attention:
Type: store_verificationStore application pending approval or additional documents required.
Type: low_stockProducts running low on inventory that need restocking.
Type: missing_bank_detailsBank account information required for payout processing.
Type: low_wallet_balanceStore wallet balance is low, may affect operations.
Type: pending_ordersOrders waiting for confirmation or processing.

Real-time Dashboard Updates

Dashboard data updates automatically as business activities occur:

Error Handling

Status Code: 404
Status Code: 403
Status Code: 400
Dashboard metrics are calculated in real-time and update automatically as business activities occur. Historical data is maintained for trend analysis.
Use the attention items to proactively address business issues before they impact operations. High-priority items should be addressed immediately.