Campaign Creation Flow - Business Rules & Test Cases
Document Purpose: Comprehensive specification of the campaign creation flow, including onboarding, story collection setup, and family integration.
Last Updated: July 12, 2025
Version: 1.0
Flow Path: /campaigns/create
đź“‹ Table of Contents
Flow Overview
Flow Purpose
The campaign creation flow is the primary onboarding experience for new users, guiding them through setting up their first story collection campaign and completing their account setup.
Flow Types
- First-Time User: Complete onboarding with campaign creation
- Incomplete Campaign Resume: Continue from previous step
- Additional Campaign: Create new campaigns after initial setup
Core Principles
- Guided Onboarding - Step-by-step process for new users
- Progress Preservation - Save progress at each step
- Flexible Family Setup - Optional family member addition
- Setup Completion - Mark user as fully onboarded
Business Rules
BR-CC-001: Middleware Integration
- Rule: Campaign creation is the default destination for incomplete users
- Trigger: User accesses dashboard with
setup_completed = false - Redirect:
/campaigns/create?step=1or withcampaign_idfor resume - Test: Verify middleware redirects work correctly
BR-CC-002: Campaign Resume Logic
- Rule: Users can resume incomplete campaigns
- Implementation: Check for incomplete campaigns in middleware
- URL Format:
/campaigns/create?step=1&campaign_id={id} - Test: Verify campaign data restoration
BR-CC-003: Setup Completion
- Rule: Completing campaign creation sets
setup_completed = true - Effect: Enables full dashboard access
- Business Impact: Users can access all features after onboarding
- Test: Verify setup completion flag setting
BR-CC-004: Family Integration
- Rule: Campaign creation can include family setup
- Optional: Family member addition is not required
- Link: Campaigns can be linked to family groups
- Test: Verify family integration works correctly
User Experience Requirements
UX-001: Progressive Disclosure
- Show only relevant information at each step
- Use clear progress indicators
- Provide help text and examples
UX-002: Mobile Responsiveness
- Optimize for tablet and mobile devices
- Use touch-friendly interface elements
- Ensure readability on small screens
UX-003: Error Handling
- Provide clear validation messages
- Allow users to correct errors inline
- Maintain form data during error states
API Integration
Campaign Creation API
- Endpoint:
/api/campaigns - Method: POST
- Authentication: Required
- Payload: Campaign configuration and family data
Progress Saving
- Endpoint:
/api/campaigns/create-flow/{id}/step/{number} - Method: PUT
- Purpose: Save progress at each step
Test Case Categories
Critical Path Testing
-
Complete First Campaign Creation
- New user → Campaign setup → Completion → Dashboard access
- Verify setup_completed flag setting
- Test middleware behavior change
-
Campaign Resume Flow
- User with incomplete campaign → Resume → Complete
- Verify data restoration
- Test step navigation
Integration Testing
-
Family Integration
- Campaign creation with family setup
- Family member invitation flow
- Campaign visibility within family
-
Dashboard Integration
- Campaign appears in dashboard after creation
- Campaign analytics and management
- Story collection initiation
Error Scenarios
-
Network Failures
- API timeout during creation
- Database connection issues
- Email sending failures
-
Validation Errors
- Invalid storyteller information
- Duplicate campaign names
- Family setup errors
This document is a template. Complete implementation details should be added as the campaign creation flow is developed.
Last Updated: July 12, 2025
Maintained by: Development Team