Export Data

Feature Owner: James Derick Billate
Module: Dashboards
Priority: Could
Date: July 7 2026

Executive Summary

What is this feature?

Export Data allows Agency Admins to view and export agency team and learner information into CSV files. The feature supports agency-level reporting by giving admins access to member status, creator/reviewer information, learner quest enrollment, and learner progress data from the Agency dashboards.

Why does it matter?

Agency Admins often need to create reports for team activity, learner progress, content quality, and operational review. Without export support, they must manually copy data from the dashboard and clean it in spreadsheets, which is time-consuming and error-prone. Export Data reduces manual reporting work and gives agencies a more reliable way to transfer dashboard information into external tools.

What's the MVP scope?

  • Creator analytics overview.

  • Reviewer analytics overview.

  • Learner analytics overview.

  • Export team members as .csv.

  • Export learner quest progress as .csv.


1. User Pain Point & Solution

John manages an agency with invited creators, reviewers, learners, and assigned quests. He needs to review team workflow, content quality, and learner progress, but without export tools he must manually type or copy information from the dashboard into a spreadsheet. Export Data gives him a direct CSV file that can be used for reporting, audits, and deeper analysis.

Pain Points

  • Emotional: Tired, exhausted, confused, and unsettled when reporting takes too much manual work.

  • Functional: No direct data transfer, no clean report file, higher risk of wrong inputs, missing data, and spreadsheet incompatibility.

  • Business: Agencies need efficient processing and better understanding of team and learner data to improve workflow and quest delivery.


2. User Pain Point & Solution

Diagnose: Provides Agency Admins a way to check whether the agency workflow is effective and whether learners are progressing through assigned quest content.

Design: Generates exportable reports that summarize team composition, learner enrollment, and learner completion progress.

Develop: Supports agency operations by making creator, reviewer, and learner data easier to review and process.

Deliver: Helps the agency make better decisions and improve quest quality through clean reporting and external analysis.


3. USER FLOWS

Entry Points: Agency Admin logs in and navigates to the Agency workspace, then opens either Team or Learners.

Success Criteria: Agency Admin can view team or learner dashboard data and export the visible data as a CSV file.

Main Path (Happy Path)

  1. Agency Admin signs in.

  2. Agency Admin opens the Agency dashboard.

  3. Agency Admin navigates to Team.

  4. System loads agency members, agency information, and creator/reviewer analytics.

  5. Agency Admin clicks Export Team Data.

  6. System downloads a CSV file named with the agency name and export type.

  7. Agency Admin navigates to Learners.

  8. System loads learners and their enrolled quest progress.

  9. Agency Admin clicks Export Learner Data.

  10. System downloads a CSV file containing learner, quest, progress, and last visited data.

No Data: Display empty table or no-member/no-learner state when agency data does not exist.

API Error: Stop the listing/export flow and display the proper error message through toast or page state.

Permission Denied: Block the request and prevent non-admin users from viewing or exporting agency data.

Decision Points:

  • IF agency exists THEN display Team or Learners dashboard ELSE show create agency or no-agency state.

  • IF user is Agency Owner/Admin THEN allow dashboard data fetch ELSE show access restricted state.

  • IF Team export is clicked THEN export current team member dataset ELSE remain on Team dashboard.

  • IF Learner export is clicked THEN export learner quest progress dataset ELSE remain on Learner dashboard.

  • IF export generation fails THEN show export error toast ELSE show success toast.


4. Information Architecture

Primary Information

  • Agency information.

  • Agency member information.

  • Creator information.

  • Reviewer information.

  • Learner information.

  • Learner enrolled quest information.

  • Learner quest progress.

Secondary Information

  • Analytics type: Team or Learners.

  • Member role.

  • Member status.

  • Creator quest counts.

  • Shared quest counts.

  • Learner completion rate.

  • Last visited quest timestamp.

Tertiary Information

  • Agency plan.

  • Monthly token budget.

  • Current user marker.

  • CSV filename.

Actions

  • Primary CTA

    • "Export Team Data"

    • "Export Learner Data"

  • Secondary Actions

    • Open Team.

    • Open Learners.

    • Switch between All, Creators, and Reviewers.

    • Refresh dashboard data.

    • Invite Member.

    • View individual learner quest details.


5. Data Requirements

Frontend Needs

  • Agency ID, name, monthly token budget, and plan.

  • Agency member ID, invited email, display name, role, status, monthly token limit, and platform role.

  • Creator quest count and public share count.

  • Learner ID, learner name, enrolled quests, quest title, progress percentage, and last visited timestamp.

  • Current user's agency membership and ownership/admin status.

API Calls Frontend Will Make

  • GET /api/agency/status

  • GET /api/agency/team/list

  • GET /api/agency/learners

  • POST /api/agency/team/claim


6. Performance Considerations

Database Optimization

  • Export Data does not require a dedicated database table because it exports already available dashboard data.

  • Fetch only required fields for agency, members, quests, enrollments, and learner progress.

  • Use agency ID, user clerk ID, learner ID, and quest ID filters to avoid cross-agency reads.

  • Batch related lookups where possible to avoid N+1 query patterns.


7. Security & Authorization

Who Can Access This Feature?

Administrator: No access.
Reviewer: No access.
Creator: No access.
Learner: No access.
Agency Admin: Full access.


8. Error Handling

Current Existing Error Handling

  • Invalid credentials -> 401 Unauthorized.

  • Expired session -> 401 Unauthorized with redirect to login.

  • Unauthorized agency member -> access restricted page.

  • Agency not found -> 404 Not Found.

  • Failed team data fetch -> toast error message.

  • Failed learner data fetch -> toast error message.

  • Failed server connection -> toast error message.

  • Failed CSV generation -> export failure toast.


9. Testing Checklist

Happy Path

  • Sign in as an Agency Owner/Admin.

  • Navigate to Agency Team.

  • Team members list loads successfully.

  • Creator and Reviewer filters display correct member subsets.

  • Click Export Team Data.

  • CSV file downloads with expected agency-based filename.

  • CSV excludes internal-only fields that should not appear in reports.

  • Navigate to Agency Learners.

  • Learner list loads successfully.

  • Click Export Learner Data.

  • CSV file downloads with learner ID, learner name, quest title, progress percentage, and last visited timestamp.

Edge Cases

  • Unauthorized account attempts to access Team or Learners.

  • Agency does not exist.

  • Agency has no members.

  • Agency has no learners.

  • Learner has no enrolled quests.

  • Quest progress is missing or null.

  • Agency name includes spaces or special characters.

  • Browser blocks or fails file download.

  • CSV generation fails.


10. OPEN QUESTIONS

  • Should CSV export move from client-side generation to a dedicated backend route such as /api/agency/admin/export-csv?

  • Should there be login history or last active date for agency users?

  • Should exports include date range filtering?

  • Should exports include only visible filtered data or the full agency dataset?

  • Should exports include learner email and enrollment status, or only progress data?


11. OUT OF SCOPE

  • Agency Admin login history for agency users.

  • Agency Admin login analytics for agency users (e.g. time logged, device logged, duration logged)

  • Deep analytics beyond dashboard summary and CSV export.

  • PDF export.

  • Scheduled reports.

  • CSV import.

  • Cross-agency export.


12. SUCCESS METRICS

  • Agency Admin can export team member data as CSV.

  • Agency Admin can export learner quest progress data as CSV.

  • Creator, reviewer, and learner information is visible in agency dashboards.

  • Exported CSV can be opened in spreadsheet tools without manual cleanup.

  • Unauthorized users cannot export agency data.


18. DEPENDENCIES

This feature depends on

  • Clerk Authentication

  • Agency Creation

  • Agency Membership

  • Creator, Reviewer, and Learner details

  • Quest Enrollments

  • Supabase Database

  • PapaParse CSV generation

This feature depends on this

  • Agency Dashboard

  • Agency Team Management

  • Agency Learners Dashboard

  • Creator and Reviewer Analytics

  • Learner Quest Progress


19. TIMELINE & OWNERSHIP

Backend: James Derick Billate

Frontend: James Derick Billate

QA: Internal development testing

Estimated Completion: Feature completed.


Note: API Endpoints and Schema please refer to its Technical Documentation


Was this article helpful?