Manage Employee Accounts in /Dashboard

Goal

Enable a Company Admin to manage employee accounts directly from the Bloomy Earth /Dashboard: add/remove employees, allocate Tree Credits to employee accounts (manual admin → employee transfer), track trees planted per employee, run an internal company leaderboard, and leverage the existing Slack integration to drive engagement and visibility.

Roadmap references

Manual Tree Credit transfer (Company Admin → Employee): https://roadmap.bloomy.earth/p/transfer-tree-credits-manually-from-company-admin-to-employe-AgUyrA

Slack integration (already in production): https://roadmap.bloomy.earth/p/slack-integration-cepjgh


Scope

In /Dashboard (Company Admin area)

Employee directory management: create/invite, view, disable/remove access.

Tree Credits allocation: transfer credits from company balance to an employee account with full traceability.

Employee impact reporting: trees planted per employee, filterable by reporting period, exportable.

Company leaderboard: ranking of employees by trees planted for the selected period, with simple engagement KPIs.

Slack engagement: optional notifications and recaps using the existing Slack integration (no re-implementation).

Out of scope (for this feature)

SSO/SCIM provisioning, advanced HRIS sync, granular RBAC beyond “Company Admin vs Employee” (unless already present), cross-company employee membership (unless already supported in your data model).


Functional requirements

1) Employee account management

Company Admin can access a dedicated “Employees” section in /Dashboard.

Admin can add an employee by email (invite flow or instant attach if the user already exists).

Admin can disable/remove an employee’s access for the company while preserving historical impact records (non-destructive).

Employee list supports search and pagination.

2) Allocate Tree Credits to employee accounts (manual transfer)

Company Admin can transfer a specified number of Tree Credits from the company balance to a selected employee account.

Transfer requires sufficient company balance and is processed atomically (no partial updates).

Every transfer is recorded in a ledger/audit log with: source (company), destination (employee), amount, initiator, timestamp, and optional reason/comment.

Employee-level credit balance (or allocation) updates immediately after a successful transfer.

3) Employee impact reporting

Company Admin can view trees planted per employee for a selected time period (month/quarter/year/custom range, depending on existing reporting period model).

Totals reconcile with the planting event source of truth (no mismatch between reporting and actual events).

Export is available (CSV minimum): employee identifier (email/userId), treesPlanted, creditsUsed (if applicable), periodStart, periodEnd.

4) Company leaderboard

Company Admin can view a leaderboard ranking employees by trees planted for the selected period.

Ties are handled deterministically (e.g., most recent planting date, then alphabetical).

Leaderboard includes basic KPIs: total trees planted (company), active planters count, average per employee.

5) Slack integration usage (existing feature)

If Slack is connected (already in prod), Company Admin can enable optional notifications and select a target channel.

Supported triggers (minimum): “credits granted to employee”, “employee planted a tree”, “weekly/monthly leaderboard recap”.

Slack messages include employee display name (when available), key metrics, and a link back to /Dashboardreporting/leaderboard.

Anti-spam controls exist (rate limiting and/or scheduled digest mode).


Business rules

Credits are owned at company level and can be allocated/transferred to employee accounts under admin control.

Employee planting activity must be attributable to the company for reporting and leaderboard purposes.

Disabling/removing an employee never deletes impact history; it only revokes access and affects future allocations/actions.


Access control & security

Only Company Admins can manage employees and allocate credits.

Strict tenant isolation: admins can only manage employees within their own company.

Audit logging is mandatory for sensitive operations (invite/add, disable/remove, credit transfer, Slack notification configuration changes).


Non-functional requirements

Performance: employee list, reporting, and leaderboard must remain responsive with pagination and efficient aggregation (caching/rollups acceptable).

Reliability: credit transfers are transactional and idempotent where applicable (prevent duplicate transfers on retry).

Observability: failures in Slack notifications are logged with status (sent/failed) and retriable strategy (if already used elsewhere).


Acceptance criteria (feature-level)

Company Admin can add an employee, allocate Tree Credits to them, and see the updated balances immediately.

Trees planted by employees appear correctly in per-employee reporting for any selected period.

Leaderboard ranks employees correctly for the selected period with deterministic tie-breaking.

Employee access can be disabled/removed without losing historical reporting data.

When Slack is connected, enabled triggers generate the expected notifications/recaps in the selected channel without spamming.