Saltar al contenido principal

Metabase Dashboard Definitions

Feature: 014-exchange-return
Phase: 8 (Reporting & Analytics)
Tasks: 8.3 (Dashboard Creation)

This document provides detailed layouts and configurations for all Metabase dashboards.


Dashboard 1: Return Overview

Purpose: High-level operational view of return activity
Audience: Managers, Operations Team
Refresh: Every 5 minutes
Filters: Date Range, Location, Status

Layout

┌─────────────────────────────────────────────────────────────────┐
│ 📊 Return Overview Dashboard │
├─────────────────────────────────────────────────────────────────┤
│ Filters: [Last 30 Days ▼] [All Locations ▼] [Completed ▼] │
├─────────────────────────────────────────────────────────────────┤
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Total Returns│ │ Return Rate │ │ Avg Value │ │
│ │ 1,234 │ │ 5.2% │ │ $45.67 │ │
│ │ +12% ↑ │ │ -0.3% ↓ │ │ +$2.15 ↑ │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Total Value │ │ Approved │ │ Unique │ │
│ │ $56,432 │ │ 15% │ │ Customers │ │
│ │ +8% ↑ │ │ +2% ↑ │ │ 892 │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
├─────────────────────────────────────────────────────────────────┤
│ 📈 Returns Trend (Last 30 Days) │
│ ┌────────────────────────────────────────────────────────────┐│
│ │ Line Chart: Daily return count and value ││
│ │ X-Axis: Date ││
│ │ Y-Axis (Left): Count ││
│ │ Y-Axis (Right): Value ($) ││
│ │ Query: return-metrics.sql - Query 1 (by day) ││
│ └────────────────────────────────────────────────────────────┘│
├─────────────────────────────────────────────────────────────────┤
│ 🥧 Top Return Reasons 📍 Returns by Location│
│ ┌──────────────────────┐ ┌──────────────────────────────────┐│
│ │ Pie Chart │ │ Horizontal Bar Chart ││
│ │ Query: return- │ │ Query: return-metrics.sql ││
│ │ metrics.sql Q3 │ │ Query 7 ││
│ └──────────────────────┘ └──────────────────────────────────┘│
├─────────────────────────────────────────────────────────────────┤
│ 📊 Returns by Time of Day │
│ ┌────────────────────────────────────────────────────────────┐│
│ │ Bar Chart: Hourly distribution ││
│ │ Query: return-metrics.sql - Query 8 ││
│ └────────────────────────────────────────────────────────────┘│
└─────────────────────────────────────────────────────────────────┘

Components

  1. Metric Cards (Row 1-2)

    • Total Returns (with trend)
    • Return Rate % (with trend)
    • Average Return Value (with trend)
    • Total Return Value (with trend)
    • Approval Rate % (with trend)
    • Unique Customers
  2. Returns Trend Chart

    • Type: Line chart with dual Y-axis
    • Query: return-metrics.sql - Query 1
    • Grouping: By day
    • Lines: Count (blue), Value (green)
  3. Top Return Reasons

    • Type: Pie chart
    • Query: return-metrics.sql - Query 3
    • Limit: Top 10
    • Colors: Auto-assigned
  4. Returns by Location

    • Type: Horizontal bar chart
    • Query: return-metrics.sql - Query 7
    • Sort: By value descending
  5. Returns by Time of Day

    • Type: Bar chart
    • Query: return-metrics.sql - Query 8
    • X-Axis: Hour (0-23)
    • Y-Axis: Count

Dashboard 2: Return Reasons Analysis

Purpose: Deep dive into why customers are returning products
Audience: Product Team, Quality Assurance
Refresh: Daily
Filters: Date Range, Category, Reason Category

Layout

┌─────────────────────────────────────────────────────────────────┐
│ 📋 Return Reasons Analysis │
├─────────────────────────────────────────────────────────────────┤
│ Filters: [Last 90 Days ▼] [All Categories ▼] │
├─────────────────────────────────────────────────────────────────┤
│ 🥧 Return Reasons Distribution 📊 Trend Over Time │
│ ┌──────────────────────┐ ┌──────────────────────────────────┐│
│ │ Donut Chart │ │ Stacked Area Chart ││
│ │ Top 10 reasons │ │ Weekly trends by reason ││
│ │ With percentages │ │ Query: return-metrics.sql Q3 ││
│ └──────────────────────┘ │ (grouped by week) ││
│ └──────────────────────────────────┘│
├─────────────────────────────────────────────────────────────────┤
│ 📋 Detailed Reasons Table │
│ ┌────────────────────────────────────────────────────────────┐│
│ │ Reason │ Category │ Count │ % │ Value │ Avg Value ││
│ │─────────┼──────────┼───────┼───┼───────┼────────── ││
│ │ Table with sorting, filtering ││
│ │ Query: return-metrics.sql - Query 3 ││
│ └────────────────────────────────────────────────────────────┘│
├─────────────────────────────────────────────────────────────────┤
│ 🏷️ Reasons by Product Category │
│ ┌────────────────────────────────────────────────────────────┐│
│ │ Grouped Bar Chart ││
│ │ X: Category, Y: Count, Group: Reason ││
│ │ Query: return-metrics.sql Q3 + Q5 (joined) ││
│ └────────────────────────────────────────────────────────────┘│
└─────────────────────────────────────────────────────────────────┘

Dashboard 3: Product Return Rate

Purpose: Identify products with high return rates
Audience: Product Team, Inventory Management
Refresh: Daily
Filters: Date Range, Category, Min Return Count

Layout

┌─────────────────────────────────────────────────────────────────┐
│ 📦 Product Return Rate Analysis │
├─────────────────────────────────────────────────────────────────┤
│ Filters: [Last 90 Days ▼] [All Categories ▼] [Min 5 Returns] │
├─────────────────────────────────────────────────────────────────┤
│ 🏆 Top Returned Products (by Value) │
│ ┌────────────────────────────────────────────────────────────┐│
│ │ Product │ SKU │ Category │ Count │ Qty │ Value │ Avg ││
│ │──────────┼─────┼──────────┼───────┼─────┼───────┼───── ││
│ │ Table with top 50 products ││
│ │ Query: return-metrics.sql - Query 4 ││
│ │ Sortable, exportable ││
│ └────────────────────────────────────────────────────────────┘│
├─────────────────────────────────────────────────────────────────┤
│ 📊 Return Value by Category │
│ ┌────────────────────────────────────────────────────────────┐│
│ │ Treemap: Size = return value, Color = return count ││
│ │ Query: return-metrics.sql - Query 5 ││
│ └────────────────────────────────────────────────────────────┘│
└─────────────────────────────────────────────────────────────────┘

Dashboard 4: Employee Return Activity

Purpose: Monitor employee return processing patterns
Audience: Management, HR, Security
Refresh: Daily
Filters: Date Range, Location, Employee

Layout

┌─────────────────────────────────────────────────────────────────┐
│ 👥 Employee Return Activity │
├─────────────────────────────────────────────────────────────────┤
│ Filters: [Last 30 Days ▼] [All Locations ▼] │
├─────────────────────────────────────────────────────────────────┤
│ 📊 Returns Processed by Employee │
│ ┌────────────────────────────────────────────────────────────┐│
│ │ Employee │ Position │ Count │ Value │ Avg │ Approved % ││
│ │───────────┼──────────┼───────┼───────┼─────┼───────── ││
│ │ Table with all employees ││
│ │ Query: fraud-detection.sql - Query 2 (modified) ││
│ │ Highlight outliers (>2σ) in red ││
│ └────────────────────────────────────────────────────────────┘│
├─────────────────────────────────────────────────────────────────┤
│ ⚠️ Employee Outliers (>2σ from Mean) │
│ ┌────────────────────────────────────────────────────────────┐│
│ │ Table showing employees with unusual patterns ││
│ │ Query: fraud-detection.sql - Query 2 ││
│ │ Requires investigation ││
│ └────────────────────────────────────────────────────────────┘│
└─────────────────────────────────────────────────────────────────┘

Dashboard 5: Damaged Inventory Report

Purpose: Track damaged and quarantined inventory
Audience: Inventory Management, Operations
Refresh: Daily
Filters: Date Range, Location

Layout

┌─────────────────────────────────────────────────────────────────┐
│ 📦 Damaged Inventory Report │
├─────────────────────────────────────────────────────────────────┤
│ Filters: [Last 30 Days ▼] [All Locations ▼] │
├─────────────────────────────────────────────────────────────────┤
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Damaged Value│ │ Quarantined │ │ Scrap Value │ │
│ │ $12,345 │ │ $3,456 │ │ $1,234 │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
├─────────────────────────────────────────────────────────────────┤
│ 📊 Condition Breakdown 📈 Trend Over Time │
│ ┌──────────────────────┐ ┌──────────────────────────────────┐│
│ │ Pie Chart │ │ Line Chart ││
│ │ Query: return- │ │ Weekly damaged value trend ││
│ │ metrics.sql Q6 │ │ Query: return-metrics.sql Q6 ││
│ └──────────────────────┘ │ (grouped by week) ││
│ └──────────────────────────────────┘│
└─────────────────────────────────────────────────────────────────┘

Dashboard 6: Exchange Summary

Purpose: Overview of exchange transactions
Audience: Management, Finance
Refresh: Every 5 minutes
Filters: Date Range, Location

Layout

┌─────────────────────────────────────────────────────────────────┐
│ 🔄 Exchange Summary Dashboard │
├─────────────────────────────────────────────────────────────────┤
│ Filters: [Last 30 Days ▼] [All Locations ▼] │
├─────────────────────────────────────────────────────────────────┤
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Total │ │ Exchange │ │ Net Revenue │ │
│ │ Exchanges │ │ Rate │ │ Impact │ │
│ │ 456 │ │ 27% │ │ +$8,234 │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
├─────────────────────────────────────────────────────────────────┤
│ 📊 Exchange Settlement Breakdown │
│ ┌────────────────────────────────────────────────────────────┐│
│ │ Donut Chart: Customer Paid More vs Refunded vs Even ││
│ │ Query: exchange-metrics.sql - Query 5 ││
│ └────────────────────────────────────────────────────────────┘│
├─────────────────────────────────────────────────────────────────┤
│ 📈 Net Revenue Impact Trend │
│ ┌────────────────────────────────────────────────────────────┐│
│ │ Area Chart: Weekly net revenue impact ││
│ │ Query: exchange-metrics.sql - Query 2 ││
│ └────────────────────────────────────────────────────────────┘│
└─────────────────────────────────────────────────────────────────┘

Dashboard 7: Fraud Detection

Purpose: Identify suspicious return patterns
Audience: Security, Management
Refresh: Daily
Filters: Date Range, Risk Threshold

Layout

┌─────────────────────────────────────────────────────────────────┐
│ 🔒 Fraud Detection Dashboard │
├─────────────────────────────────────────────────────────────────┤
│ Filters: [Last 90 Days ▼] [Risk Score > 50] │
├─────────────────────────────────────────────────────────────────┤
│ 🚨 High-Risk Customers (Return Rate > 30%) │
│ ┌────────────────────────────────────────────────────────────┐│
│ │ Customer │ Email │ Return Rate │ Value │ Risk Score ││
│ │───────────┼───────┼─────────────┼───────┼────────── ││
│ │ Table with high-risk customers ││
│ │ Query: fraud-detection.sql - Query 1 ││
│ │ Highlight risk score > 75 in red ││
│ └────────────────────────────────────────────────────────────┘│
├─────────────────────────────────────────────────────────────────┤
│ ⚠️ Employee Outliers 🔍 Serial Number Fraud │
│ ┌──────────────────────┐ ┌──────────────────────────────────┐│
│ │ Table │ │ Table ││
│ │ Query: fraud- │ │ Query: fraud-detection.sql ││
│ │ detection.sql Q2 │ │ Query 3 ││
│ └──────────────────────┘ └──────────────────────────────────┘│
├─────────────────────────────────────────────────────────────────┤
│ 📍 Cross-Location Return Patterns │
│ ┌────────────────────────────────────────────────────────────┐│
│ │ Table with customers returning at different locations ││
│ │ Query: fraud-detection.sql - Query 4 ││
│ └────────────────────────────────────────────────────────────┘│
└─────────────────────────────────────────────────────────────────┘

Dashboard 8: Payment Gateway Reconciliation

Purpose: Track refund status and gateway performance
Audience: Finance, Operations
Refresh: Every 15 minutes
Filters: Date Range, Payment Method, Status

Layout

┌─────────────────────────────────────────────────────────────────┐
│ 💳 Payment Gateway Reconciliation │
├─────────────────────────────────────────────────────────────────┤
│ Filters: [Today ▼] [All Methods ▼] [All Statuses ▼] │
├─────────────────────────────────────────────────────────────────┤
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Total │ │ Pending │ │ Failed │ │
│ │ Refunds │ │ Refunds │ │ Refunds │ │
│ │ 234 │ │ 12 │ │ 3 │ │
│ │ $45,678 │ │ $2,345 │ │ $567 │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
├─────────────────────────────────────────────────────────────────┤
│ 🚨 Failed Refunds Requiring Attention │
│ ┌────────────────────────────────────────────────────────────┐│
│ │ Receipt │ Customer │ Amount │ Method │ Days │ Action ││
│ │──────────┼──────────┼────────┼────────┼──────┼────── ││
│ │ Table with failed refunds ││
│ │ Query: payment-reconciliation.sql - Query 2 ││
│ │ Sortable by days pending ││
│ └────────────────────────────────────────────────────────────┘│
├─────────────────────────────────────────────────────────────────┤
│ 📊 Refunds by Payment Method ⏱️ Pending Refunds Aging │
│ ┌──────────────────────┐ ┌──────────────────────────────────┐│
│ │ Bar Chart │ │ Bar Chart ││
│ │ Query: payment- │ │ Query: payment- ││
│ │ reconciliation Q6 │ │ reconciliation.sql Q9 ││
│ └──────────────────────┘ └──────────────────────────────────┘│
└─────────────────────────────────────────────────────────────────┘

Dashboard Configuration Tips

General Settings

  1. Auto-refresh: Enable for operational dashboards (5-15 minutes)
  2. Timezone: Set to business timezone
  3. Date defaults: Last 30 days for most dashboards
  4. Export: Enable CSV export for all tables
  5. Permissions: Set appropriate access levels

Filter Configuration

  1. Business ID: Hidden filter, auto-populated from user context
  2. Date Range: Default to last 30 days, allow custom
  3. Location: Multi-select, default to "All"
  4. Status: Single select, default to "Completed"

Color Schemes

  • Returns: Blue tones (#1E88E5, #42A5F5)
  • Exchanges: Green tones (#43A047, #66BB6A)
  • Warnings: Yellow/Orange (#FFA726, #FF9800)
  • Alerts: Red tones (#E53935, #EF5350)
  • Success: Green (#4CAF50)

Performance Optimization

  1. Query caching: Enable 5-minute cache for heavy queries
  2. Result limits: Cap tables at 100-500 rows
  3. Indexes: Ensure all required indexes exist
  4. Materialized views: Consider for complex aggregations

Total Dashboards: 8
Total Queries Used: 41
Setup Time: ~2.5 hours
Maintenance: Monthly review recommended