Skip to main content

Overview

This guide covers administration and configuration of the Financial Close Setup Wizard (FA-UX-01). The wizard uses the PF-41 configurable wizard infrastructure.

Architecture

Components

Database Template

The wizard template is seeded in pf_wizard_templates with:
  • Module: fa
  • Wizard Type: setup
  • 6 steps (2 form-based, 4 custom components)

Permission Requirements

Configuration

Wizard Settings

The wizard uses these fa_module_settings fields (if configured):

Checklist Templates

For the wizard to function, at least one checklist template must exist:
  1. Navigate to FA → Close Management → Checklist Templates
  2. Create a template with is_template = true
  3. Add tasks to the template with categories:
    • reconciliation
    • reporting
    • review
    • approval

Draft Persistence

The wizard uses PF-41 draft persistence:
  • Storage: Local storage with localforage
  • Key: fa-setup-wizard-draft-{organizationId}
  • Auto-save: Every 30 seconds
  • Expiration: 30 days

Clearing Drafts

Users can clear their draft by:
  1. Completing the wizard
  2. Starting a new wizard session and not saving
Admins can view draft statistics in PF-41 admin (if deployed).

Event Publishing

The wizard publishes the following event on completion:
This event is broadcast on the fa_events Supabase channel for real-time notifications.

Customization (Future)

When PF-41 wizard builder is deployed, organizations will be able to customize:
  • Step order and visibility
  • Required vs optional fields
  • Custom validation rules
  • Additional form fields
  • Step skip conditions

Monitoring

Wizard Usage

Query wizard completion events:

Draft Statistics

Query draft statistics (requires PF-41 admin tables):

Troubleshooting

Wizard Template Not Loading

  1. Verify the template exists:
  1. Check the migration ran successfully
  2. Verify is_active = true

Custom Steps Not Rendering

  1. Verify step registration in registerFAWizardSteps.ts
  2. Check browser console for import errors
  3. Verify component IDs match template configuration

Event Publishing Failures

Event publishing is non-blocking. Failures are logged but don’t prevent wizard completion. Check Supabase logs for channel errors.

Performance Considerations

  • Task Batch Size: For templates with 50+ tasks, consider pagination in review step
  • User Fetching: Uses staleTime: 5min to reduce API calls
  • Draft Auto-save: 30-second interval prevents excessive storage writes

Security

  • All database operations include organization_id filter (defense-in-depth)
  • RLS policies enforce tenant isolation
  • User assignments validated against organization membership
  • No PHI/PII exposed in wizard data