18. Lead & Client Management
Pixally CRMLead & Client Management
Lead & Client Management
Functional Requirement Document
BA & Ideation: Deval Chauhan
Reviewed By: Keval Gajjar
Updated Date:16 December 2025
Status:
Version: 1.0
Lead & Client Management Module - FRD Summary
Module: Lead & Client Management | FRDs: 15 | Test Cases: 352 | Date: December 17, 2025
FRD #1: Create Client / Company
- Entry points: Client Listing → "+ New Client/Company" button OR Project/Company profiles
- Create Client Modal: Full Name*, Email*, Phone*, Company (optional), Address fields, Internal Note
- Create Company Modal: Company Name*, Industry, Contact fields (Email, Phone, Address)
- Client-Company association: One company per client; multiple clients per company
- Project association during creation: Select project + mandatory Client Role dropdown
- Client Role categories vary by event type (Wedding, Corporate, Birthday, etc.)
- Status determination: No project = Lead; Project with signed proposal OR payment = Booked Client
- Email uniqueness validation within agency (case-insensitive)
- Phone: 7-15 digits only; auto-prepend +1 if not specified
- Country/State cascading dropdowns
- Duplicate detection: Email only (not phone)
- Company can be created inline during client creation
- Client automatically associates with company if created together
FRD #2: Import Lead
- Access: Client Listing → "Import Data" button
- Modal with 2 tabs: Import (active) and History
- File requirements: CSV/XLS/XLSX; 15MB max; 500 rows max
- Template download: "lead_import_template.csv" with headers + 2 sample rows
- Required fields: Full Name, Email, Phone Number
- Optional fields: Street Address, Country, State, City, Zip, Internal Note
- Column mapping: Auto-detection + manual adjustment; preview 3-5 rows
- Duplicate handling: Email match (case-insensitive) UPDATES existing record
- Status preservation: Booked Client remains Booked Client during override
- Processing: Sequential; 2-5 minutes for 500 rows; continues if modal closed
- Results: All Success / Partial Success / All Failed screens
- Failure report: Download CSV with failed rows + error column
- History tab: Shows past imports with date, status, counts
- Import creates Leads only (never Booked Clients directly)
FRD #3: Client / Lead / Company Listing
- Tab structure: Booked Clients (default), Leads, Companies
- Badge counts: Real-time totals per tab
- Booked Clients: Clients with signed proposal OR payment on ANY project
- Leads: Clients without signed proposal AND without payment
- Table columns vary by tab; multi-value fields show "2 items +X" overflow
- Search: 300ms debounce; case-insensitive partial match; searches Name/Email/Phone/Company
- Filters: Primary Client Only toggle; multi-select Brands/Projects/Company/Industry
- Filter logic: OR within same filter; AND across different filters
- Sorting: Click header for ASC/DESC; default = Last Updated DESC
- Pagination: 25 (default)/50/100 per page
- Row actions: Edit, Archive, Delete (3-dot menu)
- Archive restrictions: Cannot archive if sole contact on active project
- Download: CSV export of filtered results + address fields
- Create dropdown: Client/Lead OR Company options
- View Archive: Navigate to archived listing
FRD #4: Archived Client / Lead / Company Listing
- Access: "View Archive" button from active listing
- Visual: Gray background (#F5F5F5); muted text (#666666); "Archived" label
- Same tab structure: Shows archived records only
- Edit action NOT available (must unarchive first)
- Unarchive: Immediate, no confirmation; restores all associations
- Portal access restored on unarchive; original status preserved
- Delete: Permanent with confirmation; cannot be undone
- Search/filter: Works on archived records only; separate from active state
- Archive restrictions enforced: Sole contact / active project checks
- Company restriction: Cannot archive if clients have active projects
- Download includes archive date column
- "View Active" button returns to active listing
FRD #5: Client Profile > Overview Tab
- Header: Name, Status badge (Lead/Booked), Edit/Archive/More actions
- Status: System-determined; Lead (yellow) or Booked Client (green)
- Contact Info card: Email (mailto), Phone (copy), Address, Internal Note
- Company card: Shows association or empty state; Change/Remove options
- Projects card: List with role, status, brand; "+ Add to Project" button
- Financial Summary: Total Invoiced/Paid, Outstanding, Last Payment Date
- Activity Timeline: Chronological communications, notes, system events
- Portal Settings: Magic links per brand; copy/regenerate functions
- Archive checks for sole contact restriction
- Edit modal: Pre-populated; same validations as Create
- Company management: Add/Change/Remove inline
- Project association: Updates status to Booked if qualified
FRD #6: Client Profile > Communications Tab
- Email threads grouped by subject
- Compose email: To/CC/BCC, subject, rich text editor, attachments (25MB)
- Templates: Insert from library (filtered by brand)
- Smart fields: Client name, project details, dynamic content
- Attachments: Upload multiple; preview before send
- Send options: Immediate or scheduled
- Email tracking: Sent, Delivered, Opened, Clicked timestamps
- Thread view: Collapsible conversations; newest first
- Reply/Forward within thread context
- Search emails by subject, content, date range
- Filter: Sent/Received, Read/Unread, Has Attachments
- Bulk actions: Mark read/unread, archive threads
- Integration with project emails (if applicable)
FRD #7: Client Profile > Meetings
- Calendar view: Month/Week/Day toggle
- Create meeting: Title, Date/Time, Duration, Location/Virtual link
- Meeting types: In-person, Video Call, Phone Call
- Attendees: Add multiple clients, team members
- Recurring meetings: Daily/Weekly/Monthly patterns
- Reminders: Email/SMS options; customizable timing
- Meeting notes: Rich text; attach files
- Integration with Google Calendar/Outlook (if configured)
- Join button for video meetings (Zoom/Meet/Teams)
- Reschedule: Drag-drop or edit form
- Cancel meeting: With notification to attendees
- Meeting history: Past meetings with notes/recordings
- Timezone handling: Agency default with conversion display
- Availability checking (if calendar integrated)
FRD #8: Client Profile > Payments Tab
- Payment list: All transactions across projects
- Columns: Date, Amount, Method, Invoice #, Project, Status
- Payment methods: Credit Card, ACH, Check, Cash, Other
- Status indicators: Paid, Pending, Failed, Refunded
- Quick filters: By project, date range, payment method
- Total summary: Paid to date, Outstanding balance
- Payment details modal: Full transaction info, receipt download
- Refund capability: Partial or full with reason
- Export: CSV/PDF of payment history
- Integration with Stripe/payment gateway
- Failed payment retry options
- Payment receipts: Auto-generated PDFs
- Payment notes: Internal comments on transactions
FRD #9: Client Profile > Notes Tab
- Note types: General, Call, Meeting, Follow-up, Other
- Create note: Title, type selector, rich text content
- Timestamp: Auto-captured with user attribution
- Pin important notes to top
- Search notes by content, type, date
- Filter: By type, date range, created by
- Edit own notes; view-only for others' notes
- Delete with soft-delete (admin recovery)
- Note templates for common scenarios
- Attach files to notes (10MB limit)
- @mention team members for notification
- Activity feed integration
- Private notes: Visible to creator + specified users only
- Bulk export notes to PDF
FRD #10: Leads Profile
- Simplified version of Client Profile
- No financial summary (no invoices/payments)
- Lead-specific fields: Source, Interest Level, Follow-up Date
- Lead score/rating system (1-5 stars)
- Conversion tracking: Lead → Booked Client history
- Quick convert: One-click to create project + convert
- Lead pipeline stages: New, Contacted, Qualified, Proposal Sent, Lost
- Lead source tracking: Website, Referral, Social Media, etc.
- Competitor tracking if lost
- Follow-up reminders and tasks
- Bulk lead actions: Email, assign, tag
- Lead analytics: Conversion rate, time to convert
FRD #11: Company Profile
- Header: Company name, industry, website, social links
- Contact Info card: Main office address, phone, general email
- Clients card: List of associated clients with roles
- Projects summary: Active, completed, total value
- Brands association: Which brands work with company
- Documents: Contracts, agreements, NDAs
- Company notes: Shared across all clients
- Billing preferences: NET terms, tax exempt status
- Add client: Inline create or associate existing
- Remove client: With confirmation if has projects
- Archive restrictions: No clients with active projects
- Duplicate check: Company name (case-insensitive)
FRD #12: Edit Client
- Access: Edit button on listing or profile
- Pre-populated modal with all current data
- Cannot edit: Status (system-determined), direct project associations
- Email change: Uniqueness check excluding current client
- Address updates cascade to tax calculations
- Company change: Via separate Company card action
- Save validates all fields same as Create
- Update triggers: Activity log, last modified timestamp
- Concurrent edit: Last save wins
- Cancel with unsaved changes: Confirmation prompt
- Success toast: "Client updated successfully"
FRD #13: Edit Company
- Access: Edit button on listing or company profile
- Fields: All editable except client associations
- Industry: Dropdown + custom option
- Name uniqueness within agency
- Address change affects all client tax calculations
- Cannot change client associations here
- Validation same as Create Company
- Updates reflected immediately in client profiles
FRD #14: Client Delete
- Soft delete (archive) vs hard delete options
- Restrictions: Cannot delete if sole contact on project
- Cannot delete with unpaid invoices
- Confirmation modal: "This cannot be undone"
- Cascade behavior: Remove from company, preserve in history
- Audit trail: Who deleted, when, reason field
- Recovery: Admin-only within 30 days
- Email notification to client (optional)
- Bulk delete: Multiple selection with same restrictions
FRD #15: Company Delete
- Restrictions: No clients attached
- Cannot delete with active project references
- Two-step confirmation for permanent delete
- Option to archive instead of delete
- Historical data shows "Deleted Company" placeholder
- Cannot recover once deleted
- Audit log entry maintained
- Check for financial transactions before delete
TBD Items (Requiring Future Clarification)
- Portal access rules for leads vs clients
- Character limits for all text fields
- Duplicate client merge functionality
- Bulk import error recovery process
- International phone number formatting
- Custom field definitions
- API integration for client sync
- Client portal self-registration
- GDPR compliance for data deletion
- Multi-currency support for companies
- Client communication preferences
- Automated lead scoring algorithm
- Social media integration for profiles
- Document storage limits per client
- Two-factor authentication for portal access
Total: 15 FRDs | 12 Sections Each | 352 Test Cases | 263 Acceptance Criteria
1. Create Client / Company
FRD #1: Create Client / Company
Document Version: 1.0 Created Date: December 16, 2025 Module: Create Client / Company Platform: Pixally CRM - Agency Portal
1. Module Overview
1.1 Purpose
This document defines the functional requirements for creating new Clients (including Leads) and Companies within the Pixally CRM system. The Create Client/Company functionality allows agency users to manually add new contacts and organizations to the system, establishing the foundation for project management, communication, and financial tracking.
1.2 Scope
This FRD covers:
- Create New Client/Lead flow
- Create New Company flow
- Client-Company association during creation
- Client-Project association during creation
- Form validations and business rules
- Status assignment logic (Lead vs Booked Client)
1.3 Key Business Rules
Rule ID
Rule Description
BR-001
A newly created client without any project attachment defaults to Lead status
BR-002
A client attached to a project with a signed proposal OR payment made becomes a Booked Client
BR-003
A client attached to a Lead project (no signed proposal, no payment) remains a Lead
BR-004
Client Role is mandatory when attaching a client to a project
BR-005
A client can be associated with only one company at a time
BR-006
A company can have multiple clients associated with it
BR-007
Companies cannot be directly linked to projects; projects always associate with clients
2. User Roles & Permissions
Role
Create Client
Create Company
Attach to Project
Attach to Company
View
Agency Owner (AO)
✅
✅
✅
✅
✅
Agency Admin
✅
✅
✅
✅
✅
Account Manager (AR)
✅
✅
✅
✅
✅
Team Member
✅
✅
✅
✅
✅
Contractor
❌
❌
❌
❌
Limited
Client
❌
❌
❌
❌
❌
Note: Permission matrix is subject to confirmation based on the Roles & Permissions module. [TBD: PM to confirm role-based access for client/company creation]
3. User Flow
3.1 Access Points
Access Point
Navigation Path
Available Options
Client Listing Header
Clients & Contractors → Clients → "+ New Client/Company" button
Client/Lead, Company
Client Profile (Add Company)
Client Profile → Company Section → "+ Add Company"
New Company, Existing Company
Company Profile (Add Client)
Company Profile → Client(s) Section → "+" button
New Client, Existing Client
Project Module
Project → Clients Tab → Add Client
New Client, Existing Client
3.2 Create Client/Lead Flow
User clicks "+ New Client/Company" button in the client listing header. System displays dropdown with two options: "Client/Lead" and "Company". User selects "Client/Lead". System opens the Create New Client modal.
3.3 Filling Client Information
User enters Full Name (mandatory). User enters Email Address (mandatory). User enters Phone Number with country code (mandatory). User optionally selects a Company from the dropdown. User optionally fills address fields (Street, Country, State, City, Zip). User optionally adds Internal Note (max 1000 characters).
Field Display Order:
- Full Name*
- Email Address*
- Phone Number* (Country Code dropdown + Number input)
- Company (dropdown)
- Street Address
- Country
- State
- City
- Zip/Postal Code
- Internal Note (textarea)
3.4 Adding Client to Project (Optional)
User checks "Add client to existing project" checkbox. System displays two additional dropdowns: Project and Client Role. User selects a Project from the dropdown. System populates Client Role dropdown based on project's event type. User selects a Client Role. Both fields become mandatory when checkbox is checked.
3.5 Status Warning Display
System displays a yellow alert box (always visible) with status behavior:
- Attached to Booked project → Booked Client
- Attached to Lead project → Lead
- No project attached → Defaults to Lead
3.6 Submitting Client Form
User clicks "Create Client" button. System validates all mandatory fields. If validation fails, system displays inline errors below each failed field. If validation passes, system creates client record. System displays success toast notification. System closes modal. System refreshes the client listing.
3.7 Cancel Client Creation
User clicks "Cancel" button. If form has data, system displays confirmation prompt: "Discard changes?" User confirms to close modal without saving.
3.8 Create Client from Company Profile
User navigates to Company Profile → Client(s) Section → "+" button → "New Client". System opens Create Client modal with Company pre-selected and disabled. User fills remaining fields and submits.
3.9 Create Client from Project Module
User navigates to Project → Clients Tab → Add Client → "New Client". System opens Create Client modal with "Add to project" checkbox pre-checked. System pre-selects the current Project in dropdown. User fills remaining fields, selects Client Role, and submits.
3.10 Create Company Flow
User clicks "+ New Client/Company" button in the client listing header. System displays dropdown with two options. User selects "Company". System opens the Create New Company modal.
3.11 Filling Company Information
User enters Company Name (mandatory). User selects Industry from dropdown (mandatory). If "Other" selected, system displays "Please specify industry" text field (mandatory). User optionally fills Email Address, Phone Number, Website. User optionally fills address fields (Street, Country, State, City, Zip). User optionally adds Internal Note (max 1000 characters).
3.12 Attaching Clients to Company
Option A: Attach New Client(s) User clicks "Attach New Client" option. System displays inline client form with Full Name*, Email*, Phone* fields. User fills client details. User clicks "+ Add Another" to add more clients. User clicks trash icon to remove a client row.
Option B: Attach Existing Client(s) User clicks "Attach Existing Client" option. System displays searchable list of existing clients. User searches and selects clients via checkboxes (multi-select). System shows warning indicator if client has existing company association.
3.13 Submitting Company Form
User clicks "Create Company" button. System validates Company Name, Industry, and conditional fields. If validation fails, system displays inline errors. If validation passes, system creates company record. System creates new client records (if any). System creates/updates client-company associations. System displays success toast with client count. System closes modal and refreshes listing.
4. Functional Logic
4.1 Create Client Modal - Empty State
System opens modal with all text inputs empty (with placeholder text). System sets Phone Number country code to user's detected country or defaults to United States (+1). System loads Company dropdown with "Select Company" placeholder. System populates Company dropdown with all active companies. System loads Country dropdown with "Select Country" placeholder and all countries. System disables State dropdown (enabled only after Country selection). System displays "Add client to existing project" checkbox as unchecked.
4.2 Field Dependencies and Data Loading
Company Dropdown: System fetches all active companies from database. System sorts companies alphabetically by name. System enables type-ahead search functionality.
Country Dropdown: System loads countries from master country list. System displays flag icons next to country names. System places common countries (USA, Canada, UK) at top of list.
State Dropdown: System keeps State dropdown disabled until Country is selected. When user selects Country, system populates State dropdown with matching states/provinces. If selected country has no states, system displays "N/A" and keeps dropdown disabled.
Project Dropdown: When user checks "Add to project" checkbox, system queries Active projects. System filters projects by user's access permissions. System sorts projects by most recently updated (newest first).
Client Role Dropdown: When user selects a Project, system reads project's event type. System populates Client Role dropdown with roles matching the event type.
4.3 Client Role Categories by Event Type
Event Type
Available Roles
Wedding
Bride, Groom, Bride's Parents, Groom's Parents, Wedding Planner, Maid of Honor, Best Man, Other Family Member, Vendor Contact
Corporate/Brand Shoot
Marketing Manager, Brand Manager, Project Coordinator, Creative Director, Product Owner, Stakeholder, Vendor Contact
Music Video
Artist/Performer, Manager, Label Representative, Creative Director, Producer, Choreographer
Real Estate
Property Owner, Real Estate Agent, Developer, Architect, Interior Designer, Property Manager
General
Primary Contact, Secondary Contact, Decision Maker, Budget Holder, Technical Contact, Other
4.4 Client Status Assignment Logic
System automatically determines client status based on project association.
Scenario 1: No Project Attached System assigns "Lead" status to client.
Scenario 2: Project Attached System checks if project has signed proposal (proposal.status = "Signed" AND proposal.signature_date IS NOT NULL). System checks if project has completed payment (payment.status = "Completed" for at least one payment). If EITHER condition is true → System assigns "Booked Client" status. If NEITHER condition is true → System assigns "Lead" status.
4.5 Create Client - Validation Rules
Full Name Validation: System checks field is not empty. System validates minimum 2 characters. System validates maximum 100 characters.
Email Validation: System checks field is not empty. System validates email format (RFC 5322). System checks email is unique within agency (excluding archived clients).
Phone Validation: System checks country code is selected. System validates phone number is 7-15 digits.
Conditional Validation (when "Add to project" checked): System validates Project is selected. System validates Client Role is selected.
4.6 Create Client - Record Processing
Step 1: Create Client Record System creates client record with all provided field values. System assigns determined status (Lead or Booked Client). System sets created_at and updated_at timestamps. System sets created_by to current user ID.
Step 2: Create Company Association (if applicable) If Company is selected, system creates client_company record. System sets company_id and client_id.
Step 3: Create Project Association (if applicable) If Project is selected, system creates client_project record. System sets project_id, client_id, and role_id.
Step 4: Post-Creation Actions System generates success toast message. System closes modal. System refreshes client listing to show new record.
4.7 Create Company - Empty State
System opens modal with all text inputs empty. System loads Industry dropdown with predefined categories. System disables State dropdown until Country selected. System hides "Please specify industry" field (shown only when "Other" selected).
4.8 Industry Selection with "Other" Handling
User selects "Other" from Industry dropdown. System displays "Please specify industry" text input. System marks text input as mandatory. System stores custom value in industry_other database field.
4.9 Client Attachment Logic
Attach New Clients: User clicks "Attach New Client" option. System displays inline form with Full Name*, Email*, Phone* fields. System applies same validation rules as Create Client form. User clicks "+ Add Another" to add additional client rows. User clicks trash icon to remove a client row. System supports unlimited new client additions.
Attach Existing Clients: User clicks "Attach Existing Client" option. System displays searchable list of all active clients. System enables multi-select via checkboxes. System shows warning icon next to clients with existing company associations. Warning text: "This client will be moved from [Current Company Name]"
Attach New Client:
- User clicks "Attach New Client" option.
- System displays inline form with Full Name*, Email*, Phone* fields.
- System applies same validation rules as Create Client form.
- User can attach only one new client at a time.
Attach Existing Client:
- User clicks "Attach Existing Client" option.
- System displays searchable list of all active clients.
- User can select only one client from the list at a time.
- System shows warning icon next to clients with existing company associations.
- Warning text: "This client will be moved from [Current Company Name]"
4.10 Create Company - Record Processing
Step 1: Validate Input System validates Company Name is not empty (min 2 chars). System validates Industry is selected. If Industry = "Other", system validates custom industry field is not empty.
Step 2: Create Company Record System creates company record with all provided field values. System sets created_at and updated_at timestamps.
Step 3: Process New Clients For each new client, system creates client record. System assigns "Lead" status to new clients. System creates client_company association.
Step 4: Process Existing Clients For each existing client, system updates client_company association. If client had previous company, system removes old association. System creates new client_company association.
Step 5: Post-Creation Actions System generates success message with client count. System closes modal. System refreshes company listing.
4.11 Impact on Other Modules
Module
Impact Description
Project Module
New clients appear in project client selection. Project client list updates immediately when client attached.
Financial Module
Clients on booked projects become eligible for invoicing. Invoice recipient populated from client email.
Email Module
Client email used as recipient for all communications. Email templates can use client Smart Fields.
Client Portal
Portal access granted when client attached to project. Magic link generated per brand. Portal URL sent via email.
Reports Module
Client/Lead counts updated in real-time dashboards. New clients appear in client reports.
Company Module
Company-client relationships visible in Company Profile. Client count updated on company cards.
5. Field Details & Validations
5.1 Create Client Fields
Field Name
Field Type
Mandatory
Max Length
Validation Rules
Default Value
Full Name
Text Input
Yes
100 chars
Not empty; Min 2 chars; Alphanumeric + spaces
Empty
Email Address
Email Input
Yes
255 chars
Valid format (RFC 5322); Unique within agency
Empty
Phone (Country Code)
Dropdown
Yes
N/A
Must select valid code
User's country or +1
Phone Number
Text Input
Yes
20 chars
Numeric only; 7-15 digits
Empty
Company
Dropdown
No
N/A
Must be existing company or empty
Empty
Street Address
Text Input
No
255 chars
Alphanumeric + special chars
Empty
Country
Text Input
No
N/A
Valid country from list
Empty
State
Text Input
No
N/A
Based on Country; Disabled if no Country
Empty
City
Text Input
No
100 chars
Alphanumeric + spaces
Empty
Zip/Postal Code
Text Input
No
20 chars
Alphanumeric
Empty
Internal Note
Textarea
No
1000 chars
Free text; Team-only visibility
Empty
Add to Project
Checkbox
No
N/A
Checked/Unchecked
Unchecked
Project
Dropdown
Conditional
N/A
Must select when checkbox checked
Empty
Client Role
Dropdown
Conditional
N/A
Must select when project selected
Empty
5.2 Create Company Fields
Field Name
Field Type
Mandatory
Max Length
Validation Rules
Default Value
Company Name
Text Input
Yes
150 chars
Not empty; Min 2 chars
Empty
Industry
Dropdown
Yes
N/A
Must select valid industry
Empty
Other Industry
Text Input
Conditional
100 chars
Not empty if Industry = Other
Empty
Email Address
Email Input
No
255 chars
Valid format if provided; Unique
Empty
Phone (Country Code)
Dropdown
No
N/A
Valid code if phone provided
+1
Phone Number
Text Input
No
20 chars
7-15 digits if provided
Empty
Website
URL Input
No
500 chars
Valid URL format (http/https)
Empty
Street Address
Text Input
No
255 chars
Alphanumeric + special chars
Empty
Country
Text Input
No
N/A
Valid country from list
Empty
State
Text Input
No
N/A
Based on Country
Empty
City
Text Input
No
100 chars
Alphanumeric + spaces
Empty
Zip/Postal Code
Text Input
No
20 chars
Alphanumeric
Empty
Internal Note
Textarea
No
1000 chars
Free text
Empty
6. Success Message Handling
6.1 Create Client Success Messages
Action
Success Message
Display Type
Duration
Client created without project
"Client created successfully"
Toast Notification
3 seconds
Client created with project
"[Client Name] created and added to [Project Name]"
Toast Notification
3 seconds
Client created with company
"[Client Name] created and associated with [Company Name]"
Toast Notification
3 seconds
Client created with project and company
"[Client Name] created, added to [Project Name], and associated with [Company Name]"
Toast Notification
4 seconds
6.2 Create Company Success Messages
Action
Success Message
Display Type
Duration
Company created without clients
"Company created successfully"
Toast Notification
3 seconds
Company created with new clients
"[Company Name] created with [X] new client(s)"
Toast Notification
3 seconds
Company created with existing clients
"[Company Name] created and [X] client(s) associated"
Toast Notification
3 seconds
Company created with mixed clients
"[Company Name] created with [X] new and [Y] existing client(s)"
Toast Notification
4 seconds
6.3 Success Message Behavior
Aspect
Behavior
Position
Top-right corner of screen
Animation
Slide in from right, fade out
Auto-dismiss
Yes, after specified duration
Manual dismiss
Click X icon to close immediately
Stacking
Multiple toasts stack vertically
Color
Green background with white text
7. Error Message Handling
7.1 Validation Errors
Field
Error Condition
Error Message
Display Location
Full Name
Empty
"Full name is required"
Below field
Full Name
< 2 characters
"Full name must be at least 2 characters"
Below field
Full Name
> 100 characters
"Full name cannot exceed 100 characters"
Below field
Email Address
Empty
"Email address is required"
Below field
Email Address
Invalid format
"Please enter a valid email address"
Below field
Email Address
Duplicate exists
"A client with this email address already exists"
Below field
Phone Number
Empty
"Phone number is required"
Below field
Phone Number
Invalid format
"Please enter a valid phone number"
Below field
Phone Number
< 7 digits
"Phone number must be at least 7 digits"
Below field
Phone Number
> 15 digits
"Phone number cannot exceed 15 digits"
Below field
Project
Not selected (when checkbox checked)
"Please select a project"
Below field
Client Role
Not selected (when project selected)
"Please select a client role"
Below field
Company Name
Empty
"Company name is required"
Below field
Industry
Not selected
"Please select an industry"
Below field
Other Industry
Empty (when Industry = Other)
"Please specify the industry"
Below field
Website
Invalid URL
"Please enter a valid website URL (include http:// or https://)"
Below field
Company Email
Duplicate exists
"A company with this email address already exists"
Below field
7.2 System Errors
Error Type
Error Message
Display Type
User Action
Network Error
"Unable to save. Please check your connection and try again."
Toast Notification
Retry
Server Error
"Something went wrong. Please try again later."
Toast Notification
Retry or contact support
Session Expired
"Your session has expired. Please log in again."
Modal
Redirect to login
Permission Denied
"You don't have permission to perform this action."
Toast Notification
Contact admin
8. Edge Cases
Edge Case ID
Scenario
Expected Behavior
Priority
EC-001
User creates client with email existing in archived records
Allow creation — archived separate from active
Medium
EC-002
User selects project, then unchecks checkbox
Project and Role fields clear and hide
High
EC-003
User changes Country after State selected
State dropdown resets and repopulates
High
EC-004
Client selected for company already has company
Warning: "Selected client(s) will be moved from current company"
High
EC-005
User attaches same client to company twice
Error: "Client already associated with this company"
Medium
EC-006
Network disconnects during submission
Form data preserved; error shown; retry available
High
EC-007
User closes modal without saving
Confirmation prompt: "Discard changes?"
Medium
EC-008
Internal note at character limit
Character counter shown; input blocked at limit
Low
EC-009
Special characters in name (é, ñ, 中文)
System accepts and stores Unicode correctly
Medium
EC-010
Formatted text pasted into internal note
Formatting stripped; plain text stored
Low
EC-011
Company deleted before form submission
Error: "Selected company no longer exists"
Medium
EC-012
Same email submitted from multiple tabs
First succeeds; second receives duplicate error
Medium
9. Acceptance Criteria
9.1 Create Client
AC ID
Criteria
AC-001
User can access Create Client modal from client listing header
AC-002
All mandatory fields (Full Name, Email, Phone) must be filled
AC-003
System validates email format and displays error for invalid
AC-004
System checks for duplicate email and prevents creation
AC-005
Phone number accepts country code and validates format
AC-006
Optional fields can be left empty without blocking submission
AC-007
Checking "Add to project" reveals Project and Role dropdowns
AC-008
Project and Role become mandatory when checkbox checked
AC-009
Client created with "Lead" status when no project attached
AC-010
Client created with correct status based on project state
AC-011
Success message displays upon successful creation
AC-012
Modal closes and listing refreshes after creation
AC-013
Cancel button closes modal without saving
AC-014
Yellow alert box displays status behavior information
9.2 Create Company
AC ID
Criteria
AC-015
User can access Create Company modal from listing header
AC-016
All mandatory fields (Company Name, Industry) must be filled
AC-017
Selecting "Other" industry reveals and requires text field
AC-018
Optional fields can be left empty
AC-019
Website field validates URL format if provided
AC-020
"Attach New Clients" displays inline client form
AC-021
"Attach Existing Clients" displays searchable list
AC-022
Multiple existing clients can be selected
AC-023
New inline clients follow same validation rules
AC-024
Company created with all clients in single transaction
AC-025
Success message displays client count
AC-026
Previously associated clients moved to new company
10. Manual Test Cases
Manual test cases for this module are provided in a separate Excel file:
📎 File: FRD_01_Create_Client_Company_Test_Cases.xlsx
The test cases cover:
- Create Client functionality (minimum fields, all fields, project attachment)
- Create Company functionality (minimum fields, with clients)
- Field validations (email, phone, URL, required fields)
- Conditional field behavior (State dependency, project checkbox)
- Client status logic (Lead vs Booked Client)
- Alternative access points (Company Profile, Project Module)
- Permission-based scenarios
- Integration with Projects, Companies, and Client Portal
- Edge case testing (duplicates, Unicode, network errors)
- All acceptance criteria validation
11. Dependencies
Dependency ID
Module/Feature
Dependency Type
Description
DEP-001
Project Module
Data
Project list for client attachment
DEP-002
Company Module
Data
Company list for client association
DEP-003
Master Data - Countries
Data
Country dropdown values
DEP-004
Master Data - States
Data
State dropdown values (by country)
DEP-005
Master Data - Industries
Data
Industry dropdown values
DEP-006
User Authentication
Functional
User must be logged in
DEP-007
Role-Based Access Control
Functional
User must have create permissions
DEP-008
Client Portal Module
Functional
Portal link generation
DEP-009
Email Module
Functional
Magic link email on portal access
12. References
12.1 Figma Designs: Figma, Figma
2. Import Lead
FRD #2: Import Lead
Document Version: 1.0 Created Date: December 16, 2025 Module: Import Lead Platform: Pixally CRM - Agency Portal
1. Module Overview
1.1 Purpose
This document defines the functional requirements for the Import Lead functionality within the Pixally CRM system. The Import feature allows agency users to bulk import contacts from external spreadsheet files (CSV, Excel), automatically creating Lead records in the system. This eliminates manual data entry for large contact lists and facilitates migration from other CRM systems.
1.2 Scope
This FRD covers:
- Import file upload and validation
- Column mapping interface
- Import processing logic
- Duplicate handling (override behavior)
- Success and failure result handling
- Import history tracking
- Sample template download
1.3 Key Business Rules
Rule ID
Rule Description
BR-001
All imported contacts are created as Leads (not Booked Clients)
BR-002
Duplicate detection uses email address only (not phone number)
BR-003
When a duplicate email is found, the existing record is updated with new data (override)
BR-004
Existing client status is preserved during override (Booked Client remains Booked Client)
BR-005
Maximum file size is 15 MB
BR-006
Maximum rows per import is 500 items
BR-007
Three mandatory fields are required: Full Name, Email, Phone Number
2. User Roles & Permissions
Role
Import Leads
Download Template
View History
Download Failures
Agency Owner (AO)
✅
✅
✅
✅
Agency Admin
✅
✅
✅
✅
Account Manager (AR)
✅
✅
✅
✅
Team Member
✅
✅
✅
✅
Contractor
❌
❌
❌
❌
Client
❌
❌
❌
❌
3. User Flow
3.1 Entry Point
User clicks "Import Data" button in the client listing header.
3.2 Upload File
System opens import modal with two tabs - "Import" and "History". User sees upload area with text "Drag and drop file here, or Click here to import spreadsheet". User uploads file by dragging or clicking to browse. System validates file format must be CSV, XLS, or XLSX. System validates file size must be under 15 MB. System validates row count must be under 500 rows. If validation fails, show error and user must select different file. If validation passes, show file name and total row count.
3.3 Map Columns
System displays mapping table with two columns - "Your Spreadsheet Column" and "Pixally Field". System auto-detects columns based on header names. User can change mapping using dropdowns. User must map Full Name, Email Address, and Phone Number fields. System shows preview of first 3-5 rows. Import button remains disabled until all required fields are mapped.
3.4 Process Import
User clicks "Import X Rows" button. System disables button to prevent double submission. System shows progress bar from 0 to 100 percent. System processes each row sequentially. Processing takes 2-5 minutes for 500 rows. User can close modal and import continues in background.
3.5 View Results
For all success - System shows green checkmark with success message and continue button. For partial success - System shows split display with imported count and failed count. For all failed - System shows red error icon with failure message. Failed rows display in table with row number, error type, field, and description. User can download failure CSV with failed rows only.
3.6 Download Template
User clicks "Download Sample Template" link. System downloads CSV file named "lead_import_template.csv". File contains header row with all supported columns. File contains two sample data rows.
3.7 View History
User clicks "History" tab. System shows list of previous imports. Each row shows date, file name, status, rows imported, rows failed. User can click row to view detailed results. User can download failure reports from past imports.
4. Functional Logic
4.1 File Processing
System accepts CSV, XLS, and XLSX files only. File size limit is 15 MB. Row limit is 500 excluding header. First row must be header row. System uses UTF-8 encoding.
4.2 Column Detection
System checks header names for pattern matching. Name patterns map to Full Name field. Email patterns map to Email Address field. Phone patterns map to Phone Number field. Address patterns map to respective address fields. Note patterns map to Internal Note field. Unmatched columns show "Select Field" placeholder.
4.3 Data Validation
System validates each row before processing. Full Name cannot be empty and must be 2-100 characters. Email cannot be empty and must be valid format. Phone Number cannot be empty and must be 7-15 digits. Address fields have 255 character limit. Internal Note has 1000 character limit. Invalid rows are marked as failed with specific error.
4.4 Duplicate Handling
System searches for existing email in database. Email comparison is case-insensitive. If email exists, system updates existing record. System preserves client ID and status. System preserves project and company associations. System updates modified timestamp. Row counts as successful import.
4.5 Record Creation
If email not found, system creates new lead. Status is set to Lead. Created timestamp is set to current time. All mapped fields are populated. Record is saved to database.
4.6 Import Session
System records each import in history. Session stores file name, timestamp, and results. Failed row data is stored for download. History is retained for 90 days.
5. Field Details & Validations
5.1 Import File Fields
Field
Required
Max Length
Validation Rules
Full Name
Yes
100
Min 2 characters, cannot be empty
Email Address
Yes
255
Valid email format (RFC 5322)
Phone Number
Yes
20
7-15 digits, numeric only
Street Address
No
255
None
Country
No
100
Should match master country list
State
No
100
None
City
No
100
None
Zip/Postal Code
No
20
Alphanumeric
Internal Note
No
1000
None
5.2 File Upload Validations
Validation Type
Criteria
Limit
File Format
Must be CSV, XLS, XLSX
-
File Size
Maximum size
15 MB
Row Count
Maximum rows
500
Row Count
Minimum rows
1
Header Row
Required
Yes
Encoding
Recommended
UTF-8
6. Success Message Handling
Action
Success Message
Display Type
File Upload
"File uploaded successfully"
Inline
Column Mapping
"All required fields mapped"
Inline
All Rows Import
"All rows imported successfully!"
Modal with green checkmark
Partial Import
"X rows imported successfully"
Split display (green section)
Template Download
File downloads automatically
Browser download
History Load
History data displayed
Table view
Failure Report Download
"failed_rows_[timestamp].csv downloaded"
Browser download
7. Error Message Handling
7.1 File Upload Errors
Error Condition
Error Message
Display Type
Unsupported format
"Unsupported file format. Please upload a .csv, .xls, or .xlsx file"
Upload area
File too large
"File size exceeds 15MB limit. Please reduce file size or split into multiple files"
Upload area
Too many rows
"File exceeds 500 row limit. Please split into multiple files"
Upload area
Empty file
"File contains no data rows"
Upload area
No header row
"No header row detected"
Upload area
Corrupt file
"Unable to read file. Please check file format and try again"
Upload area
7.2 Row Validation Errors
Error Type
Error Message
Display Location
Missing Required Field
"[Field name] is required in row X"
Failed rows table
Invalid Email
"Invalid email format in row X"
Failed rows table
Invalid Phone
"Invalid phone number in row X"
Failed rows table
Field Too Long
"[Field name] exceeds maximum length in row X"
Failed rows table
7.3 System Errors
Error Type
Error Message
Display Type
Network Error
"Import failed due to network error. Please try again."
Toast
Server Error
"Something went wrong. Please try again later."
Toast
Timeout
"Import timed out. Please try with a smaller file."
Results screen
8. Edge Cases
Edge Case ID
Scenario
Expected Behavior
Priority
EC-001
User uploads file with headers but no data rows
Show error "File contains no data rows"
High
EC-002
User uploads file with duplicate emails within same file
First occurrence creates record, subsequent update it
Medium
EC-003
Email in file matches archived client
Create new Lead (ignore archived)
Medium
EC-004
User closes modal during import
Import continues in background
High
EC-005
User uploads file with special UTF-8 characters
Characters preserved correctly
Medium
EC-006
User maps same field to multiple columns
Only first mapping used, show warning
Medium
EC-007
Phone number includes formatting
System strips formatting and stores normalized
Medium
EC-008
Country doesn't match master list
Store as provided
Low
EC-009
Import takes longer than 10 minutes
Timeout with error message
High
EC-010
User starts new import while one in progress
Show error "Import already in progress"
High
9. Acceptance Criteria
AC ID
Criteria
AC-001
User can access Import modal from client listing header
AC-002
User can download sample template in CSV format
AC-003
System accepts CSV, XLS, and XLSX file formats
AC-004
System rejects files exceeding 15 MB with error
AC-005
System rejects files with more than 500 rows with error
AC-006
System auto-detects and maps column headers
AC-007
User can manually adjust column mappings
AC-008
Import blocked until required fields mapped
AC-009
Progress indicator shows during processing
AC-010
Successfully validated rows create Lead records
AC-011
Duplicate emails update existing records
AC-012
Existing client status preserved during override
AC-013
Failed rows display with error details
AC-014
User can download failure report as CSV
AC-015
Client listing refreshes after import
AC-016
Import history shows previous sessions
AC-017
Import continues if user closes modal
10. Manual Test Cases
Test cases for this module are documented separately in the Excel file: FRD_02_Import_Lead_Test_Cases.xlsx
Test Case Categories:
- File Upload Validation
- Column Mapping
- Data Validation
- Duplicate Handling
- Import Processing
- Results Display
- History Management
- Error Scenarios
11. Dependencies
Dependency ID
Module/Feature
Dependency Type
Description
DEP-001
Client Data Model
Data
Client record structure and required fields
DEP-002
Master Data - Countries
Data
Country list for validation
DEP-003
File Storage
Infrastructure
Temporary storage for uploaded files
DEP-004
User Authentication
Functional
User must be logged in
DEP-005
Role-Based Access Control
Functional
User must have import permissions
DEP-006
Client Listing
UI
Listing refresh after import
12. References
12.1 Figma Designs: Figma
3. Client / Lead / Company Listing
FRD #3: Client / Lead / Company Listing
Document Version: 1.0 Created Date: December 16, 2025 Module: Client / Lead / Company Listing Platform: Pixally CRM - Agency Portal
1. Module Overview
1.1 Purpose
This document defines the functional requirements for the Client, Lead, and Company Listing pages within the Pixally CRM system. The listing provides a centralized view for managing all contacts and organizations, with tabbed navigation to switch between Booked Clients, Leads, and Companies. Users can search, filter, sort, and perform actions on records from this interface.
1.2 Scope
This FRD covers:
- Tab structure (Booked Clients, Leads, Companies)
- Listing table columns and data display
- Search functionality
- Filter options and logic
- Sorting capabilities
- Pagination
- Row actions (Edit, Archive, Delete)
- Header actions (Create, Import, Download, View Archive)
- Overflow dropdowns for multi-value fields
1.3 Key Business Rules
Rule ID
Rule Description
BR-001
Booked Clients tab shows clients with signed proposal OR payment received on any project
BR-002
Leads tab shows clients without signed proposal AND without payment
BR-003
Companies tab shows all active companies
BR-004
Client status is automatically determined based on project state — not manually set
BR-005
Lead converts to Booked Client automatically when proposal is signed or payment is received
BR-006
Booked Client does NOT revert to Lead status
BR-007
All tabs share the same filter/sort/search mechanisms with field variations per tab
2. User Roles & Permissions
Role
View Listing
Search/Filter
Edit
Archive
Delete
Download
Agency Owner (AO)
✅
✅
✅
✅
✅
✅
Agency Admin
✅
✅
✅
✅
✅
✅
Account Manager (AR)
✅
✅
✅
✅
✅
✅
Team Member
✅
✅
✅
✅
❌
✅
Contractor
✅ (Limited)
✅
❌
❌
❌
❌
Client
❌
❌
❌
❌
❌
❌
3. User Flow
3.1 Entry Point
User navigates to Clients & Contractors menu and clicks Clients.
3.2 View Listing
System loads listing page with Booked Clients tab active by default. Tab badge shows count of records in each category. Table displays clients sorted by most recently updated. Default pagination shows 25 records per page.
3.3 Switch Tabs
User clicks Leads tab to view lead records. User clicks Companies tab to view company records. Tab content refreshes without page reload. Filters and search persist between tabs if applicable.
3.4 Search Records
User types in search box located above table. System waits 300ms after typing stops. System searches Name, Email, Phone, and Company fields. Results filter in real-time. No results shows "No results found" message. User clicks X icon to clear search.
3.5 Apply Filters
User clicks filter dropdown above table. System shows available filter options with checkboxes. User selects one or more options. User clicks outside dropdown to apply. Table refreshes with filtered results. Active filters show count badge. Clear All button appears when filters active.
3.6 Sort Table
User clicks column header to sort. First click sorts ascending. Second click sorts descending. Sort arrow shows current direction. Only one column sorts at a time.
3.7 Navigate Pages
User sees "Page 1 of 10" indicator. User clicks Next to go forward. User clicks Previous to go back. User changes records per page dropdown. Table refreshes with new page.
3.8 Row Actions
User clicks 3-dot menu in Actions column. Dropdown shows Edit, Archive, Delete options. User selects action. System performs selected action.
4. Functional Logic
4.1 Tab Management
System displays three tabs - Booked Clients, Leads, Companies. Booked Clients tab is active by default. Each tab badge shows real-time count. Tab switching maintains search and filter state. URL updates to reflect active tab.
4.2 Client Status Determination
System checks if client has any projects. For each project, check for signed proposal or payment. If any project has signed proposal, client is Booked Client. If any project has payment, client is Booked Client. If no project meets criteria, client is Lead. If client has no projects, client is Lead.
4.3 Table Display
Booked Clients shows Client Name, Contact, Projects, Company, Brands columns. Leads shows same columns as Booked Clients. Companies shows Company Name, Contact, Clients, Brands, Industry columns. Multi-value fields show first 2 items plus overflow count. Overflow dropdown activated by clicking +X indicator.
4.4 Search Processing
Search activates after 300ms debounce. Search is case-insensitive partial match. Search checks multiple fields per record. Empty search shows all records. Badge counts remain unchanged during search.
4.5 Filter Logic
Multiple selections in same filter use OR logic. Different filters combine with AND logic. Primary Client Only toggle filters to primary contacts. Filters apply to current tab only. Clear All removes all filter selections.
4.6 Sort Processing
Default sort is Last Updated descending. Click header once for ascending sort. Click again for descending sort. Third click returns to default. Multi-value columns cannot be sorted.
4.7 Pagination
Default shows 25 records per page. Options are 25, 50, or 100 records. Navigation includes First, Previous, Next, Last. Status shows current range and total.
4.8 Archive Restrictions
System checks if client is sole contact on active project. If yes, archive is blocked with warning message. If no, confirmation modal appears. Company cannot archive if clients have active projects. Archive immediately revokes portal access.
4.9 Download Export
Download includes all filtered records. Export format is CSV with UTF-8 encoding. File includes visible columns plus address fields. File name includes tab name and date.
5. Field Details & Validations
5.1 Search Field
Field
Type
Max Length
Debounce
Search Input
Text
100 characters
300ms
5.2 Filter Options
Filter
Type
Source
Primary Client Only
Toggle
Boolean flag
Brands
Multi-select
All agency brands
Projects
Multi-select
All active projects
Company
Multi-select
All active companies
Industry
Multi-select
Master list + custom
5.3 Table Columns
Column
Sortable
Clickable
Action
Client/Company Name
Yes
Yes
Navigate to profile
Contact
Yes (by email)
Yes
Email or copy phone
Projects/Clients
No
Partial
View in dropdown
Brands
No
Partial
View in dropdown
Industry
Yes
No
Display only
Actions
No
Yes
Open menu
6. Success Message Handling
Action
Success Message
Display Type
Edit Save
"[Name] updated successfully"
Toast
Archive Complete
"[Name] has been archived"
Toast
Delete Complete
"[Name] has been permanently deleted"
Toast
Download Start
File downloads automatically
Browser
Filter Applied
Results updated
Table refresh
Search Applied
Results filtered
Table refresh
Import Complete
"Import completed successfully"
Toast
7. Error Message Handling
Scenario
Error Message
Display Type
Search no results
"No results found for '[search term]'"
Inline
Filter no results
"No records match the selected filters"
Inline
Archive restricted
"Cannot archive [Name]. This client is the only contact on..."
Modal
Download failed
"Unable to download. Please try again."
Toast
Delete confirmation
"This action cannot be undone."
Modal
Network error
"Unable to load data. Please refresh the page."
Toast
Page load error
"Failed to load listing. Please try again."
Full page
8. Edge Cases
Edge Case ID
Scenario
Expected Behavior
Priority
EC-001
Client in both booked and non-booked project
Appears in Booked Clients tab
High
EC-002
All company clients archived
Company shows "0 clients"
Medium
EC-003
Search matches across multiple tabs
Each tab shows own count
Medium
EC-004
Filter has no matching records
Option shows but returns empty
Low
EC-005
Download with filters active
Export only filtered records
High
EC-006
Rapid tab switching
Cancel previous requests
Medium
EC-007
Very long name truncates
Show ellipsis with tooltip
Low
EC-008
Client with 20+ projects
Overflow shows "+18" scrollable
Medium
EC-009
Concurrent user archives record
Row disappears on refresh
Medium
EC-010
Browser back after tab switch
Returns to previous tab
Low
9. Acceptance Criteria
AC ID
Criteria
AC-001
Listing loads with Booked Clients tab active
AC-002
Tab badges show accurate counts
AC-003
Tab switch occurs without page reload
AC-004
Search filters in real-time with debounce
AC-005
Search is case-insensitive partial match
AC-006
Filter logic applies correctly
AC-007
Primary toggle filters primary contacts
AC-008
Column sort toggles ascending/descending
AC-009
Pagination navigates correctly
AC-010
Records per page selector works
AC-011
Overflow shows remaining items
AC-012
Edit opens modal with data
AC-013
Archive shows restriction warning
AC-014
Delete requires confirmation
AC-015
Download exports filtered CSV
AC-016
View Archive navigates correctly
10. Manual Test Cases
Test cases for this module are documented separately in the Excel file: FRD_03_Client_Lead_Company_Listing_Test_Cases.xlsx
Test Case Categories:
- Tab Navigation
- Search Functionality
- Filter Application
- Sorting
- Pagination
- Row Actions
- Archive Restrictions
- Download Export
11. Dependencies
Dependency ID
Module/Feature
Dependency Type
Description
DEP-001
FRD_01_Create_Client_Company
Functional
Create modal functionality
DEP-002
FRD_02_Import_Lead
Functional
Import modal functionality
DEP-003
Client Data Model
Data
Client records with status
DEP-004
Company Data Model
Data
Company records
DEP-005
Project Module
Data
Project associations
DEP-006
Brand Module
Data
Brand associations
DEP-007
Proposal Module
Data
Signed proposal status
DEP-008
Payment Module
Data
Payment received status
12. References
12.1 Figma Designs: Figma
4. Archived Client / Lead / Company Listing
FRD #4: Archived Client / Lead / Company Listing
Document Version: 1.0 Created Date: December 16, 2025 Module: Archived Client / Lead / Company Listing Platform: Pixally CRM - Client Portal
1. Module Overview
1.1 Purpose
This document defines the functional requirements for the Archived Client, Lead, and Company Listing page within the Pixally CRM system. The archived listing provides a view of all soft-deleted records, allowing users to review, unarchive, or permanently delete contacts and organizations that have been removed from the active listing.
1.2 Scope
This FRD covers:
- Archived listing view and visual styling
- Tab structure (Booked Clients, Leads, Companies — archived only)
- Unarchive functionality
- Permanent delete functionality
- Search, filter, and sort capabilities
- Download archived records
1.3 Key Business Rules
Rule ID
Rule Description
BR-001
Archived records are soft deleted — data is retained but hidden from active views
BR-002
Archived clients have their portal access revoked immediately upon archiving
BR-003
Archived records cannot be edited — must unarchive first
BR-004
Client restrictions apply: cannot archive if client is sole contact on active project
BR-005
Company restrictions apply: cannot archive if company has clients on active projects
BR-006
Unarchiving restores all associations (projects, company, brands)
BR-007
Permanent delete cannot be undone — record is completely removed
BR-008
Original client status is preserved when unarchived (Booked Client stays Booked Client)
2. User Roles & Permissions
Role
View Archive
Unarchive
Permanent Delete
Download
Agency Owner (AO)
✅
✅
✅
✅
Agency Admin
✅
✅
✅
✅
Account Manager (AR)
✅
✅
✅
✅
Team Member
✅
✅
❌
✅
Contractor
❌
❌
❌
❌
Client
❌
❌
❌
❌
3. User Flow
3.1 Entry Point
User clicks "View Archive" button in active client listing header.
3.2 View Archived Listing
System navigates to Archived Listing page. Page shows "Archived" label in title. Visual styling uses gray tint to indicate archived status. Same tab structure displays with archived counts. View Active button appears to return to active listing.
3.3 Navigate Tabs
User clicks Leads tab to view archived leads. User clicks Companies tab to view archived companies. Each tab shows only archived records. Badge counts reflect archived record totals.
3.4 Search Archived Records
User types in search box. System searches archived records only. Search uses same fields as active listing. Results filter archived records in real-time.
3.5 Filter Archived Records
User applies filters from dropdowns. Filters apply to archived records only. Same filter options as active listing. Clear All removes filter selections.
3.6 Unarchive Record
User clicks 3-dot menu and selects Unarchive. System immediately unarchives without confirmation. Record moves to active listing. Portal access is restored for clients. Success toast shows "[Name] has been restored".
3.7 Delete Permanently
User clicks 3-dot menu and selects Delete. Confirmation modal appears with warning. User clicks Delete to confirm. Record is permanently removed from database. Success toast shows "[Name] has been permanently deleted".
3.8 Return to Active
User clicks "View Active" button. System navigates back to active client listing. Active listing shows with current data.
4. Functional Logic
4.1 Page Display
Background uses light gray color (#F5F5F5). Row background has gray tint (#FAFAFA). Text color is muted (#666666). Archived label visible in header. Edit action is not available in row menu.
4.2 Tab Functionality
Three tabs show archived records only. Booked Clients tab shows archived booked clients. Leads tab shows archived leads. Companies tab shows archived companies. Badge counts update when records change.
4.3 Search Scope
Search queries archived records only. Search does not include active records. Search fields match active listing. Search state separate from active listing.
4.4 Filter Scope
Filters apply to archived records only. Filter options same as active listing. Filter state separate from active listing. Clear All resets archived filters only.
4.5 Unarchive Process
Set archived flag to false. Clear archived timestamp. Restore portal access eligibility. Preserve all associations. Preserve original client status. Move record to active listing. Update badge counts.
4.6 Delete Process
Show confirmation modal first. Delete removes record permanently. Delete removes all associations. Delete cannot be undone. Historical references show placeholder text. Update badge counts.
4.7 Access Restoration
Portal magic links become valid again. Client can use previous magic link. No new authentication required. No notification sent to client.
4.8 Visual Indicators
Gray background distinguishes from active. Muted text shows archived state. No Edit option in actions menu. Unarchive replaces Archive option.
5. Field Details & Validations
5.1 Display Fields
All fields are read-only in archived listing:
Field
Type
Display
Client/Company Name
Text
Clickable link
Contact
Email/Phone
View only
Projects
List
Dropdown
Company
Text
Link if active
Brands
List
Dropdown
Industry
Text
Display only
Archived Date
DateTime
Export only
5.2 Action Validations
Action
Confirmation
Reversible
Unarchive
No
Yes (can re-archive)
Delete
Yes (modal)
No
View Active
No
Yes
Download
No
N/A
6. Success Message Handling
Action
Success Message
Display Type
Unarchive
"[Name] has been restored"
Toast
Delete
"[Name] has been permanently deleted"
Toast
Download
File downloads automatically
Browser
Filter Applied
Results updated
Table refresh
Search Applied
Results filtered
Table refresh
Navigate to Active
Active listing loaded
Page load
7. Error Message Handling
Scenario
Error Message
Display Type
Delete confirmation
"This action cannot be undone. [Name] will be permanently removed."
Modal
Delete failed
"Unable to delete. Please try again."
Toast
Permission denied
"You don't have permission to permanently delete records."
Toast
No archived records
"No archived [type] found"
Inline empty state
Search no results
"No archived results found for '[search term]'"
Inline
Load error
"Unable to load archived records."
Full page
8. Edge Cases
Edge Case ID
Scenario
Expected Behavior
Priority
EC-001
Unarchive client whose company archived
Client restored, shows "Archived Company"
Medium
EC-002
Unarchive client whose project deleted
Client restored, project association removed
Medium
EC-003
Delete client mentioned in communications
Communications show "Deleted Client"
High
EC-004
Unarchive then immediately re-archive
Both actions succeed
Low
EC-005
Multiple users unarchive same record
First succeeds, second gets error
Medium
EC-006
Delete company with archived clients
Company deleted, clients remain archived
Medium
EC-007
Unarchive lead with new booked project
Status updates to Booked Client
High
EC-008
Archive page with 1000+ records
Pagination handles large dataset
High
9. Acceptance Criteria
AC ID
Criteria
AC-001
Archive listing accessible from View Archive button
AC-002
Visual styling distinguishes archived listing
AC-003
Tabs show archived records only
AC-004
Edit action not available
AC-005
Unarchive restores record immediately
AC-006
Unarchive preserves associations
AC-007
Portal access restored on unarchive
AC-008
Delete requires confirmation
AC-009
Delete permanently removes record
AC-010
Search works on archived records
AC-011
Download exports with archive date
AC-012
View Active returns to active listing
AC-013
Badge counts reflect archived totals
AC-014
Archive restrictions enforced
10. Manual Test Cases
Test cases for this module are documented separately in the Excel file: FRD_04_Archived_Listing_Test_Cases.xlsx
Test Case Categories:
- Navigation to Archive
- Visual Indicators
- Unarchive Process
- Delete Process
- Search and Filter
- Portal Access Restoration
- Return to Active
- Permission Checks
11. Dependencies
Dependency ID
Module/Feature
Dependency Type
Description
DEP-001
FRD_03_Client_Lead_Company_Listing
Functional
Active listing source
DEP-002
Client Portal Module
Functional
Access revocation/restoration
DEP-003
Project Module
Data
Active project status check
DEP-004
Client Data Model
Data
Archive flag and timestamp
DEP-005
Company Data Model
Data
Archive flag and timestamp
12. References
12.1 Figma Designs: Figma
5. Client Profile > Overview Tab
FRD #5: Client Profile > Overview Tab
Document Version: 2.0
Created Date: December 16, 2025
Last Updated: April 10, 2026
Module: Client Profile > Overview Tab
Platform: Pixally CRM - Agency Portal
1. Module Overview
1.1 Purpose
This document defines the functional requirements for the Client Profile Overview page within the Pixally CRM system. The Client Profile serves as the central hub for viewing and managing all information related to a specific client or lead, including their contact details, associated projects, company affiliation, communication history, and financial summary.
1.2 Scope
This FRD covers:
- Client profile header with status and actions
- Contact information card
- Company association card
- Projects association card
- Financial summary card
- Activity timeline / communication history
- Edit client functionality
- Archive client functionality
- Portal access management
1.3 Key Business Rules
Rule ID
Rule Description
BR-001
Client status (Lead/Booked Client) is displayed but not editable — it is system-determined
BR-002
A client can belong to only one company at a time
BR-003
A client can be associated with multiple projects
BR-004
Portal access is per-brand — a client has separate magic links for each brand
BR-005
Financial summary shows aggregated data from all associated projects
BR-006
Activity timeline shows all communications across all projects
BR-007
Archiving a client revokes portal access immediately
BR-008
Removing the last project from a client revokes portal access immediately
BR-009
Client on active projects cannot be archived
BR-010
Client on completed or archived projects only can be archived
BR-011
Archived client must be unarchived before adding to a new project
2. User Roles & Permissions
Role
View Profile
Edit Client
Archive
Manage Portal
View Financials
Agency Owner (AO)
✅
✅
✅
✅
✅
Agency Admin
✅
✅
✅
✅
✅
Account Manager (AR)
✅
✅
✅
✅
✅
Team Member
✅
✅
✅
✅
✅
Contractor
✅ (Limited)
❌
❌
❌
❌
Client
❌
❌
❌
❌
❌
3. User Flow
3.1 Entry Points
- User clicks client name from listing table
- User clicks client name from company profile
- User clicks client name from project details
- User clicks client name from search results
- User clicks client name from activity feed
3.2 View Profile
- System loads client profile page
- Header shows client name and status badge
- Left column displays Contact Info and Company cards
- Right column displays Projects and Financial Summary cards
- Bottom section shows Activity Timeline
3.3 Edit Client
- User clicks Edit button in header
- System opens edit modal with current data
- User modifies fields as needed
- User clicks Save Changes
- System validates and updates record
- Modal closes and profile refreshes
- Success toast shows "Client updated successfully"
3.4 Manage Company
- User clicks Add Company if no company exists
- User selects existing company or creates new
- Association saves immediately
- User clicks Change Company to switch
- User clicks Remove from Company to unlink
- Company card updates with changes
3.5 Manage Projects
- User clicks Add to Project button
- Modal shows project dropdown
- User selects project
- User selects client role
- User clicks Add to Project button
- Association saves and card updates
- Client status may change to Booked Client
3.6 Remove Project from Client
User clicks three-dot menu on project row. User selects "Remove" option. System checks if this is the client's only project:
If client has multiple projects:
- System displays standard confirmation modal
- On confirm: Remove the project association, show success toast, update card
If this is the client's only project:
- System displays portal access warning modal
- On confirm: Remove project, revoke portal access, invalidate magic links, update status to "Lead"
3.7 Archive Client
- User clicks Archive button
- System checks for restrictions (see Section 4.11)
- If restricted, blocking modal appears with clickable project list
- If allowed, confirmation modal appears
- User confirms archive
- Portal access revokes immediately
- Success toast displayed
- User redirects to listing page
3.8 View Portal Settings
- Portal Link section displays portal access status for each brand
- Each brand shows its magic link
- User clicks Copy Link button
- Link copies to clipboard
3.9 View Activity
- Activity timeline loads at bottom
- Shows all communications chronologically
- Newest activities appear first
- User can filter by activity type
- Load more button shows additional items
4. Functional Logic
4.1 Page Layout
- Header spans full width displaying client avatar, name, status badge, contact info (email + phone), "Compose Email" button, and a three-dot overflow menu.
- Tab navigation bar sits below the header with five tabs: Overview, Communication (with unread count badge), Meetings, Payments, and Notes.
- Below the tabs, content is split into two columns.
- Left column (~40% width): Contains the four summary stat cards (Client Worth, Due Payment, Total Projects, Upcoming Meetings), the Internal Note section, and the Project(s) card with Active/Archived tabs.
- Right column (~60% width): Contains Quick Actions grid, Portal Link card, Company card, and General Details card.
- On mobile viewports, all cards stack vertically in a single column.
4.2 Status Badge
- A status badge appears next to the client's name in the header.
- System evaluates all projects linked to this client:
- If any associated project has a signed proposal AND payment received → display green "Client" badge (Booked Client).
- If no project qualifies → display yellow "Lead" badge.
- Badge updates automatically whenever project status changes.
4.3 Header & Contact Info
- Displays client's profile avatar, full name, and status badge.
- Email address shown as a clickable mailto link.
- Phone number displayed with a copy-to-clipboard action on click.
- "Compose Email" button on the right side opens the email composition flow.
- Three-dot overflow menu provides the following actions:
- Edit — Opens the client edit modal.
- Archive — Archives the client (subject to archive restrictions, see 4.11).
- Add Company — Opens company association modal.
- Delete — Permanently deletes the client after confirmation.
- Empty contact fields display an em dash (---) as placeholder.
4.4 Summary Stat Cards
Four stat cards are displayed in a 2×2 grid at the top of the left column:
- Client Worth: Shows the total monetary value associated with this client. Calculated from all invoiced amounts across projects. Formatted with currency symbol and abbreviation for large values.
- Due Payment: Displays the count of outstanding payments. Includes a subtitle breakdown: "1 Ongoing · 2 Completed."
- Total Projects: Shows total project count. Subtitle breakdown: "1 Ongoing · 2 Completed · 1 Archived."
- Upcoming Meetings: Displays count of scheduled future meetings.
Each card has a corresponding icon and consistent styling. Values update in real-time as underlying data changes.
4.5 Internal Note
- Appears below the stat cards in the left column.
- Header displays "Internal Note" title with a subtitle: "Note is only visible to you and your team."
- Note text is displayed with a truncated preview; a "More" link expands to show the full content.
- Note content supports rich text. The edit icon (pencil) opens an inline editor or modal to modify the note.
- If no note exists, show an empty state with a prompt to add one.
4.6 Projects Card
- Header displays "Project(s)" with a "+" button to add the client to a new project.
- Two tab filters: Active (default) and Archived.
- Project list is displayed as a table with the following columns:
- Project — Project name as a clickable link (navigates to project detail). Subtitle shows the next event type with a colored status dot.
- Next Event Date — Date of the next upcoming event for that project.
- Client Role — The role this client holds on the project.
- Action — Three-dot menu per row with options: Remove (removes client from project) and Edit Client Role.
4.6.1 Remove Project Action
When user clicks "Remove" from the three-dot action menu:
-
System checks project count for the client
-
**If client has MORE than one project (multiple projects):
**- Display standard confirmation modal
- On "Remove": Remove the project association, show success toast, update card
- On "Cancel": Close modal, no action taken
-
**If client has ONLY one project (single/last project):
**- Display portal access warning modal
- On "Remove":
- Remove the project association
- Immediately revoke all portal access for this client
- Invalidate all magic links
- Client status changes to "Lead"
- Show success toast with portal revocation notice
- Update Projects card and Portal Link card
- On "Cancel": Close modal, no action taken
- Clicking "+" button opens an "Add Project" modal/dropdown listing available projects
- Empty state displayed if no projects are associated
4.7 Quick Actions
A 3×2 icon-button grid in the right column provides fast access to common operations:
- Row 1: Edit, Archive, Delete
- Row 2: Add Project(s), Send Invoice, Schedule Meeting
Each action is represented by an icon with a label beneath it.
4.8 Portal Link
- Displays one row per brand/portal the client has access to.
- Each row shows: brand avatar, brand name, and the portal URL with a "Copy Link" button.
- Portal URL format: https://app.pixally.com/u/rando... (truncated for display).
- Each row has an action menu with options: Edit and Delete.
- Each client has a unique token per brand. Magic link format includes agency subdomain.
- Portal access is automatically revoked when:
- The client is archived.
- The client's last project is removed.
- Unarchiving restores portal links. No notification is sent on access changes.
4.9 Company Card
- If a company is associated, the card displays:
- Company name as a clickable link — navigates to the company profile.
- Industry/role label.
- Joined date.
- Three-dot action menu with a "Remove" option to disassociate the company from the client.
- If no company is linked, shows an empty state with a prompt to add one.
4.10 General Details
- Displays the following client metadata:
- Email Address
- Phone Number
- Created On — Date when the client record was created.
- This card serves as a read-only reference panel for key contact and record details.
- Empty fields display an em dash (---).
4.11 Archive Restrictions
4.11.1 Project Status Determination
Project status is determined based on the pipeline stages of all events within the project:
Pipeline Stage
Maps To
New Leads
Active
Booked
Active
Post Event
Active
Completed
Completed
Archived
Archived
Precedence Order: Active > Completed > Archived
Event Scenarios
Project Status
All events in Active stages (New Leads/Booked/Post Event)
Active
All events in Completed stage
Completed
All events in Archived stage
Archived
Mix: Active + Completed events
Active
Mix: Active + Archived events
Active
Mix: Completed + Archived events
Completed
4.11.2 Client Archive Logic
Scenario
Can Archive?
Behavior
On Active project(s)
❌ Blocked
Blocking modal with clickable project list
On Completed project(s) only
✅ Allowed
Confirmation modal → Archive
On Archived project(s) only
✅ Allowed
Confirmation modal → Archive
Mix: Active + Completed/Archived
❌ Blocked
Active takes precedence
Mix: Completed + Archived
✅ Allowed
Confirmation modal → Archive
No project associations
✅ Allowed
Confirmation modal → Archive
4.11.3 Archive Eligibility Check
System retrieves all projects associated with client_id
FOR each project:
Determine project_status using Project Status Logic (4.11.1)
IF project_status = "Active":
Add project to blocked_projects list
IF blocked_projects.count > 0:
Return NOT_ALLOWED
Display blocking modal with blocked_projects list (clickable links)
ELSE:
Return ALLOWED
Display confirmation modal
4.11.4 Archive Implementation
System sets client.archived_at = current_timestamp
System sets client.archived_by = current_user_id
System sets client.status = "archived"
System revokes portal access for client_id
System invalidates all magic links
System logs activity "client_archived" with client_id and current_user_id
4.12 Unarchive Logic
- Archived clients can be manually unarchived
- Unarchiving restores the client to active status
- Portal access is restored upon unarchive
- Archived clients must be unarchived before adding to a new project
4.13 Tab Navigation
- Five tabs are available: Overview, Communication, Meetings, Payments, Notes.
- The Communication tab displays an unread count badge when there are unread messages or emails.
- Active tab is visually highlighted.
- Clicking a tab loads its corresponding content panel without a full page reload.
- Tab state persists during the session.
5. Field Details & Validations
5.1 Profile Display Fields
Field
Source
Format
Editable
Full Name
client.name
Text
Yes (modal)
client.email
Email link
Yes (modal)
Phone
client.phone
Formatted
Yes (modal)
Address
client.address
Multi-line
Yes (modal)
Internal Note
client.note
Expandable
Yes (modal)
Status
Calculated
Badge
No
Company
Relation
Link
Yes (card)
Projects
Relations
List
Yes (card)
5.2 Edit Modal Fields
Field
Required
Max Length
Validation
Full Name
Yes
100
Min 2 characters
Yes
255
Valid format, unique
Phone
Yes
20
7-15 digits
Company
No
N/A
Valid selection
Street Address
No
255
None
Country
No
N/A
Valid country
State
No
N/A
Valid for country
City
No
100
None
Zip/Postal
No
20
None
Internal Note
No
1000
None
6. Success Message Handling
Action
Success Message
Display Type
Duration
Edit Save
"Client updated successfully"
Toast
5 seconds
Archive
"Client archived successfully"
Toast
5 seconds
Unarchive
"Client restored successfully"
Toast
5 seconds
Add to Project
"[Name] added to [Project] as [Role]"
Toast
5 seconds
Remove from Project (multiple)
"[Name] removed from [Project]"
Toast
5 seconds
Remove from Project (last)
"[Name] removed from [Project]. Portal access to [Brand Name] has been revoked."
Toast
5 seconds
Add to Company
"Client added to [Company Name]"
Toast
5 seconds
Remove from Company
"Client removed from [Company Name]"
Toast
5 seconds
Copy Portal Link
"Link copied to clipboard"
Toast
3 seconds
Regenerate Link
"New portal link generated"
Toast
5 seconds
7. Error Message Handling
Scenario
Error Message
Display Type
Edit validation
"[Field] is required"
Inline
Duplicate email
"A client with this email already exists"
Inline
Save failure
"Unable to save changes. Please try again."
Toast
Profile load error
"Unable to load client profile."
Full page
Network error
"Connection error. Please refresh."
Toast
Add archived client to project
"Please unarchive the client before adding to a project"
Toast
8. Confirmation & Blocking Modals
8.1 Archive Client - Blocking Modal
Title: Cannot Archive Client
Message: This client is associated with active project(s) and cannot be archived: [Project 1, Project 2 and Project 3] (clickable links)
Hint Box (Yellow): ⚠️ Please complete or archive the associated projects before proceeding.
Button: Cancel
8.2 Archive Client - Confirmation Modal
Title: Archive Client?
Message: Are you sure you want to archive [Client Name]? This will revoke their portal access.
Primary Button: Archive
Secondary Button: Cancel
8.3 Remove Project - Standard Confirmation
Title: Remove Project
Message: Are you sure you want to remove this project?
Primary Button: Remove
Secondary Button: Cancel
8.4 Remove Project - Last Project Warning
Title: Remove Project
Message: This is the only project associated with this client. Removing it will revoke the client's access to the [Brand Name] client portal. Are you sure you want to proceed?
Primary Button: Remove _(Destructive/Red)
_Secondary Button: Cancel
8.5 Delete Client - Confirmation Modal
Title: Delete Client
Message: This action cannot be undone. Are you sure you want to permanently delete [Client Name]?
Primary Button: Delete _(Destructive/Red)
_Secondary Button: Cancel
9. Edge Cases
Edge Case ID
Scenario
Expected Behavior
Priority
EC-001
Client with 50+ projects
Projects card scrollable with virtualization
Medium
EC-002
Only project archived while viewing
Status recalculates to Lead
High
EC-003
Simultaneous edits by two users
Last save wins
Medium
EC-004
Email changed to existing
Edit blocked with error
High
EC-005
Activity timeline 1000+ entries
Pagination or load more
Medium
EC-006
Client removed from all projects
Status changes to Lead, portal access revoked
High
EC-007
Portal link after archive
Link invalid immediately
High
EC-008
Very long note (1000 chars)
Truncate with show more
Low
EC-009
Company archived while viewing
Shows "Archived: [Name]"
Medium
EC-010
No email activity exists
Empty state for filter
Low
EC-011
Remove last project while portal link card is visible
Portal Link card updates to show no active links
High
EC-012
User cancels remove last project confirmation
No changes made, modal closes
Medium
EC-013
Network failure during project removal
Show error toast, project remains associated
High
EC-014
Archive client on active project
Blocking modal with clickable project list
High
EC-015
Add archived client to new project
Blocked with toast message
High
EC-016
Client on mix of active and archived projects
Archive blocked (active takes precedence)
High
EC-017
Client on completed projects only
Archive allowed
Medium
10. Acceptance Criteria
10.1 Profile Display
AC ID
Criteria
AC-001
Profile displays name and correct status
AC-002
Contact card shows all fields formatted
AC-003
Empty fields display placeholder
AC-004
Edit modal pre-populates data
AC-005
Edit validation matches create rules
10.2 Company & Projects
AC ID
Criteria
AC-006
Company card shows association
AC-007
User can manage company link
AC-008
Projects card shows all projects
AC-009
User can add to project with role
AC-010
Financial summary calculates correctly
AC-011
Activity timeline shows history
10.3 Archive Functionality
AC ID
Criteria
AC-012
Archive blocked for clients on active projects
AC-013
Blocking modal shows clickable project list
AC-014
Archive allowed for clients on completed/archived projects only
AC-015
Confirmation modal shown when archive is allowed
AC-016
Portal access revoked on archive
AC-017
Archived client cannot be added to project without unarchiving
AC-018
Unarchive restores client and portal access
10.4 Project Removal
AC ID
Criteria
AC-019
Standard confirmation pop-up appears when removing a project (multiple projects exist)
AC-020
Portal access warning pop-up appears when removing the last project
AC-021
Portal access is revoked immediately upon removing last project
AC-022
Client status changes to Lead after last project removal
AC-023
Appropriate success message shown based on removal context
11. Dependencies
Dependency ID
Module/Feature
Dependency Type
Description
DEP-001
Client Data Model
Data
Client record structure
DEP-002
Company Module
Data
Company association
DEP-003
Project Module
Data
Project associations
DEP-004
Event Module
Data
Event pipeline stages
DEP-005
Email Module
Data
Email activity history
DEP-006
Portal Module
Data
Portal access and links
DEP-007
Financial Module
Data
Invoice and payment data
DEP-008
Proposal Module
Data
Proposal status
DEP-009
Activity Tracking
Data
Timeline entries
12. References
12.1 Figma Designs
Change Log
Version
Date
Author
Changes
1.0
December 16, 2025
-
Initial document
1.1
March 10, 2026
-
Added project removal confirmation pop-ups, portal access warning for last project removal, BR-008, updated success messages, added acceptance criteria (AC-016 to AC-020), added edge cases (EC-011 to EC-013)
2.0
April 10, 2026
-
Updated archive logic: Clients on active projects cannot be archived. Clients on completed/archived projects can be archived. Added blocking modal with clickable project links. Archived clients must be unarchived before adding to new project. Refined modal message format.
6. Client Profile > Communications Tab
FRD #6: Client Profile > Communications Tab
Document Version: 1.0 Created Date: December 16, 2025 Module: Client Profile > Communications Tab Platform: Pixally CRM - Agency Portal
1. Module Overview
1.1 Purpose
This document defines the functional requirements for the Communications tab within the Client Profile. The Communications tab provides a centralized view of all email interactions with a specific client across all their associated projects, enabling agency users to track communication history and compose new emails directly from the client context.
1.2 Scope
This FRD covers:
- Communication tab interface and layout
- Project-based email organization
- Email thread display and navigation
- Compose new email functionality
- Email templates and smart fields integration
- AI-assisted email drafting
1.3 Key Business Rules
Rule ID
Rule Description
BR-001
Communications are organized by project - each project shows its own email thread
BR-002
Emails are routed using Project ID and Agency ID embedded in outgoing messages
BR-003
External replies are automatically routed to correct project email center
BR-004
Unidentified senders (not project participants) are labeled as "(Not a Member)"
BR-005
Client email is pre-populated in the "To" field when composing from this tab
BR-006
Email templates are sourced from the Templates module
BR-007
Unread email count is displayed per project
2. User Roles & Permissions
Role
View Communications
Send Email
Use Templates
Use AI Assist
Agency Owner (AO)
✅
✅
✅
✅
Agency Admin
✅
✅
✅
✅
Account Manager (AR)
✅
✅
✅
✅
Team Member
✅
✅
✅
✅
Contractor
Limited
Limited
❌
❌
Client
❌
❌
❌
❌
Note: [TBD: PM to confirm contractor access level for client communications]
3. User Flow
3.1 Access Points
Access Point
Navigation Path
Client Profile
Clients & Contractors → Clients → Client Name → Communications Tab
Lead Profile
Clients & Contractors → Clients → Lead Tab → Lead Name → Communications Tab
3.2 Communications Tab Layout
User navigates to Client Profile. User clicks "Communications" tab (shows unread count badge if applicable). System displays split-panel layout. Left panel shows list of projects associated with this client. Right panel shows email thread for selected project.
3.3 Project List Panel (Left Side)
System displays all projects where client is a participant. Each project card shows: Project Name, Event Information, Next Event Date, Unread Email Count. Single event projects show event name with color badge. Multiple events show "Multiple Events" text. Projects are sorted by most recent activity. User clicks a project card to view its email thread. Selected project is highlighted.
3.4 Email Thread Panel (Right Side)
System displays email conversation for selected project. Emails are displayed in chronological order (oldest first). Each email shows: Sender name/email, Timestamp, Subject, Body preview. User can expand/collapse individual emails. System highlights unread emails. Unread emails are marked as read when viewed.
3.5 Compose New Email Flow
User clicks "+ New Email" button. System opens compose email modal. "To" field is pre-populated with client's email address. User can add additional recipients (CC/BCC). User enters subject line. User composes email body. User can attach files. User can use "Add Smart Fields" to insert dynamic content. User can use "Use Template" to load pre-built template. User can use "Ask AI" for AI-assisted drafting. User clicks "Send" to dispatch email. System sends email and updates thread.
3.6 Using Smart Fields
User clicks "Add Smart Fields" button in compose modal. System displays dropdown of available smart fields. User selects a smart field. System inserts placeholder into email body. Placeholders are replaced with actual values at send time. [TBD: PM to confirm - refer to Email Module FRD for complete smart fields list]
3.7 Using Email Templates
User clicks "Use Template" button in compose modal. System displays list of available templates from Templates module. User selects a template. System populates subject and body with template content. Smart fields within template are preserved. User can edit template content before sending.
3.8 Using AI Assist
User clicks "Ask AI" button in compose modal. System displays AI prompt input field. User describes desired email content. System generates email draft using AI. User reviews and edits generated content. User can regenerate or modify with additional prompts. [TBD: PM to confirm AI assist functionality details]
4. Functional Logic
4.1 Email Routing Logic
System embeds Project ID and Agency ID in all outgoing emails. External email replies are parsed for embedded IDs. System routes incoming emails to correct project communication center.
If email contains valid Project ID AND Agency ID: Route to corresponding project's email thread and associate with project participants. If sender email matches known client but IDs missing: Route to client's most recent active project with "(Unmatched Project)" indicator. If sender is unknown: Display sender as "(Not a Member)" and route to general inbox for manual assignment.
4.2 Unread Count Logic
System tracks read/unread status per email per user. Unread count displays on Communications tab badge. Unread count displays per project in left panel. Email is marked as read when user views the email thread containing it. Viewing thread marks all emails in that thread as read.
4.3 Project Card Display Logic
Element
Display Rule
Project Name
Full project name, truncate with ellipsis if >30 chars
Event Info (Single)
Event name with event color badge
Event Info (Multiple)
"Multiple Events" text
Next Event Date
Formatted as "MMM DD, YYYY"
Unread Count
Red badge with count, hidden if 0
4.4 Email Thread Display Logic
Emails sorted chronologically (oldest to newest). Each email displays: Sender avatar, Sender name, Sender email, Timestamp, Subject (for first email or if changed), Body content. Attachments display as clickable links. Long email bodies are truncated with "Show more" option. Images display inline.
4.5 Compose Email Logic
"To" field pre-filled with client's primary email. User can add multiple recipients to CC/BCC. Subject line is required. Body can be empty (system shows warning before sending). Attachments limited to 25MB total. System validates all email addresses before sending.
4.6 Smart Fields Logic
Smart fields are placeholders that resolve at send time. Available fields include client data, project data, agency data. Unresolved fields display placeholder text if data unavailable. [TBD: PM to confirm - refer to Email Module FRD for implementation details]
4.7 Empty State Logic
If client has no projects: Display "No projects yet" message. If project has no emails: Display "No communications yet" message with "Send First Email" CTA.
4.8 Impact on Other Modules
Module
Impact
Email Module
Emails sent here appear in project email center
Project Module
Email counts reflected in project communications
Notifications
Email delivery triggers notification to sender
Client Portal
Emails visible to client in their portal
Activity Log
Email sends are logged as activities
5. Field Details & Validations
5.1 Compose Email Fields
Field Name
Field Type
Mandatory
Max Length
Validation Rules
To
Email (multi)
Yes
N/A
Valid email format, at least one recipient
CC
Email (multi)
No
N/A
Valid email format if provided
BCC
Email (multi)
No
N/A
Valid email format if provided
Subject
Text
Yes
255 chars
Cannot be empty
Body
Rich Text
No
50,000 chars
Warning if empty
Attachments
File
No
25MB total
Combined size limit
5.2 Supported Attachment Types
Category
File Types
Documents
.pdf, .doc, .docx, .xls, .xlsx, .ppt, .pptx
Images
.jpg, .jpeg, .png, .gif, .webp
Others
.zip, .txt, .csv
6. Success Message Handling
Action
Success Message
Display Type
Duration
Email sent
"Email sent successfully"
Toast notification
5 seconds
Template loaded
"Template applied"
Inline indicator
3 seconds
AI draft generated
"Draft generated"
Inline indicator
3 seconds
Attachment added
"File attached"
Inline indicator
2 seconds
7. Error Message Handling
7.1 Validation Errors
Field
Error Condition
Error Message
To
Empty
"Please add at least one recipient"
To
Invalid email
"Invalid email address: [email]"
Subject
Empty
"Subject line is required"
Attachments
Over size limit
"Attachments exceed 25MB limit. Please remove some files"
Attachments
Invalid type
"File type not supported: [filename]"
7.2 System Errors
Error Type
Error Message
Display Type
Send failed
"Email could not be sent. Please try again"
Toast notification
Template load failed
"Unable to load template. Please try again"
Toast notification
AI generation failed
"AI assistant unavailable. Please try again later"
Inline message
Attachment upload failed
"File upload failed. Please try again"
Inline message
8. Edge Cases
Edge Case ID
Scenario
Expected Behavior
Priority
EC-001
Client has 20+ projects
Scrollable project list, virtualized for performance
Medium
EC-002
Email thread has 100+ emails
Paginated loading, most recent shown first
High
EC-003
Client email address changed after email sent
Original recipient preserved in sent email record
Medium
EC-004
Project archived while viewing communications
Communication tab remains accessible, read-only
Medium
EC-005
User composes email, client deleted before send
Error: "Recipient no longer exists"
Medium
EC-006
Large attachment (>25MB)
Reject with size error before upload completes
High
EC-007
Network disconnect while composing
Draft auto-saved locally, restored on reconnect
High
EC-008
External reply from unknown email address
Display with "(Not a Member)" tag
Medium
EC-009
Same email in multiple project threads
Display in all relevant project threads
Low
EC-010
Compose modal closed without sending
Confirmation prompt: "Discard draft?"
Medium
9. Acceptance Criteria
9.1 Communications Tab Display
AC ID
Criteria
AC-001
Communications tab is accessible from client profile
AC-002
Tab badge shows unread email count
AC-003
Left panel displays all client's projects
AC-004
Each project card shows correct unread count
AC-005
Clicking project loads corresponding email thread
9.2 Email Thread
AC ID
Criteria
AC-006
Emails display in chronological order
AC-007
Unread emails are visually distinguished
AC-008
Viewing thread marks emails as read
AC-009
Attachments are downloadable
AC-010
External senders show "(Not a Member)" if applicable
9.3 Compose Email
AC ID
Criteria
AC-011
Client email is pre-populated in To field
AC-012
User can add CC/BCC recipients
AC-013
Smart fields can be inserted
AC-014
Templates can be applied
AC-015
AI assist generates draft content
AC-016
Attachments can be added within size limit
AC-017
Sent email appears in thread immediately
10. Test Cases
Manual test cases are provided in the accompanying Excel file: FRD_06_Client_Profile_Communications_Test_Cases.xlsx
Test case categories include:
- Tab navigation and display
- Project list functionality
- Email thread display
- Compose email functionality
- Smart fields and templates
- Error handling scenarios
11. Dependencies
Dependency ID
Module/Feature
Dependency Type
Description
DEP-001
Email Module
Functional
Core email sending infrastructure
DEP-002
Templates Module
Data
Email templates source
DEP-003
Project Module
Data
Project list and associations
DEP-004
AI Service
Functional
AI-assisted drafting
DEP-005
File Storage
Technical
Attachment storage
DEP-006
Client Portal
Functional
Email visibility for clients
12. References
12.1 Figma Designs: Figma
7. Client Profile > Meetings
FRD #7: Client Profile > Meetings
Document Version: 1.0 Created Date: December 16, 2025 Module: Client Profile > Meetings Platform: Pixally CRM - Agency Portal
1. Module Overview
1.1 Purpose
This document defines the functional requirements for the Meetings tab within the Client Profile. The Meetings tab displays all scheduled and completed meetings with a specific client, allowing agency users to view meeting history, join upcoming meetings, and schedule new meetings directly from the client context.
1.2 Scope
This FRD covers:
- Meetings tab interface and layout
- Upcoming and past meetings display
- Meeting card details and actions
- Schedule new meeting functionality
- Join meeting functionality
- Meeting status tracking
1.3 Key Business Rules
Rule ID
Rule Description
BR-001
Meetings are organized into Upcoming and Past sections
BR-002
Meeting creation uses the Calendar/Calendly module functionality
BR-003
"Join Meeting" button appears only for future meetings with video links
BR-004
Past meetings show "Completed" status
BR-005
Meeting count badge shows upcoming meetings only
BR-006
Meetings are displayed in chronological order (soonest first for upcoming)
2. User Roles & Permissions
Role
View Meetings
Schedule Meeting
Join Meeting
Edit Meeting
Cancel Meeting
Agency Owner (AO)
✅
✅
✅
✅
✅
Agency Admin
✅
✅
✅
✅
✅
Account Manager (AR)
✅
✅
✅
✅
✅
Team Member
✅
✅
✅
✅
✅
Contractor
Limited
❌
✅
❌
❌
Client
❌
❌
❌
❌
❌
Note: [TBD: PM to confirm contractor permissions for meeting management]
3. User Flow
3.1 Access Points
Access Point
Navigation Path
Client Profile
Clients & Contractors → Clients → Client Name → Meetings Tab
Lead Profile
Clients & Contractors → Clients → Lead Tab → Lead Name → Meetings Tab
3.2 Meetings Tab Display
User navigates to Client Profile. User clicks "Meetings" tab. System displays meetings organized in two sections. "Upcoming" section shows future meetings. "Past" section shows completed meetings. Tab badge displays upcoming meeting count.
3.3 Upcoming Meetings Section
System displays list of future meetings sorted by date (soonest first). Each meeting card shows: Meeting title, Date and time, Duration, Project name, Meeting type, Participants, Action buttons. "Join Meeting" button displays for meetings with video conference links. Meeting time displays in user's local timezone.
3.4 Past Meetings Section
System displays list of completed meetings sorted by date (most recent first). Each meeting card shows: Meeting title, Date and time, Duration, Project name, Status (Completed), Participants. "Completed" status badge displays on past meetings. Past meetings have no action buttons.
3.5 Schedule New Meeting Flow
User clicks "+ Schedule Meeting" button. System opens meeting creation modal (from Calendar/Calendly module). Client is pre-selected as participant. User fills meeting details: Title, Date, Time, Duration, Location/Video link, Additional participants. User clicks "Schedule" to create meeting. System creates meeting and sends invitations. Meeting appears in Upcoming section. [TBD: PM to confirm - reuse Calendar module modal]
3.6 Join Meeting Flow
User views upcoming meeting with video link. User clicks "Join Meeting" button. System opens video conference link in new tab. Meeting remains in Upcoming until scheduled end time passes. After end time, meeting moves to Past section with "Completed" status.
3.7 View Meeting Details
User clicks on meeting card (not Join button). System opens meeting detail modal/drawer. Modal shows: Full meeting details, Participant list, Notes field, Related project link, Edit/Cancel buttons. User can add notes to meeting. User can edit meeting details (if upcoming). User can cancel meeting (if upcoming).
4. Functional Logic
4.1 Meeting Organization Logic
System evaluates each meeting associated with client. If meeting end_time is greater than current_time: Category is "Upcoming", sorted ascending by start_time (soonest first). If meeting end_time is less than current_time: Category is "Past", sorted descending by start_time (most recent first), status set to "Completed".
4.2 Meeting Card Display Logic
Element
Display Rule
Title
Meeting title, truncate at 50 chars
Date
"MMM DD, YYYY" format
Time
"HH:MM AM/PM" in user's timezone
Duration
"X hours Y minutes" or "X min"
Project
Project name with link
Participants
Avatar stack, "+N" for overflow
Join Button
Show only if video_link exists AND meeting is upcoming
4.3 Meeting Count Badge Logic
System counts meetings where end_time > current_time. Badge displays count on Meetings tab. Badge is hidden if count is 0. Count updates in real-time as meetings pass.
4.4 Meeting Status Logic
Condition
Status
Display
start_time > current_time
Upcoming
No status badge
start_time <= current_time <= end_time
In Progress
"In Progress" badge (optional)
end_time < current_time
Completed
"Completed" badge
Meeting cancelled
Cancelled
"Cancelled" badge (strikethrough)
4.5 Pre-Population Logic for New Meeting
When creating meeting from client profile:
- Client automatically added as participant.
- If client has single project, project is pre-selected.
- If client has multiple projects, user must select project.
- Default duration: 30 minutes.
- Default meeting type: Video call.
4.6 Timezone Handling
All meeting times stored in UTC. Display times converted to user's browser timezone. Timezone indicator shown next to time (e.g., "EST", "PST"). Client invitations include timezone conversion.
4.7 Empty State Logic
If client has no meetings: Display "No meetings scheduled" message with "+ Schedule Meeting" CTA. If no upcoming meetings but has past: Show empty Upcoming section with message, show Past section with data.
4.8 Impact on Other Modules
Module
Impact
Calendar Module
Meetings created here appear in calendar
Project Module
Meeting linked to project appears in project view
Notifications
Meeting reminders sent to participants
Client Portal
Client can view their meeting schedule
Activity Log
Meeting creation/updates logged
5. Field Details & Validations
5.1 Meeting Display Fields
Field Name
Field Type
Source
Display Format
Title
Text
Meeting record
Max 50 chars with ellipsis
Date
Date
Meeting.start_time
"MMM DD, YYYY"
Time
Time
Meeting.start_time
"HH:MM AM/PM TZ"
Duration
Calculated
end_time - start_time
"X hr Y min"
Project
Reference
Meeting.project_id
Project name (linked)
Type
Enum
Meeting.type
Icon + label
Participants
Reference
Meeting.participants
Avatar stack
Video Link
URL
Meeting.video_link
Hidden, used for Join button
5.2 Schedule Meeting Fields
Field Name
Field Type
Mandatory
Validation Rules
Title
Text
Yes
Max 100 chars, min 3 chars
Date
Date Picker
Yes
Must be today or future
Start Time
Time Picker
Yes
Valid time format
Duration
Dropdown
Yes
15min, 30min, 45min, 1hr, 1.5hr, 2hr
Project
Dropdown
Yes
Client's active projects
Location/Link
Text/URL
No
Valid URL if video call
Participants
Multi-select
No
Team members, other clients
Notes
Textarea
No
Max 2000 chars
6. Success Message Handling
Action
Success Message
Display Type
Duration
Meeting scheduled
"Meeting scheduled successfully"
Toast notification
5 seconds
Meeting updated
"Meeting updated successfully"
Toast notification
5 seconds
Meeting cancelled
"Meeting cancelled"
Toast notification
5 seconds
Notes saved
"Notes saved"
Inline indicator
3 seconds
7. Error Message Handling
7.1 Validation Errors
Field
Error Condition
Error Message
Title
Empty
"Meeting title is required"
Title
Too short
"Title must be at least 3 characters"
Date
Past date
"Meeting date must be today or in the future"
Time
Past time (today)
"Meeting time has already passed"
Project
Not selected
"Please select a project"
Video Link
Invalid URL
"Please enter a valid meeting URL"
7.2 System Errors
Error Type
Error Message
Display Type
Schedule failed
"Unable to schedule meeting. Please try again"
Toast notification
Join failed
"Unable to open meeting link"
Toast notification
Load failed
"Unable to load meetings. Please refresh"
Inline message
8. Edge Cases
Edge Case ID
Scenario
Expected Behavior
Priority
EC-001
Meeting happening right now
Show "In Progress" badge, Join button active
High
EC-002
Meeting with no video link
No Join button, show location text instead
Medium
EC-003
Meeting spans multiple days
Display start date, show full duration
Low
EC-004
Client removed from project after meeting scheduled
Meeting remains visible, project shows "(Removed)"
Medium
EC-005
All participants cancel
Meeting shows "Cancelled" status
Medium
EC-006
Back-to-back meetings same day
Display in correct chronological order
Medium
EC-007
Meeting in different timezone than user
Show correct local time with TZ indicator
High
EC-008
50+ past meetings
Paginate or virtualize list for performance
Medium
EC-009
Meeting link expired
Join button opens link, platform handles expiry
Low
EC-010
Edit meeting after start time passed
Prevent editing, show "Cannot edit past meetings"
Medium
9. Acceptance Criteria
9.1 Meetings Tab Display
AC ID
Criteria
AC-001
Meetings tab is accessible from client profile
AC-002
Tab badge shows count of upcoming meetings
AC-003
Upcoming meetings sorted by date (soonest first)
AC-004
Past meetings sorted by date (most recent first)
AC-005
Meeting cards display all required information
9.2 Join Meeting
AC ID
Criteria
AC-006
Join button appears for meetings with video links
AC-007
Join button opens video link in new tab
AC-008
Join button not shown for past meetings
AC-009
Join button not shown for meetings without video links
9.3 Schedule Meeting
AC ID
Criteria
AC-010
Schedule Meeting button opens creation modal
AC-011
Client is pre-selected as participant
AC-012
All required fields are validated
AC-013
Created meeting appears in Upcoming section
AC-014
Meeting invitations are sent to participants
9.4 Meeting Management
AC ID
Criteria
AC-015
User can view meeting details by clicking card
AC-016
User can edit upcoming meetings
AC-017
User can cancel upcoming meetings
AC-018
Past meetings cannot be edited
10. Test Cases
Manual test cases are provided in the accompanying Excel file: FRD_07_Client_Profile_Meetings_Test_Cases.xlsx
Test case categories include:
- Tab navigation and display
- Meeting card functionality
- Schedule meeting flow
- Join meeting functionality
- Edge case testing
11. Dependencies
Dependency ID
Module/Feature
Dependency Type
Description
DEP-001
Calendar/Calendly Module
Functional
Meeting creation and management
DEP-002
Project Module
Data
Project associations
DEP-003
Video Conferencing
External
Zoom, Google Meet, etc.
DEP-004
Notification Service
Functional
Meeting reminders
DEP-005
Timezone Service
Technical
Time conversions
12. References
12.1 Figma Designs: Figma
8. Client Profile > Payments Tab
FRD #8: Client Profile > Payments Tab
Document Version: 1.0 Created Date: December 16, 2025 Module: Client Profile > Payments Tab Platform: Pixally CRM - Agency Portal
1. Module Overview
1.1 Purpose
This document defines the functional requirements for the Payments tab within the Client Profile. The Payments tab provides a comprehensive view of all financial transactions associated with a client, including invoices, payments received, and payment statuses across all their projects.
1.2 Scope
This FRD covers:
- Payments tab interface and layout
- Invoice listing and status tracking
- Payment status definitions
- Send invoice functionality
- Mark as Paid functionality
- Payment history and filtering
1.3 Key Business Rules
Rule ID
Rule Description
BR-001
Payments tab shows invoices from all projects where client is the primary contact
BR-002
Only Booked Clients can have invoices (not Leads)
BR-003
Invoices are generated from the Proposal Module or created manually
BR-004
"Mark as Paid" is available for Unpaid, Overdue, and Failed statuses
BR-005
Client Worth is calculated as sum of all paid invoices
BR-006
Invoice actions are available in 3-dot menu
BR-007
Refund functionality links to Financial Module
2. User Roles & Permissions
Role
View Payments
Send Invoice
Mark as Paid
Process Refund
Download Invoice
Agency Owner (AO)
✅
✅
✅
✅
✅
Agency Admin
✅
✅
✅
✅
✅
Account Manager (AR)
✅
✅
✅
❌
✅
Team Member
✅
❌
❌
❌
✅
Contractor
❌
❌
❌
❌
❌
Client
❌
❌
❌
❌
❌
Note: [TBD: PM to confirm role-based access for payment management]
3. User Flow
3.1 Access Points
Access Point
Navigation Path
Client Profile
Clients & Contractors → Clients → Client Name → Payments Tab
3.2 Payments Tab Display
User navigates to Client Profile (Booked Client only). User clicks "Payments" tab. System displays payment summary header. System displays invoice listing table. Table shows all invoices associated with this client.
3.3 Payment Summary Header
System displays total Client Worth (sum of paid invoices). System displays count of pending invoices. System displays total outstanding amount. "+ Send Invoice" button displayed in header.
3.4 Invoice Listing Table
System displays table with columns: Invoice #, Project, Amount, Due Date, Status, Actions. Invoices sorted by due date (most recent first). Status badges indicate: Paid, Unpaid, Overdue, Failed, Refunded. 3-dot action menu available for each invoice. Clicking invoice row opens invoice detail.
3.5 Send Invoice Flow
User clicks "+ Send Invoice" button. System opens invoice creation modal. User selects project for invoice. User enters invoice details: Amount, Description, Due date, Payment schedule. User clicks "Send Invoice". System generates invoice and sends to client email. Invoice appears in listing with "Unpaid" status. [TBD: PM to confirm - refer to Financial Module FRD for detailed invoice creation]
3.6 Mark as Paid Flow
User clicks 3-dot menu on invoice row. User selects "Mark as Paid". System displays confirmation modal. User confirms payment received. System updates invoice status to "Paid". System updates Client Worth calculation. Payment date is recorded as current date.
3.7 Invoice Actions (3-dot Menu)
Action
Visibility
Behavior
View Details
All statuses
Opens invoice detail modal
Download PDF
All statuses
Downloads invoice as PDF
Send Reminder
Unpaid, Overdue
Sends payment reminder email
Mark as Paid
Unpaid, Overdue, Failed
Changes status to Paid
Process Refund
Paid
Opens refund flow (Financial Module)
Void Invoice
Unpaid
Cancels invoice
3.8 Filter and Search
User can filter by status: All, Paid, Unpaid, Overdue, Failed, Refunded. User can filter by project. User can filter by date range. User can search by invoice number.
4. Functional Logic
4.1 Invoice Display Logic
System queries all invoices where client is primary contact. Invoices grouped by project (optionally). Each invoice displays: Number, Project name, Amount with currency, Due date, Status badge.
4.2 Payment Status Logic
Status
Condition
Badge Color
Unpaid
Due date in future, no payment
Yellow
Overdue
Due date passed, no payment
Red
Paid
Full payment received
Green
Partial
Partial payment received
Orange
Failed
Payment attempt failed
Red (different)
Refunded
Payment was refunded
Gray
Void
Invoice cancelled
Gray (strikethrough)
4.3 Client Worth Calculation
Client Worth equals the sum of all invoice amounts where invoice status is "Paid" and invoice client_id matches current client. Worth is displayed in header. Worth updates when invoice marked as paid. Worth decreases when refund processed. Worth aggregates across all brands if client exists in multiple brands.
4.4 Overdue Detection Logic
System runs daily check on all invoices. If invoice.due_date < current_date AND status = 'Unpaid': status = 'Overdue' Overdue invoices trigger notification to agency. [TBD: PM to confirm overdue notification behavior]
4.5 Mark as Paid Logic
User selects "Mark as Paid" from 3-dot menu. System validates invoice is in valid status (Unpaid, Overdue, Failed). System prompts for confirmation. On confirm: status = 'Paid', payment_date = current_timestamp. System updates Client Worth. System logs activity.
4.6 Refund Logic
Refund flow handled by Financial Module. Link provided to Financial Module from 3-dot menu. After refund processed, status updates to "Refunded". Client Worth is reduced by refund amount. [TBD: PM to confirm - refer to Financial Module FRD]
4.7 Empty State Logic
If client has no invoices: Display "No invoices yet" message with "+ Send Invoice" CTA. For Leads: Display "Invoices available for Booked Clients only" message.
4.8 Impact on Other Modules
Module
Impact
Financial Module
Invoice and payment data source
Project Module
Project-level invoice totals updated
Reports Module
Revenue reports reflect payment status
Client Portal
Client can view their invoices
Notifications
Payment reminders and confirmations
5. Field Details & Validations
5.1 Invoice Listing Fields
Field Name
Field Type
Source
Display Format
Invoice #
Text
invoice.number
"INV-XXXXX"
Project
Reference
invoice.project_id
Project name
Amount
Currency
invoice.amount
"$X,XXX.XX"
Due Date
Date
invoice.due_date
"MMM DD, YYYY"
Status
Enum
invoice.status
Status badge
Payment Date
Date
invoice.payment_date
"MMM DD, YYYY" (if paid)
5.2 Send Invoice Fields
Field Name
Field Type
Mandatory
Validation Rules
Project
Dropdown
Yes
Client's active projects
Amount
Currency
Yes
> 0, max 2 decimal places
Description
Textarea
No
Max 500 chars
Due Date
Date Picker
Yes
Today or future
Payment Type
Dropdown
Yes
One-time, Recurring
6. Success Message Handling
Action
Success Message
Display Type
Duration
Invoice sent
"Invoice sent to [client email]"
Toast notification
5 seconds
Marked as paid
"Invoice marked as paid"
Toast notification
5 seconds
Reminder sent
"Payment reminder sent"
Toast notification
5 seconds
Invoice voided
"Invoice voided"
Toast notification
5 seconds
PDF downloaded
"Invoice downloaded"
Browser download
N/A
7. Error Message Handling
7.1 Validation Errors
Field
Error Condition
Error Message
Amount
Zero or negative
"Amount must be greater than zero"
Amount
Invalid format
"Please enter a valid amount"
Due Date
Past date
"Due date must be today or in the future"
Project
Not selected
"Please select a project"
7.2 System Errors
Error Type
Error Message
Display Type
Send failed
"Unable to send invoice. Please try again"
Toast notification
Mark paid failed
"Unable to update payment status"
Toast notification
Load failed
"Unable to load payment history"
Inline message
8. Edge Cases
Edge Case ID
Scenario
Expected Behavior
Priority
EC-001
Lead profile (not Booked Client)
Payments tab shows restricted message
High
EC-002
Invoice for archived project
Invoice displays with project marked "(Archived)"
Medium
EC-003
Multiple invoices same project
All invoices listed, grouped option available
Medium
EC-004
Invoice in foreign currency
Display original currency with conversion note
Low
EC-005
Payment received after marked void
Cannot mark void invoice as paid
Medium
EC-006
Partial payment received
Show "Partial" status with remaining amount
Medium
EC-007
100+ invoices for client
Paginate listing (20 per page)
Medium
EC-008
Invoice due today
Status remains "Unpaid" (not Overdue) until day after
High
EC-009
Refund more than paid amount
Prevent; error "Refund cannot exceed paid amount"
High
EC-010
Send invoice to client without email
Error "Client email required to send invoice"
High
9. Acceptance Criteria
9.1 Payments Tab Display
AC ID
Criteria
AC-001
Payments tab accessible for Booked Clients only
AC-002
Client Worth displays correctly in header
AC-003
All invoices for client are listed
AC-004
Invoice status badges display correctly
AC-005
Invoices sorted by due date
9.2 Invoice Actions
AC ID
Criteria
AC-006
3-dot menu shows appropriate actions per status
AC-007
Mark as Paid updates status and Client Worth
AC-008
Send Reminder sends email to client
AC-009
Download PDF generates and downloads invoice
AC-010
Void Invoice cancels unpaid invoice
9.3 Send Invoice
AC ID
Criteria
AC-011
Send Invoice button opens creation modal
AC-012
Invoice sent to client email
AC-013
New invoice appears in listing with Unpaid status
9.4 Filters
AC ID
Criteria
AC-014
Status filter works correctly
AC-015
Project filter shows only client's projects
AC-016
Date range filter works correctly
10. Test Cases
Manual test cases are provided in the accompanying Excel file: FRD_08_Client_Profile_Payments_Test_Cases.xlsx
Test case categories include:
- Tab access and restrictions
- Invoice display and sorting
- Payment status logic
- Invoice actions
- Edge case testing
11. Dependencies
Dependency ID
Module/Feature
Dependency Type
Description
DEP-001
Financial Module
Functional
Invoice creation and management
DEP-002
Proposal Module
Data
Auto-generated invoices from proposals
DEP-003
Project Module
Data
Project associations
DEP-004
Email Service
Functional
Invoice and reminder emails
DEP-005
PDF Generator
Technical
Invoice PDF generation
DEP-006
Payment Gateway
External
Stripe integration
12. References
12.1 Figma Designs: Figma
9. Client Profile > Notes Tab
Functional Requirements Document (FRD) — Client Profile > Notes Tab
Document Version: 2.0 Updated Date: May 06, 2026 Module: Client Profile > Notes Tab Platform: Pixally CRM — Agency Portal Aligned With: Agency Notes Module (Project Details FRD) — Notes logic standardized across modules.
1. Module Overview
-
Module Name: Client Profile — Notes Management
-
Purpose: Enable agency users to create, view, edit, and delete public and private notes from within a Client's profile, with full sync to the associated Project and Event, and cross-portal visibility based on the selected audience.
-
Business Goal: Centralize client-related communication and documentation at the client level while keeping notes consistent with project and event-level notes, ensuring agency, contractors, and clients see the same information across portals.
-
**Scope:
**- Notes tab interface inside Client Profile
- Public and Private note creation, edit, delete (CRUD)
- Mandatory Project + Event association for every note
- Audience-based visibility for Public notes (Clients, Contractors, Team Members of the selected project)
- Cross-portal synchronization to the Project module, Client Portal, and Contractor Portal
- Search, sort, and pagination
- Visibility conversion (Private ↔ Public) per role rules
-
**Out of Scope:
**- Lead Profile does NOT have a Notes tab. Notes only become available once a Lead is converted to a Client. (Leads → Clients flow is handled in the Lead Conversion module.)
- Notes initiated from the Project or Event module (covered in the Agency Notes Module FRD)
- Client-side note creation from the Client Portal (covered in the Agency Notes Module FRD)
2. User Roles & Permissions
Role
View Public Notes
View Private Notes
Create Notes
Edit Own Notes
Delete Own Notes
Agency Owner (AO)
✅
Own only
✅
✅
✅
Agency Admin
✅
Own only
✅
✅
✅
Project Manager (PM)
✅
Own only
✅
✅
✅
Team Member
✅
Own only
✅
✅
✅
Notes on Access:
- Contractors do not have access to the Client Profile and therefore cannot view or create notes from this module. Contractors can still be selected as an audience for Public notes — the note will appear for them in the Project module / Contractor Portal, not in the Client Profile.
- Clients do not have access to the Client Profile. They can be selected as an audience for Public notes — the note will appear for them in the Client Portal under the associated Project/Event.
3. User Flow
3.1 Access Point
Access Point
Navigation Path
Client Profile
Clients & Contractors → Clients → Client Name → Notes Tab
Lead Profile does not have a Notes tab. Notes for a lead only become available after the Lead is converted to a Client.
3.2 Empty State
- User navigates to a Client Profile and clicks the Notes tab.
- If no notes exist for this client, both Public Notes and Private Notes sections are displayed with their respective empty-state messaging and a "+ Add Note" CTA per section.
3.3 Create Note Flow (from Public section)
- User clicks "+ Add Note" in the Public Notes section.
- The "Create Note" pop-up opens with Visibility = Public pre-selected and the Private toggle disabled.
- User selects a Project (mandatory dropdown — only this client's active projects are listed).
- User selects an Event (mandatory dropdown — populated based on the selected project).
- Audience checkboxes (Clients, Contractors, Team Members) are displayed; at least one must be selected.
- User enters Headline, Note Content (rich text), and optionally uploads images.
- User clicks Create Note → success toast → note appears at the top of the Public section.
3.4 Create Note Flow (from Private section)
- User clicks "+ Add Note" in the Private Notes section.
- The "Create Note" pop-up opens with Visibility = Private pre-selected and the Public toggle disabled.
- User selects Project (mandatory) and Event (mandatory, cascading from project).
- No audience checkboxes shown for Private notes.
- User enters Headline, Note Content, and optionally uploads images.
- User clicks Create Note → success toast → note appears at the top of the Private section (visible only to creator).
3.5 View Note Flow
- User clicks anywhere on a note card.
- A read-only "Note Pop-Up View" opens displaying full content, metadata, and Edit/Delete buttons (visible only if the current user is the creator).
3.6 Edit Note Flow
- User clicks the kebab (3-dot) menu on their own note → Edit, OR clicks Edit inside the Note Pop-Up View.
- Edit pop-up opens, pre-filled with existing values.
- User modifies any editable field (including Project, Event, Visibility, audience).
- On Save → success toast; note moves between sections if visibility was changed.
3.7 Delete Note Flow
- User clicks the kebab menu on their own note → Delete, OR clicks Delete inside the Note Pop-Up View.
- Confirmation dialog: "Delete this note?"
- On confirm → note is permanently removed from Client Profile, Project module, and any portals it was visible in → success toast.
4. Functional Logic
4.1 Empty State
- If no notes exist for the client, both Public Notes and Private Notes sections are rendered with their empty-state copy and "+ Add Note" CTAs.
- Empty-state messages:
- Public Notes: "No public notes yet."
- Private Notes: "No private notes yet. (Only visible to you.)"
4.2 General Display
- Placement: Notes appear in the Public Notes section or Private Notes section of the Client Profile based on their visibility flag.
- Card Structure: Each note card shows: Event title with color badge, Project name, Kebab menu (creator only), Headline (truncated), Content preview (truncated; for image-only notes show "Click here to preview"), User avatars, Creation timestamp.
- Ordering: Newest first. Recently edited notes move to the top.
- Pagination: Show 4 notes per section initially, then "Show More (+X notes)" in groups of 10.
- Search: Works across all visible notes (Public + Private) by Headline and Note Content. Matching notes are filtered and displayed.
- Sort: Newest or Oldest. The list rearranges accordingly based on creation date.
4.3 Visibility & Avatars
- Private Notes: Visible to the creator only. Card shows the creator's avatar.
- Public Notes: Visible to the selected audience (Clients, Contractors, Team Members of the selected project) plus all agency users with profile access. Cards show up to 3 avatars + "+X" indicator. Hover reveals a categorized audience list (Clients / Contractors / Team Members).
4.4 Cross-Portal Display (Public Notes only)
A Public note created in the Client Profile syncs based on the audience checkboxes selected. The audience pool is scoped to the project selected during note creation:
Audience Checkbox
Resulting Visibility
Clients
Visible to clients attached to the selected project, in the Client Portal under that Project / Event
Contractors
Visible to contractors attached to the selected project, in the Contractor Portal under that Project / Event
Team Members
Visible to all team members in the Agency Portal, under both Client Profile and Project module
- The same note appears in:
- Client Profile → Notes Tab (Public section)
- Project module → Notes (Public section under the selected Event)
- The respective external portals based on audience checkboxes
4.5 Create Note
- Notes can be created from the Client Profile by Agency Owners, Agency Admins, Project Managers, and Team Members.
- Project context: Project is always selectable from the create modal (no pre-fill, since this is the client level). Only active projects of the current client are listed.
- Event context: Event dropdown is mandatory and is populated based on the selected project. If no project is selected, the Event dropdown is disabled.
- Empty state: Each section (Public/Private) shows its own "+ Add Note" CTA.
- After notes exist: Each section retains its own "+ Add Note" CTA, which pre-selects visibility:
- Public + : Public pre-selected, Private disabled
- Private + : Private pre-selected, Public disabled
4.6 Role Rules (within Client Profile)
- Agency Users (Owner, Admin, PM, Team Member) can create both Private and Public notes.
- Public notes require selecting at least one audience (Clients, Contractors, Team Members).
- Private notes are visible only to the creator and have no audience selection.
- Contractors and Clients cannot create notes from the Client Profile (no access to this view).
4.7 Edit Note
- Agency Users can edit notes they created via the Kebab Menu → Edit, or via the Note Pop-Up View → Edit button.
- Access: Only the note creator can edit. Fields are pre-populated.
- Editable Fields: Project, Event, Headline, Note Content, Images, Visibility (Private/Public), Audience checkboxes (Public only).
- Changing the Project resets the Event dropdown (since events are project-scoped).
4.8 Visibility Changes
- When a note is changed from Private to Public, the user must select one or more audiences (Clients, Contractors, Team Members of the project). On save, the note moves from the Private section to the Public section and is propagated cross-portal based on selected audience.
- When a note is changed from Public to Private, the note is hidden from all audiences and portals and moved into the creator's Private Notes section in the Client Profile.
- On Save: Note updates, moves between sections if needed, and a success toast is shown.
4.9 Delete Note
- Access: Only the note creator can delete a note (via Kebab Menu → Delete, or Note Pop-Up → Delete).
- Results:
- Public Note: Removed from everywhere — Client Profile, Project module, and all portals it was visible in.
- Private Note: Removed only for the creator (it never existed elsewhere).
- On Delete: Confirmation required, then permanent deletion + success toast.
4.10 Note ↔ Project / Event Sync
- Every note in the Client Profile is tied to a specific Project and Event.
- A note created from the Client Profile is automatically visible in the corresponding Project module's Notes section (under the selected Event).
- Edits made from either location sync to the other.
- Deletions made from either location remove the note from both.
- This sync logic is the same as defined in the Agency Notes Module (Project Details FRD).
4.11 Impact on Other Modules
Module
Impact
Project Module
Notes appear in the Project's Notes section under the selected Event (Public section if Public, otherwise creator's Private section)
Client Portal
Public notes with "Clients" audience checked appear under the corresponding Project/Event
Contractor Portal
Public notes with "Contractors" audience checked appear under the corresponding Project/Event
Activity Log
Note creation, edit, and delete events are logged
Global Search
Public notes are indexed for global search; private notes are excluded
Notification System
Audience members receive a notification when a Public note is shared with them
CRM Library Module
Uploaded images are saved to the CRM library and embedded in the note
5. Field Details & Validations
5.1 Create / Edit Note Fields
Field Name
Required
Validation Rules
Choose Project
Yes
Dropdown lists only active projects of the current client. Selecting a project drives the Event dropdown.
Choose Event
Yes
Dropdown lists events under the selected project. Disabled until a project is selected.
Choose Visibility
Yes
Private Note or Public Note. Pre-selected based on which section's "+ Add Note" was clicked; the alternate option is disabled.
User Access Checkboxes
Conditional
Displayed only when Public visibility is selected. Three checkboxes: Clients, Contractors, Team Members. At least one must be selected. The audience pool is scoped to the selected project.
Headline
Yes
No character limit. Single-line text input.
Note Content
No
Standard rich text formatting features — Undo, Redo, Heading, Bold, Italic, Underline, Emoji, Link, Bullet list, Number list.
Image Upload
No
On click, opens a pop-up with two options: Library (select from existing CRM library images) and Upload (upload from local system). Supported formats: .jpg, .jpeg, .png, .webp, .svg. Max 15 MB per file. Uploaded images are auto-saved to the CRM library and inserted into the note.
Cancel
No
Closes the pop-up without saving changes.
Create Note / Save
No
Validates fields and either shows the relevant error or saves the note and closes the pop-up.
5.2 Note Pop-Up View Fields
Field Name
Display Rules
Note Title
Shows note headline as the main title
Public/Private
Displays "Public Note" or "Private Note"
Cancel (X)
Closes the pop-up and returns to the Notes tab
Project
Displays the project name (e.g., "Jadon & Monika Wedding")
Event
Displays the event name with its color badge
Visible To
Private Notes: Shows creator avatar ("You"). Public Notes: Shows first 3 user avatars + "+X" for additional users. Hover displays a categorized list: Clients, Contractors, Team Members.
Created On
"CREATED ON" label with date and time. Format: Month DD, YYYY HH:MM
Created By
"CREATED BY" label with user avatar and name
Edited On
"EDITED ON" label with last modification date/time. Only displayed if the note has been edited at least once. Format: Month DD, YYYY HH:MM
Note Content
Full content with rich text formatting and any embedded media
Delete Button
Visible only to the creator. On click, shows a "Delete Note" confirmation dialog.
Edit Button
Visible only to the creator. On click, opens the Edit Note pop-up with pre-populated data.
6. Success Message Handling
Validation Scenario
Success Message
Note created successfully
"Note has been created successfully."
Note updated successfully
"Note has been updated successfully."
Note deleted successfully
"Note has been deleted successfully."
7. Error Message Handling
Field
Validation Scenario
Error Message
Choose Project
Not selected
"Please select a project."
Choose Event
Not selected
"Please select an event."
Choose Visibility
Not selected
"Please select the visibility option."
User Access Checkboxes
Public note saved with no audience selected
"Please select an option."
Headline
Empty submission
"Please enter a headline."
Note Content
Empty submission (only when no headline + no images either)
"Please enter note content."
Image Upload
Unsupported format
"Please upload a valid image format (.jpg, .jpeg, .png, .webp, .svg)."
Image Upload
File exceeds 15 MB
"Image size cannot exceed 15 MB."
General
Save / Update / Delete error
"Something went wrong."
Load
Notes failed to load
"Unable to load notes. Please refresh."
8. Edge Cases
Scenario
Expected Behavior
Client has no active projects
The "+ Add Note" CTA opens the modal, but the Project dropdown is empty with helper text "This client has no active projects." The Create button stays disabled until a project is available.
User changes the Project mid-creation
Event dropdown resets, and any previously selected event is cleared. Audience checkboxes also reset (since contractor/client lists are project-scoped).
Project deleted/archived after note created
Note remains in Client Profile and Project module references show the project as "(Archived)". Edit is still available; switching to another project requires re-selecting an event.
Audience member (client/contractor) removed from project after note created
Note remains; the removed user no longer sees the note in their portal but the note is still visible in Client Profile and Project module.
Search returns no results
Display "No notes found."
Agency user deletes a note while another user is viewing it
On the next API call/refresh, the note no longer appears for the other user.
Note opened in multiple tabs in the same browser, then deleted
Continues to display in stale tabs until refresh / next API call, after which it is removed.
Multiple agency users create notes simultaneously
All notes save independently with no conflict.
User tries to edit another user's note
Kebab menu does not show Edit/Delete options; Note Pop-Up View hides the Edit/Delete buttons.
Visibility changed Private → Public, then Public → Private back-to-back
Note moves correctly between sections; audience selections from the Public phase are discarded once Private is saved.
Creator deactivated
Note shows "[Deactivated User]" as creator. Editing/deleting by anyone else is still not allowed.
Client archived after note created
Notes remain accessible in the archived client profile (read-only context).
Very long headline / large image-heavy note
Rendered with proper truncation in the card view; full content available in the Note Pop-Up View.
Edit changes the Project — note already synced cross-portal
On save, the note is removed from the previous Project's notes and audience portals and re-synced to the newly selected Project + Event + audience.
Note created while user is being downgraded to no-access role
Save call is honored if validated server-side at submission; subsequent access is governed by new permissions.
9. Acceptance Criteria
- Notes tab is accessible from the Client Profile only; Lead profiles do not show this tab.
- Notes are organized into separate Public and Private sections; both sections are always visible.
- Notes are sorted newest-first by default; sort can be toggled to Oldest.
- Search filters notes across both Public and Private by headline and content.
- Pagination shows 4 notes initially with "Show More (+X)" in groups of 10.
- Project and Event are mandatory for every note (Public and Private).
- Public notes require at least one audience checkbox (Clients, Contractors, Team Members), scoped to the selected project.
- Private notes are visible only to their creator.
- "+ Add Note" CTA in each section pre-selects the section's visibility and disables the alternate option.
- Public notes sync to the Project module and propagate to Client/Contractor portals based on audience checkboxes.
- Visibility can be changed Private ↔ Public; the note moves between sections and propagates correctly.
- Only the note creator can edit or delete a note (via kebab menu or Note Pop-Up View).
- Delete action requires confirmation; on confirmation, note is removed from Client Profile, Project module, and all portals.
- Edited notes display the "EDITED ON" timestamp.
- Success toasts are shown after create, update, and delete.
- Contractors cannot access the Client Profile and therefore cannot create notes here, though they can be an audience for Public notes.
10. Dependencies
Module/System
Dependency Type
Impact if Unavailable
Client Management Module
Data dependency
Notes tab cannot render without Client context
Project Management Module
Data dependency
Project dropdown empty; note creation blocked
Events Management
Data dependency
Event dropdown empty; note creation blocked
User Management
Authentication dependency
Cannot determine user permissions or audience pool
Rich Text Editor Component
UI dependency
Cannot format note content
CRM Library Module
Integration dependency
Cannot select from existing images or save uploaded images to the library
Notification System
Integration dependency
Audience members will not receive note-creation alerts
Activity Log
Functional dependency
Note CRUD events will not be tracked
Lead-to-Client Conversion Module
Functional dependency
Notes are unavailable on Lead profiles by design; activated post-conversion
11. References
- Aligned FRD: Agency Notes Module (Project Details FRD) — Notes logic source of truth.
- Roles & Permissions: Roles and permissions — draft
- Figma Designs: Pixally — Client Profile Notes Tab
- Test Cases: FRD_09_Client_Profile_Notes_Test_Cases.xlsx
Change Log
Version
Date
Change Summary
1.0
December 16, 2025
Initial draft of Client Profile Notes Tab
2.0
May 06, 2026
Aligned with Agency Notes Module (Project Details FRD): added rich text + headline + image upload, audience checkboxes for Public notes, mandatory Project + Event, Private↔Public visibility conversion, search & sort, 4+10 pagination, cross-portal sync, removed Contractor access, removed Lead Profile from scope
10. Leads Profile
FRD #10: Leads Profile
Document Version: 1.0 Created Date: December 16, 2025 Module: Leads Profile Platform: Pixally CRM - Agency Portal
1. Module Overview
1.1 Purpose
This document defines the functional requirements for the Lead Profile view. The Lead Profile provides a comprehensive view of lead information with similar structure to Client Profile but with key differences reflecting the lead's pre-conversion status (no financial data, no invoice capabilities).
1.2 Scope
This FRD covers:
- Lead Profile layout and navigation
- Differences from Client Profile
- Lead-specific restrictions
- Lead to Client conversion indicators
- Portal link behavior for Leads
1.3 Key Business Rules
Rule ID
Rule Description
BR-001
Lead Profile has same 5 tabs as Client Profile: Overview, Communications, Meetings, Payments, Notes
BR-002
Lead Profile displays "Lead" badge (orange) instead of "Client" badge (green)
BR-003
Lead Profile does NOT display Client Worth (no financial data)
BR-004
Lead Profile does NOT have "Send Invoice" quick action
BR-005
Portal Link shows "No portal link yet" until Lead is attached to a project
BR-006
Lead automatically converts to Booked Client when proposal signed OR first payment received
BR-007
Payments tab is visible but shows limited/empty state for Leads
2. User Roles & Permissions
Role
View Lead
Edit Lead
Delete Lead
Add to Project
Schedule Meeting
Agency Owner (AO)
✅
✅
✅
✅
✅
Agency Admin
✅
✅
✅
✅
✅
Account Manager (AR)
✅
✅
✅
✅
✅
Team Member
✅
✅
✅
✅
✅
Contractor
Limited
❌
❌
❌
❌
Client
❌
❌
❌
❌
❌
3. User Flow
3.1 Access Points
Access Point
Navigation Path
Leads Listing
Clients & Contractors → Clients → Leads Tab → Click Lead Name
Search Results
Global Search → Lead Name
Project Clients
Project → Clients Tab → Click Lead Name
3.2 Lead Profile Header
User navigates to Lead Profile. System displays profile header with:
- Lead avatar/photo
- Lead name
- "Lead" badge (orange color)
- Email address
- Phone number
- 3-dot menu (Edit, Archive, Delete)
3.3 Lead Profile Tabs
System displays 5 tabs: Overview, Communications, Meetings, Payments, Notes. Tabs function identically to Client Profile except for noted differences. Unread counts display on Communications and Meetings tabs where applicable.
3.4 Overview Tab - Lead Specific
System displays Lead Overview with sections:
- Stats Section: Total Projects, Upcoming Meetings (NO Client Worth)
- Quick Actions: Edit, Archive, Delete, Add Project(s), Schedule Meeting (NO Send Invoice)
- Portal Link Section: Shows "No portal link yet" message if no projects attached
- Company Section: Current company association with "Add Company" option
- Projects Section: Active and Archived project tabs with project cards
- General Details: Contact information, address, dates
3.5 Portal Link Behavior for Leads
If Lead has no projects: Display "No portal link yet" with message "The portal link will appear after you add a project". If Lead has projects: Display portal link per brand (same as Client). Portal link is generated when Lead is first attached to a project.
3.6 Payments Tab for Leads
User clicks Payments tab on Lead Profile. System displays message: "Payment history will be available once this lead becomes a booked client." No invoices or payment data displayed. No "Send Invoice" action available. [TBD: PM to confirm - refer to F3 clarification: No invoices to Leads]
3.7 Lead to Client Conversion
Conversion triggers automatically when:
- Proposal is signed by Lead, OR
- First payment is received from Lead
Upon conversion:
- Badge changes from "Lead" (orange) to "Client" (green)
- Client Worth becomes calculated and displayed
- "Send Invoice" quick action becomes available
- Lead moves from Leads tab to Booked Clients tab in listing
4. Functional Logic
4.1 Lead vs Client Profile Comparison
Feature
Client Profile
Lead Profile
Badge
"Client" (green)
"Lead" (orange)
Client Worth
✅ Displayed
❌ Not shown
Send Invoice (Quick Action)
✅ Available
❌ Not available
Payments Tab
Full functionality
Empty state message
Portal Link
Always available
"No link yet" if no projects
Communications Tab
Full access
Full access
Meetings Tab
Full access
Full access
Notes Tab
Full access
Full access
4.2 Stats Section Logic (Lead)
Total Projects equals count of projects where lead_id matches current_lead. Upcoming Meetings equals count of meetings where lead_id matches current_lead AND start_time is greater than current time. Client Worth is NOT displayed for Leads.
4.3 Quick Actions Logic (Lead)
Action
Availability
Behavior
Edit
Always
Opens Edit Lead modal
Archive
Always
Archives lead
Delete
Conditional
Blocked if active projects
Add Project(s)
Always
Opens project selection
Schedule Meeting
Always
Opens meeting creation
Send Invoice
NEVER
Not available for Leads
4.4 Automatic Conversion Logic
Conversion triggers when proposal_signed OR payment_received event occurs. If entity type is "Lead": System changes entity type to "Booked Client". System updates badge to green "Client". System enables financial features. System moves entity to Booked Clients listing. System logs conversion in activity.
4.5 Portal Link Generation Logic
When lead is attached to project, system checks if portal_link exists for brand. If portal_link does not exist: System generates portal_link for brand and stores it. System displays portal_link in Overview section.
4.6 Impact on Other Modules
Module
Impact
Client Listing
Lead appears in Leads tab, not Booked Clients
Project Module
Lead can be attached to projects
Proposal Module
Lead can receive proposals
Financial Module
No invoices until converted
Reports
Lead counted in Lead metrics, not Client metrics
5. Field Details & Validations
5.1 Lead Profile Display Fields
Field Name
Display Location
Notes
Avatar
Header
Photo or initials
Full Name
Header
Editable
Badge
Header
"Lead" (orange)
Header / Details
Primary contact
Phone
Header / Details
With country code
Company
Overview
Optional association
Address
General Details
Full address
Created Date
General Details
Auto-generated
Last Updated
General Details
Auto-updated
6. Success Message Handling
Action
Success Message
Display Type
Duration
Lead edited
"Lead updated successfully"
Toast notification
5 seconds
Project added
"Lead added to [Project Name]"
Toast notification
5 seconds
Meeting scheduled
"Meeting scheduled successfully"
Toast notification
5 seconds
Lead converted
"Lead converted to Booked Client"
Toast notification
5 seconds
7. Error Message Handling
Error Type
Error Message
Display Type
Delete blocked
"Cannot delete lead with active projects"
Toast notification
Archive blocked
"Please remove lead from active projects before archiving"
Modal
Load failed
"Unable to load lead profile. Please refresh"
Inline message
8. Edge Cases
Edge Case ID
Scenario
Expected Behavior
Priority
EC-001
Lead with 0 projects
Portal shows "No link yet" message
High
EC-002
Lead converted mid-session
UI updates to Client badge immediately
High
EC-003
Lead has multiple brands through projects
Portal links shown per brand
Medium
EC-004
Lead archived then unarchived
Lead returns with same data intact
Medium
EC-005
Lead payment received without proposal
Converts to Client immediately
High
EC-006
Partial payment to Lead
Still converts if any payment received
Medium
EC-007
Lead profile viewed during conversion
Real-time update to Client UI
Medium
EC-008
User attempts Send Invoice on Lead
Action not available/visible
High
9. Acceptance Criteria
9.1 Lead Profile Display
AC ID
Criteria
AC-001
Lead Profile displays "Lead" badge (orange)
AC-002
Client Worth is NOT displayed for Leads
AC-003
"Send Invoice" quick action is NOT available
AC-004
All 5 tabs are accessible
AC-005
Portal link shows appropriate message based on project status
9.2 Lead Functionality
AC ID
Criteria
AC-006
Lead can be added to projects
AC-007
Meetings can be scheduled with Lead
AC-008
Notes can be created for Lead
AC-009
Communications work same as Client
9.3 Conversion
AC ID
Criteria
AC-010
Lead converts when proposal signed
AC-011
Lead converts when payment received
AC-012
Badge changes from Lead to Client on conversion
AC-013
Conversion enables financial features
10. Test Cases
Manual test cases are provided in the accompanying Excel file: FRD_10_Leads_Profile_Test_Cases.xlsx
Test case categories include:
- Profile display differences
- Tab functionality
- Quick action availability
- Portal link behavior
- Conversion scenarios
11. Dependencies
Dependency ID
Module/Feature
Dependency Type
Description
DEP-001
Client Profile (FRD_05)
Reference
Base profile structure
DEP-002
Project Module
Functional
Project attachments
DEP-003
Proposal Module
Functional
Conversion trigger
DEP-004
Financial Module
Functional
Payment conversion trigger
DEP-005
Client Portal
Functional
Portal link generation
12. References
12.1 Figma Designs: Figma
11. Company Profile
FRD #11: Company Profile
Document Version: 2.0
Created Date: December 16, 2025
Last Updated: April 10, 2026
Module: Company Profile
Platform: Pixally CRM - Agency Portal
1. Module Overview
1.1 Purpose
This document defines the functional requirements for the Company Profile view. The Company Profile provides an overview of company information, aggregated metrics from associated clients, and management of client-company associations. Unlike Client/Lead profiles, Company Profile has only an Overview section (no tabs).
1.2 Scope
This FRD covers:
- Company Profile layout (Overview only)
- Client Worth aggregation
- Associated clients management
- Associated projects display
- Company edit/archive/delete actions
1.3 Key Business Rules
Rule ID
Rule Description
BR-001
Company Profile has only Overview section (no tabs)
BR-002
Companies do NOT have portal access
BR-003
Client Worth displays aggregated value from all associated clients
BR-004
Companies cannot be directly linked to projects (projects link to clients)
BR-005
Associated projects are shown through client associations
BR-006
Company can have multiple clients associated
BR-007
Deleting company does NOT cascade delete associated clients
BR-008
Company with clients on active projects cannot be archived
BR-009
Company with clients on completed or archived projects only can be archived
2. User Roles & Permissions
Role
View Company
Edit Company
Archive Company
Delete Company
Add Clients
Remove Clients
Agency Owner (AO)
✅
✅
✅
✅
✅
✅
Agency Admin
✅
✅
✅
✅
✅
✅
Account Manager (AR)
✅
✅
✅
✅
✅
✅
Team Member
✅
✅
✅
✅
✅
✅
Contractor
Limited
❌
❌
❌
❌
❌
Client
❌
❌
❌
❌
❌
❌
3. User Flow
3.1 Access Points
Access Point
Navigation Path
Company Listing
Clients & Contractors → Clients → Companies Tab → Click Company Name
Client Profile
Client Profile → Company Section → Click Company Name
Search Results
Global Search → Company Name
3.2 Company Profile Header
User navigates to Company Profile. System displays profile header with:
- Company logo/avatar
- Company name
- "Company" badge
- Primary email
- Phone number
- 3-dot menu (Edit, Archive, Delete)
3.3 Company Overview Layout
System displays single Overview section with:
- Stats Section: Client Worth (aggregated), Total Projects
- Quick Actions: Edit, Archive, Delete, Add Client(s)
- Internal Notes: Private notes about company with edit/delete
- General Details: Email, Phone, Website, Industry, Created date
- Projects Section: Active/Archived tabs showing associated projects
- Clients Section: List of associated clients with add/remove options
3.4 Stats Section
- System calculates aggregated Client Worth from all associated clients
- System counts Total Projects associated with all clients of this company
- Stats update in real-time when client associations change
3.5 Projects Section
- Projects are derived from associated clients (not direct association)
- Active tab shows projects in progress
- Archived tab shows completed/archived projects
- Each project card shows: Project name, Event date, Associated client(s), 3-dot menu (Remove option)
- "Remove" detaches project view (doesn't delete project)
3.6 Clients Section
- System displays grid/list of associated clients
- Each client card shows: Avatar, Name, Date added, 3-dot menu (Remove option)
- "+ Add Client" button available
- Clicking "+" shows dropdown: "New Client" | "Existing Client"
3.7 Add New Client Flow
- User clicks "+" → "New Client"
- System opens Create Client modal
- Company is pre-selected (read-only)
- User fills client details
- Client is created and associated with company
3.8 Add Existing Client Flow
- User clicks "+" → "Existing Client"
- System opens client selection modal
- Modal shows searchable list of clients not associated with this company
- User can select multiple clients
- System shows warning if client already has another company association
- User confirms; clients are associated with company
3.9 Remove Client Flow
- User clicks 3-dot on client card
- User selects "Remove"
- System displays confirmation modal
- User confirms; client-company association is removed
- Client is not deleted, only disassociated
3.10 Archive Company
- User clicks Archive button
- System checks for restrictions (see Section 4.8)
- If restricted, blocking modal appears with clickable client/project list
- If allowed, confirmation modal appears
- User confirms archive
- Success toast displayed
- Company moves to archived list
4. Functional Logic
4.1 Client Worth Aggregation
Company worth equals the sum of client_worth for each client where client.company_id equals current_company.
Worth updates when:
- Client is associated with company
- Client is removed from company
- Associated client's worth changes
4.2 Total Projects Calculation
Total projects equals the count of distinct projects where any project client has company_id matching current_company.
4.3 Projects Display Logic
- Projects are shown through client association, not direct link
- Each project card shows which client(s) from this company are attached
- If multiple company clients on same project, project shown once with all client names
4.4 Client Association Logic
One company per client rule applies. When existing client is added to company:
- If client has existing company, show warning
- User confirms to proceed
- Previous company association removed
- New company association created
4.5 Remove Client Logic
Removing client from company:
- Client-company association deleted
- Client record remains intact
- Client's projects remain intact
- Client appears as "No Company" in client listing
4.6 Internal Notes Logic
- Company internal notes are separate from client notes
- Notes visible only to team (not clients)
- Same public/private note structure as client profile
- Notes do NOT sync to projects (company not linked to projects)
4.7 Empty State Logic
- If company has no clients: Display "No clients added yet" with "+ Add Client" CTA
- If company has no projects (through clients): Display "You have no projects yet" with "+ Add Client" CTA
4.8 Archive Restrictions
4.8.1 Project Status Determination
Project status is determined based on the pipeline stages of all events within the project:
Pipeline Stage
Maps To
New Leads
Active
Booked
Active
Post Event
Active
Completed
Completed
Archived
Archived
Precedence Order: Active > Completed > Archived
Event Scenarios
Project Status
All events in Active stages (New Leads/Booked/Post Event)
Active
All events in Completed stage
Completed
All events in Archived stage
Archived
Mix: Active + Completed events
Active
Mix: Active + Archived events
Active
Mix: Completed + Archived events
Completed
4.8.2 Company Archive Logic
Scenario
Can Archive?
Behavior
Any client on Active project(s)
❌ Blocked
Blocking modal with clickable client/project list
All clients on Completed project(s) only
✅ Allowed
Confirmation modal → Archive
All clients on Archived project(s) only
✅ Allowed
Confirmation modal → Archive
Mix: Some clients on Active, others on Completed/Archived
❌ Blocked
Active takes precedence
All clients on mix of Completed + Archived
✅ Allowed
Confirmation modal → Archive
No associated clients
✅ Allowed
Confirmation modal → Archive
4.8.3 Archive Eligibility Check
System retrieves all clients associated with company_id
FOR each client:
System retrieves all projects for client
FOR each project:
Determine project_status using Project Status Logic (4.8.1)
IF project_status = "Active":
Add client and project to blocked_list
IF blocked_list.count > 0:
Return NOT_ALLOWED
Display blocking modal with blocked client and project list (clickable links)
ELSE:
Return ALLOWED
Display confirmation modal
4.8.4 Archive Implementation
System sets company.archived_at = current_timestamp
System sets company.archived_by = current_user_id
System sets company.status = "archived"
System logs activity "company_archived" with company_id and current_user_id
4.9 Unarchive Logic
- Archived companies can be manually unarchived
- Unarchiving restores the company to active status
- Associated clients remain in their current status (archived or active)
4.10 Impact on Other Modules
Module
Impact
Client Module
Clients can be associated/disassociated
Project Module
Projects shown through client associations
Reports
Company-level aggregations available
Search
Company searchable by name, industry
5. Field Details & Validations
5.1 Company Profile Display Fields
Field Name
Display Location
Notes
Logo/Avatar
Header
Image or industry icon
Company Name
Header
From creation
Badge
Header
"Company" label
Header / Details
Company contact email
Phone
Header / Details
With country code
Website
General Details
Clickable link
Industry
General Details
From dropdown + Other
Created Date
General Details
Auto-generated
5.2 Client Card Display
Field Name
Display
Notes
Avatar
Card
Client photo or initials
Name
Card
Full name
Date Added
Card
Association date
Actions
3-dot
Remove option
6. Success Message Handling
Action
Success Message
Display Type
Duration
Company edited
"Company updated successfully"
Toast notification
5 seconds
Company archived
"Company archived successfully"
Toast notification
5 seconds
Company unarchived
"Company restored successfully"
Toast notification
5 seconds
Client added
"Client added to company"
Toast notification
5 seconds
Client removed
"Client removed from company"
Toast notification
5 seconds
Note saved
"Note saved"
Toast notification
3 seconds
7. Error Message Handling
Error Type
Error Message
Display Type
Add client failed
"Unable to add client. Please try again"
Toast notification
Save failure
"Unable to save changes. Please try again"
Toast notification
Network error
"Connection error. Please refresh."
Toast notification
8. Confirmation & Blocking Modals
8.1 Archive Company - Blocking Modal
Title: Cannot Archive Company
Message: This company cannot be archived because [Client Name] (clickable link) is associated with active project(s): [Project 1, Project 2 and Project 3] (clickable links)
Hint Box (Yellow): ⚠️ Please complete or archive the associated projects before proceeding.
Button: Cancel
8.2 Archive Company - Confirmation Modal
Title: Archive Company?
Message: Are you sure you want to archive [Company Name]?
Primary Button: Archive
Secondary Button: Cancel
8.3 Delete Company - Confirmation Modal
Title: Delete Company?
Message: Are you sure you want to delete [Company Name]?
Primary Button: Delete _(Destructive/Red)
_Secondary Button: Cancel
8.4 Remove Client - Confirmation Modal
Title: Remove Client
Message: Are you sure you want to remove [Client Name] from this company?
Primary Button: Remove
Secondary Button: Cancel
9. Edge Cases
Edge Case ID
Scenario
Expected Behavior
Priority
EC-001
Company with 50+ clients
Paginated client list
Medium
EC-002
Client added who has existing company
Warning shown, proceed moves client
High
EC-003
All clients removed from company
Empty state displayed, company remains
Medium
EC-004
Company archived with clients
Clients remain in their current status
Medium
EC-005
Client deleted while viewing company
Client card removed from display
Medium
EC-006
Same project has multiple company clients
Project shown once with multiple client names
Medium
EC-007
Company has only Leads (no Booked Clients)
Client Worth shows $0 (Leads have no worth)
High
EC-008
Industry set to "Other"
"Other" field value displayed
Low
EC-009
Archive company with client on active project
Blocking modal with clickable client/project list
High
EC-010
Company with mix of active and archived client projects
Archive blocked (active takes precedence)
High
EC-011
Company with clients on completed projects only
Archive allowed
Medium
EC-012
Single client on multiple active projects
Blocking modal lists all active projects
High
EC-013
Client status changes during archive flow
Re-evaluate eligibility
Medium
10. Acceptance Criteria
10.1 Company Profile Display
AC ID
Criteria
AC-001
Company Profile shows Overview only (no tabs)
AC-002
Client Worth displays aggregated value from all clients
AC-003
Total Projects shows count from all associated clients
AC-004
General Details shows all company information
10.2 Client Management
AC ID
Criteria
AC-005
New clients can be added to company
AC-006
Existing clients can be associated with company
AC-007
Warning shown when adding client with existing company
AC-008
Clients can be removed from company
AC-009
Removing client does not delete client record
10.3 Projects Display
AC ID
Criteria
AC-010
Projects shown are derived from associated clients
AC-011
Active and Archived project tabs work correctly
AC-012
Project cards show associated client names
10.4 Archive Functionality
AC ID
Criteria
AC-013
Archive blocked for companies with clients on active projects
AC-014
Blocking modal shows clickable client and project list
AC-015
Archive allowed for companies with clients on completed/archived projects only
AC-016
Confirmation modal shown when archive is allowed
AC-017
Unarchive restores company to active status
11. Dependencies
Dependency ID
Module/Feature
Dependency Type
Description
DEP-001
Client Module
Data
Client associations
DEP-002
Project Module
Data
Projects through clients
DEP-003
Event Module
Data
Event pipeline stages
DEP-004
Master Data
Data
Industry dropdown
DEP-005
Activity Tracking
Data
Log entries
12. References
12.1 Figma Designs
Change Log
Version
Date
Author
Changes
1.0
December 16, 2025
-
Initial document
2.0
April 10, 2026
-
Added archive restrictions logic: Companies with clients on active projects cannot be archived. Companies with clients on completed/archived projects can be archived. Added blocking modal with clickable client/project links. Refined modal message format.
12. Edit Client
FRD #12: Edit Client
Document Version: 1.0 Created Date: December 16, 2025 Module: Edit Client Platform: Pixally CRM - Agency Portal
1. Module Overview
1.1 Purpose
This document defines the functional requirements for editing existing Client/Lead records in the Pixally CRM system. The Edit Client functionality allows agency users to update client information while preserving project associations and historical data.
1.2 Scope
This FRD covers:
- Edit Client modal interface
- Editable vs non-editable fields
- Validation rules for updates
- Impact on related records
- Edit permissions
1.3 Key Business Rules
Rule ID
Rule Description
BR-001
Client status (Lead/Booked Client) is NOT editable - determined by system logic
BR-002
Email change requires duplicate validation against existing records
BR-003
Company association can be changed or removed via edit
BR-004
Project associations are NOT managed through Edit Client
BR-005
Edit history is logged for audit purposes
BR-006
Archived clients cannot be edited (Figma will be updated per PM)
2. User Roles & Permissions
Role
Edit Client
Edit Lead
Edit Own Created
Edit Any
Agency Owner (AO)
✅
✅
✅
✅
Agency Admin
✅
✅
✅
✅
Account Manager (AR)
✅
✅
✅
✅
Team Member
✅
✅
✅
✅
Contractor
❌
❌
❌
❌
Client
❌
❌
❌
❌
3. User Flow
3.1 Access Points
Access Point
Navigation Path
Trigger
Client Listing
Clients → Row 3-dot menu → Edit
Click Edit
Client Profile
Client Profile → 3-dot menu → Edit
Click Edit
Client Profile
Client Profile → Quick Actions → Edit
Click Edit
Lead Listing
Leads Tab → Row 3-dot menu → Edit
Click Edit
Lead Profile
Lead Profile → Quick Actions → Edit
Click Edit
3.2 Open Edit Modal
User clicks "Edit" from any access point. System opens Edit Client modal. Modal pre-fills all fields with current client data. Full Name field is focused.
3.3 Edit Client Information
User modifies any editable field. System validates changes in real-time where applicable. User clicks "Save Changes" button. System validates all fields. System checks for duplicate email if email was changed. System saves updates to client record. System closes modal and refreshes display.
3.4 Editable Fields
User can modify:
- Full Name
- Email Address
- Phone Number (with country code)
- Company association
- Street Address
- Country
- State
- City
- Zip/Postal Code
- Internal Note
3.5 Non-Editable Elements
User cannot modify through Edit modal:
- Client ID (system-generated)
- Client Status (Lead/Booked Client) - system-controlled
- Created Date
- Project associations (managed in Project module)
- Portal access settings (managed separately)
3.6 Change Company Association
User clicks Company dropdown. System shows list of existing companies. User selects a new company. If company changed: Previous association removed, new association created. If the dropdown is left empty, the client automatically becomes unassociated.
3.7 Cancel Edit
User clicks "Cancel" or X button. If changes were made: System prompts "Discard changes?". User confirms: Modal closes without saving. User cancels: Returns to edit modal.
4. Functional Logic
- 4.1 Field Pre-Population
- System retrieves current client record. All editable fields populated with current values. Company dropdown shows current association selected. Country and State are pre-populated as text fields with current values.
- 4.2 Email Change Validation
- When email field is changed and new_email differs from original_email: System checks for duplicate by querying clients where email equals new_email AND id does not equal current_client_id. If duplicate found: System displays error "A client with this email already exists" and blocks save.
- 4.3 Address Field Logic
- All address fields (Country, State, City, Street, Zip/Postal Code) are free-text input fields allowing manual entry. No validation is performed against predefined lists. No cascading or dependent behavior exists between address fields — changing Country does not clear or affect the State field.
4.4 Save Operation
System validates all mandatory fields. System validates email format. System checks for duplicate email (if changed). System updates client record with new values. System logs edit activity with: User ID, Timestamp, Changed fields, Old values, New values. System triggers any relevant notifications/webhooks.
4.5 Company Change Logic
Scenario
Behavior
No company → Company selected
Create association
Company A → Company B
Remove A association, create B association
Company → No Company
Remove association
Same company
No change
4.6 Impact on Other Modules
Module
Impact
Project Module
Updated client info reflected in project views
Communications
New email used for future communications
Client Portal
Updated info shown in portal
Financial
Updated info on invoices (if applicable)
Activity Log
Edit logged as activity
5. Field Details & Validations
5.1 Edit Client Fields
Field Name
Field Type
Mandatory
Max Length
Validation Rules
Pre-filled
Full Name
Text Input
Yes
100 chars
Min 2 characters
Yes
Email Address
Email Input
Yes
255 chars
Valid format, unique
Yes
Phone Number
Phone Input
Yes
20 chars
7-15 digits
Yes
Country Code
Text Input
Yes
N/A
Valid code
Yes
Company
Dropdown
No
N/A
Existing companies
Yes (if any)
Street Address
Text Input
No
255 chars
Alphanumeric + special
Yes (if any)
Country
Text Input
No
N/A
Valid country
Yes (if any)
State
Text Input
No
N/A
Valid for country
Yes (if any)
City
Text Input
No
100 chars
Alphanumeric
Yes (if any)
Zip/Postal Code
Text Input
No
20 chars
Alphanumeric
Yes (if any)
Internal Note
Textarea
No
1000 chars
Free text
Yes (if any)
6. Success Message Handling
Action
Success Message
Display Type
Duration
Client updated
"Client updated successfully"
Toast notification
5 seconds
Lead updated
"Lead updated successfully"
Toast notification
5 seconds
7. Error Message Handling
7.1 Validation Errors
Field
Error Condition
Error Message
Full Name
Empty
"Full name is required"
Full Name
< 2 chars
"Full name must be at least 2 characters"
Empty
"Email address is required"
Invalid format
"Please enter a valid email address"
Duplicate
"A client with this email already exists"
Phone
Empty
"Phone number is required"
Phone
Invalid
"Please enter a valid phone number"
7.2 System Errors
Error Type
Error Message
Display Type
Save failed
"Unable to save changes. Please try again"
Toast notification
Record locked
"This client is being edited by another user"
Toast notification
Permission denied
"You don't have permission to edit this client"
Toast notification
8. Edge Cases
Edge Case ID
Scenario
Expected Behavior
Priority
EC-001
Edit archived client
Edit not available (per PM confirmation)
High
EC-002
Email changed to archived client's email
Allow - archived emails available
Medium
EC-003
Company deleted while editing
Error on save, prompt to refresh
Medium
EC-004
Country changed, State was selected
State dropdown resets
High
EC-005
Two users edit same client simultaneously
Last save wins (optimistic locking)
Medium
EC-006
Network disconnect during save
Retry prompt, data preserved in form
High
EC-007
Special characters in name (é, ñ, 中文)
Accepted and saved correctly
Medium
EC-008
Remove all optional fields
Client saved with only mandatory fields
Low
EC-009
Client converted to Booked during edit
Edit completes, status updated separately
Low
9. Acceptance Criteria
9.1 Edit Modal
AC ID
Criteria
AC-001
Edit modal accessible from listing 3-dot menu
AC-002
Edit modal accessible from profile 3-dot menu
AC-003
Edit modal accessible from Quick Actions
AC-004
All fields pre-filled with current values
9.2 Field Editing
AC ID
Criteria
AC-005
Full Name can be updated
AC-006
Email can be updated with duplicate check
AC-007
Phone number can be updated
AC-008
Company association can be changed
AC-009
Address fields can be updated
AC-010
Internal Note can be updated
9.3 Save and Cancel
AC ID
Criteria
AC-011
Save validates all mandatory fields
AC-012
Success message displays on save
AC-013
Cancel prompts if changes were made
AC-014
Edit history is logged
10. Test Cases
Manual test cases are provided in the accompanying Excel file: FRD_12_Edit_Client_Test_Cases.xlsx
Test case categories include:
- Modal access and display
- Field editing
- Validation rules
- Company association changes
- Error handling
11. Dependencies
Dependency ID
Module/Feature
Dependency Type
Description
DEP-001
Client Module
Data
Client record retrieval
DEP-002
Company Module
Data
Company list for association
DEP-003
Master Data
Data
Countries, States
DEP-004
Activity Log
Functional
Edit logging
12. References
12.1 Figma Designs: Figma
13. Edit Company
FRD #13: Edit Company
Document Version: 1.0 Created Date: December 16, 2025 Module: Edit Company Platform: Pixally CRM - Agency Portal
1. Module Overview
1.1 Purpose
This document defines the functional requirements for editing existing Company records in the Pixally CRM system. The Edit Company functionality allows agency users to update company information while preserving client associations.
1.2 Scope
This FRD covers:
- Edit Company modal interface
- Editable fields and validations
- Industry dropdown with "Other" handling
- Impact on associated clients
1.3 Key Business Rules
Rule ID
Rule Description
BR-001
Company email change requires duplicate validation
BR-002
Editing company does NOT affect associated clients
BR-003
Client associations are managed separately (not in Edit modal)
BR-004
"Other" industry requires specification text
BR-005
Edit history is logged for audit purposes
2. User Roles & Permissions
Role
Edit Company
Edit Any Company
Agency Owner (AO)
✅
✅
Agency Admin
✅
✅
Account Manager (AR)
✅
✅
Team Member
✅
✅
Contractor
❌
❌
Client
❌
❌
3. User Flow
3.1 Access Points
Access Point
Navigation Path
Company Listing
Companies Tab → Row 3-dot menu → Edit
Company Profile
Company Profile → 3-dot menu → Edit
Company Profile
Company Profile → Quick Actions → Edit
3.2 Open Edit Modal
User clicks "Edit" from any access point. System opens Edit Company modal. Modal pre-fills all fields with current company data. Company Name field is focused.
3.3 Edit Company Information
User modifies any editable field. If Industry changed to "Other", specify field appears. If Industry changed from "Other", specify field hides. User clicks "Save Changes" button. System validates and saves updates.
3.4 Editable Fields
User can modify:
- Company Name
- Industry
- Other Industry (if Industry = Other)
- Email Address
- Phone Number
- Website
- Street Address, Country, State, City, Zip
- Internal Note
4. Functional Logic
4.1 Industry Change Handling
When industry dropdown value is changed: If new value equals "Other": System shows other_industry text field and sets other_industry as mandatory. If new value does not equal "Other": System hides other_industry text field and clears other_industry value.
4.2 Validation Rules
Company Name: Required, min 2 chars, max 150 chars. Industry: Required selection. Other Industry: Required if Industry = Other. Email: Valid format if provided, unique check if changed. Phone: Valid format if provided. Website: Valid URL format if provided.
4.3 Impact on Related Data
Editing company does NOT affect:
- Associated clients
- Client project associations
- Client financial data
- Client portal access
5. Field Details & Validations
Field Name
Field Type
Mandatory
Max Length
Validation
Company Name
Text
Yes
150 chars
Min 2 chars
Industry
Dropdown
Yes
N/A
Valid selection
Other Industry
Text
Conditional
100 chars
Required if Other
No
255 chars
Valid format, unique
Phone
Phone
No
20 chars
Valid format
Website
URL
No
500 chars
Valid URL
Street Address
Text
No
255 chars
-
Country
Text Input
No
N/A
Valid country
State
Text Input
No
N/A
Valid for country
City
Text
No
100 chars
-
Zip/Postal Code
Text
No
20 chars
-
Internal Note
Textarea
No
1000 chars
-
6. Success Message Handling
Action
Success Message
Display Type
Duration
Company updated
"Company updated successfully"
Toast notification
5 seconds
7. Error Message Handling
Field
Error Condition
Error Message
Company Name
Empty
"Company name is required"
Industry
Not selected
"Please select an industry"
Other Industry
Empty when Other
"Please specify the industry"
Invalid format
"Please enter a valid email address"
Duplicate
"A company with this email already exists"
Website
Invalid URL
"Please enter a valid URL"
8. Edge Cases
Edge Case ID
Scenario
Expected Behavior
Priority
EC-001
Industry changed from Other to specific
Other field hidden, value cleared
Medium
EC-002
Company email same as client email
Allowed (separate namespaces)
Low
EC-003
Country changed, State was selected
State resets
Medium
9. Acceptance Criteria
AC ID
Criteria
AC-001
Edit modal accessible from listing and profile
AC-002
All fields pre-filled with current values
AC-003
Industry "Other" shows/hides specify field correctly
AC-004
Validation errors display appropriately
AC-005
Successful save updates company record
AC-006
Associated clients unaffected by edit
10. Test Cases
Manual test cases are provided in the accompanying Excel file: FRD_13_Edit_Company_Test_Cases.xlsx
11. Dependencies
Dependency ID
Module/Feature
Dependency Type
Description
DEP-001
Company Module
Data
Company record
DEP-002
Master Data
Data
Industries, Countries, States
12. References
12.1 Figma Designs: Figma
14. Client Delete
FRD #14: Client Delete
Document Version: 2.0
Created Date: December 16, 2025
Last Updated: April 10, 2026
Module: Client Delete
Platform: Pixally CRM - Agency Portal
1. Module Overview
1.1 Purpose
This document defines the functional requirements for deleting Client/Lead records from the Pixally CRM system. The Delete Client functionality implements soft deletion with specific rules to protect data integrity and prevent accidental data loss.
1.2 Scope
This FRD covers:
- Delete confirmation flow
- Deletion restrictions based on project associations
- Project status determination logic
- Primary client handling
- Soft delete behavior
- Impact on related records
1.3 Key Business Rules
Rule ID
Rule Description
BR-001
Client deletion is a soft delete (data retained, marked as deleted)
BR-002
Client attached to active or completed projects cannot be deleted
BR-003
Client attached to archived projects only can be deleted (with warning)
BR-004
Client must be removed from active/completed projects before deletion is allowed
BR-005
Primary client on active/completed projects cannot be deleted - user must change primary first
BR-006
Primary client on archived projects only can be deleted directly
BR-007
If client is the only client on an active/completed project, user must add another client before removing
BR-008
Deleting client removes portal access immediately
BR-009
Client data (communications, payments, files, notes) is preserved after deletion
BR-010
Deleted clients do NOT appear in listings or search
BR-011
Project status is determined by the collective status of all events within the project
2. User Roles & Permissions
Role
Delete Client
Delete Lead
Delete Primary Client (on active/completed)
Agency Owner (AO)
✅
✅
❌ (must change primary first)
Agency Admin
✅
✅
❌ (must change primary first)
Account Manager (AR)
✅
✅
❌ (must change primary first)
Team Member
✅
✅
❌
Contractor
❌
❌
❌
Client
❌
❌
❌
Note: Primary client deletion is blocked only for active/completed projects. Primary clients on archived projects only can be deleted directly.
3. User Flow
3.1 Access Points
Access Point
Navigation Path
Client Listing
Clients → Row 3-dot menu → Delete
Client Profile
Profile → 3-dot menu → Delete
Client Profile
Profile → Quick Actions → Delete
Lead Listing
Leads Tab → Row 3-dot menu → Delete
3.2 Delete - No Project Associations
- User clicks "Delete" on a client with no project associations
- System displays simple confirmation modal
- User clicks "Delete" to confirm
- System soft-deletes client record
- System displays success message
- Client removed from listing
3.3 Delete - Active/Completed Project Association Block
- User clicks "Delete" on client attached to active or completed project(s)
- System displays blocking modal with clickable project list
- Only "Cancel" button available (no delete option)
3.4 Delete - Archived Projects Only (Warning)
- User clicks "Delete" on client attached to archived project(s) only
- System displays warning modal
- User clicks "Delete" to confirm or "Cancel" to abort
- System soft-deletes client record
- Success message displayed
3.5 Delete - Primary Client on Active/Completed Project Block
- User clicks "Delete" on a primary client (on active/completed project)
- System displays blocking modal with clickable project list
- Only "Cancel" button available
3.6 Delete - Only Client on Active/Completed Project Block
- User clicks "Delete" on a client who is the only client on an active/completed project
- System displays blocking modal with clickable project list
- Only "Cancel" button available
3.7 Removal Flow - Client on Active/Completed Project
To delete a client who is associated with active/completed projects, the user must follow these steps:
If client is NOT the primary:
- Navigate to Project → Clients section
- Remove client from project using 3-dot menu → Remove
- Repeat for all associated active/completed projects
- Once client has no active/completed project associations, delete is allowed
If client IS the primary (and other clients exist):
- Navigate to Project → Clients section
- Change primary client to another client
- Remove the original client from project
- Repeat for all associated active/completed projects
- Once client has no active/completed project associations, delete is allowed
If client is the ONLY client on project:
- Navigate to Project → Clients section
- Add another client to the project
- Change primary to the new client
- Remove the original client from project
- Repeat for all associated active/completed projects
- Once client has no active/completed project associations, delete is allowed
4. Project Status Logic
4.1 Pipeline Stage to Project Status Mapping
Project status is determined based on the pipeline stages of events within the project:
Pipeline Stage
Maps To
New Leads
Active
Booked
Active
Post Event
Active
Completed
Completed
Archived
Archived
4.2 Project Status Determination
A single project can have multiple events. The overall project status is determined by evaluating the collective status of ALL events within that project.
Precedence Order: Active > Completed > Archived
Event Scenarios
Project Status
Reason
All events in Active stages (New Leads/Booked/Post Event)
Active
All events are active
All events in Completed stage
Completed
All events are completed
All events in Archived stage
Archived
All events are archived
Mix: Active + Completed events
Active
Active takes precedence
Mix: Active + Archived events
Active
Active takes precedence
Mix: Completed + Archived events
Completed
Completed takes precedence over Archived
Mix: Active + Completed + Archived events
Active
Active takes precedence
4.3 Project Status Check Logic
FOR each event in project:
IF event.pipeline_stage IN ["New Leads", "Booked", "Post Event"]:
has_active_event = TRUE
ELSE IF event.pipeline_stage = "Completed":
has_completed_event = TRUE
ELSE IF event.pipeline_stage = "Archived":
has_archived_event = TRUE
IF has_active_event:
project_status = "Active"
ELSE IF has_completed_event:
project_status = "Completed"
ELSE IF has_archived_event:
project_status = "Archived"
4.4 Examples
Example 1: Project with 3 events
- Event A: Booked (Active)
- Event B: Completed
- Event C: Archived
Result: Project Status = Active (because Event A is in an active stage)
Example 2: Project with 2 events
- Event A: Completed
- Event B: Archived
Result: Project Status = Completed (Completed takes precedence over Archived)
Example 3: Project with 2 events
- Event A: Archived
- Event B: Archived
Result: Project Status = Archived (All events are archived)
5. Functional Logic
5.1 Client Delete Logic
Scenario
Allowed?
Behavior
No project associations
✅ Yes
Simple confirmation → Delete
Attached to active project(s)
❌ Blocked
Must remove client from projects first
Attached to completed project(s)
❌ Blocked
Must remove client from projects first
Attached to archived project(s) only
✅ Yes (with warning)
Warning shown → Data preserved → Delete
Is primary client on active/completed project
❌ Blocked
Must change primary first
Is primary client on archived project only
✅ Yes
Can delete directly
Is only client on active/completed project
❌ Blocked
Must add another client first
Is only client on archived project only
✅ Yes
Can delete directly
5.2 Deletion Eligibility Check
System retrieves all projects associated with client_id
FOR each project:
Determine project_status using Project Status Logic (Section 4)
IF project_status = "Active" OR project_status = "Completed":
Add to blocked_projects list
ELSE IF project_status = "Archived":
Add to archived_projects list
IF blocked_projects.count > 0:
IF client.is_primary = TRUE for any blocked project:
Return NOT_ALLOWED with reason "is_primary_client_on_active_completed"
Include project name(s)
IF client is ONLY client on any blocked project:
Return NOT_ALLOWED with reason "only_client_on_active_completed_project"
Include project name(s)
Return NOT_ALLOWED with reason "associated_with_active_completed_projects"
Include list of blocked project names
IF archived_projects.count > 0:
Return ALLOWED_WITH_WARNING
ELSE:
Return ALLOWED
5.3 Soft Delete Implementation
System sets client.deleted_at = current_timestamp
System sets client.deleted_by = current_user_id
System sets client.status = "deleted"
System revokes portal access for client_id
System removes client from search index
System logs activity "client_deleted" with client_id and current_user_id
System preserves all historical data (communications, payments, files, notes remain linked but hidden)
5.4 Portal Access Revocation
Upon deletion:
- Client's portal access tokens are invalidated
- Magic links become non-functional
- Client cannot log into portal
- Portal shows "Account no longer active" if attempted
5.5 Data Preservation
Deleted client data preserved includes:
- Communication history (emails)
- Payment records
- Files and documents
- Notes
- Meeting history
- Activity logs
- Historical project associations (for reporting purposes)
5.6 Impact on Other Modules
Module
Impact
Client Listing
Client removed from all listings
Search
Client not returned in search results
Projects
Client shown as "(Deleted)" in project history
Communications
History preserved, client name shown with "(Deleted)"
Payments
Invoice records preserved with deleted client reference
Files
All files preserved and accessible in project context
Reports
Historical data included, current counts exclude deleted
6. Field Details & Validations
6.1 Deletion Record Fields
Field Name
Type
Description
deleted_at
Timestamp
When deletion occurred
deleted_by
User ID
Who performed deletion
deletion_reason
Text
Optional reason (future feature)
7. Success Message Handling
Action
Success Message
Display Type
Duration
Client deleted
"Client deleted successfully"
Toast notification
5 seconds
Lead deleted
"Lead deleted successfully"
Toast notification
5 seconds
8. Error Message Handling
Error Type
Error Message
Display Type
Delete failed
"Unable to delete client. Please try again"
Toast notification
Permission denied
"You don't have permission to delete this client"
Toast notification
9. Confirmation & Blocking Modals
9.1 Delete Client - Blocking Modal (Active/Completed Projects)
Title: Cannot Delete Client
Message: This client is associated with active or completed project(s) and cannot be deleted: [Project 1, Project 2 and Project 3] (clickable links)
Hint Box (Yellow): ⚠️ Please remove the client from the associated projects before proceeding.
Button: Cancel
9.2 Delete Client - Blocking Modal (Primary Client)
Title: Cannot Delete Client
Message: This client is the primary contact on active or completed project(s) and cannot be deleted: [Project 1, Project 2 and Project 3] (clickable links)
Hint Box (Yellow): ⚠️ Please assign another client as primary before proceeding.
Button: Cancel
9.3 Delete Client - Blocking Modal (Only Client on Project)
Title: Cannot Delete Client
Message: This client is the only client on project(s) and cannot be deleted: [Project 1, Project 2 and Project 3] (clickable links)
Hint Box (Yellow): ⚠️ Please add another client to the project before proceeding.
Button: Cancel
9.4 Delete Client - Warning Modal (Archived Projects Only)
Title: Delete Client?
Message: This client has associated records. All related data including payments, files, and history will be preserved. Are you sure you want to delete [Client Name]?
Primary Button: Delete
Secondary Button: Cancel
9.5 Delete Client - Confirmation Modal (No Projects)
Title: Delete Client?
Message: Are you sure you want to delete [Client Name]?
Primary Button: Delete
Secondary Button: Cancel
10. Edge Cases
Edge Case ID
Scenario
Expected Behavior
Priority
EC-001
Delete client being viewed by another user
Deletion proceeds; other user sees "Client not found" on refresh
Medium
EC-002
Delete client mid-email-compose
Email send fails; error "Recipient no longer exists"
Medium
EC-003
Client has pending payment
Blocking - treat as active financial activity
High
EC-004
Delete and immediately search
Client not in search results
High
EC-005
Attempt restore after delete
Not available in current version (soft delete exists for potential future restore)
Low
EC-006
Client on 10+ projects
Blocking/warning modal shows scrollable project list
Low
EC-007
Network failure during delete
Retry prompt; no partial deletion
High
EC-008
Client is primary on multiple active/completed projects
Must change primary on ALL active/completed projects before deletion
High
EC-009
Client removed from project during delete attempt
Delete eligibility re-checked; may now succeed
Medium
EC-010
Client on both active AND archived projects
Blocked - active project takes precedence
High
EC-011
Primary client on archived project only
Allowed - can delete directly
Medium
EC-012
Only client on archived project
Allowed - can delete directly
Medium
EC-013
Project has mix of active and completed events
Project treated as Active; client deletion blocked
High
EC-014
Event status changes during delete flow
Re-evaluate project status; eligibility may change
Medium
EC-015
Project with single archived event
Project is Archived; client can be deleted with warning
Medium
11. Acceptance Criteria
11.1 Delete Flow
AC ID
Criteria
AC-001
Delete option accessible from listing 3-dot menu
AC-002
Delete option accessible from profile
AC-003
Confirmation dialog shown before deletion
AC-004
Success message displayed after deletion
11.2 Restrictions
AC ID
Criteria
AC-005
Client with active/completed project association cannot be deleted
AC-006
Client with archived project association only can be deleted with warning
AC-007
Primary client on active/completed project cannot be deleted
AC-008
Primary client on archived project only can be deleted
AC-009
Only client on active/completed project cannot be deleted
AC-010
Appropriate blocking modal shown for restricted cases
AC-011
Project list shown in blocking/warning modals as clickable links
11.3 Project Status Logic
AC ID
Criteria
AC-012
Project status correctly determined based on all events
AC-013
Active events take precedence over completed/archived
AC-014
Completed events take precedence over archived
AC-015
Project with all archived events allows client deletion
11.4 Post-Deletion
AC ID
Criteria
AC-016
Client removed from listings
AC-017
Client not returned in search
AC-018
Portal access revoked
AC-019
Historical data (payments, files, notes) preserved
12. Dependencies
Dependency ID
Module/Feature
Dependency Type
Description
DEP-001
Project Module
Data
Project and event status check
DEP-002
Event Module
Data
Event pipeline stage for status determination
DEP-003
Client Portal
Functional
Access revocation
DEP-004
Search Service
Functional
Index removal
DEP-005
Activity Log
Functional
Deletion logging
13. References
13.1 Figma Designs
Change Log
Version
Date
Author
Changes
1.0
December 16, 2025
-
Initial version
2.0
April 10, 2026
-
Updated deletion logic: Clients on active/completed projects cannot be deleted. Clients on archived projects only can be deleted with warning. Primary client and only client restrictions apply only to active/completed projects. Added Project Status Logic section with pipeline stage mapping and event-based status determination. All data (payments, files, records) preserved after deletion. Refined modal message format with clickable project links and hint boxes.
15. Company Delete
FRD #15: Company Delete
Document Version: 2.0
Created Date: December 16, 2025
Last Updated: April 10, 2026
Module: Company Delete
Platform: Pixally CRM - Agency Portal
1. Module Overview
1.1 Purpose
This document defines the functional requirements for deleting Company records from the Pixally CRM system. The Delete Company functionality implements soft deletion with specific rules to protect data integrity, particularly regarding associated client relationships.
1.2 Scope
This FRD covers:
- Delete confirmation flow
- Deletion restrictions based on client-project associations
- Project status determination logic
- Warning messages for client disassociation
- Soft delete behavior
- Impact on associated clients
1.3 Key Business Rules
Rule ID
Rule Description
BR-001
Company deletion is a soft delete (data retained, marked as deleted)
BR-002
Company cannot be deleted if any associated client is attached to active or completed projects
BR-003
Company can be deleted if clients are attached to archived projects only (with warning)
BR-004
Deleting company does NOT cascade delete associated clients
BR-005
Associated clients (with no active/completed project associations) become "No Company" after company deletion
BR-006
Company data (notes, history, payments, files) is preserved after deletion
BR-007
Having clients associated with a company is not mandatory
BR-008
Project status is determined by the collective status of all events within the project
2. User Roles & Permissions
Role
Delete Company
Agency Owner (AO)
✅
Agency Admin
✅
Account Manager (AR)
✅
Team Member
✅
Contractor
❌
Client
❌
3. User Flow
3.1 Access Points
Access Point
Navigation Path
Company Listing
Companies Tab → Row 3-dot menu → Delete
Company Profile
Profile → 3-dot menu → Delete
Company Profile
Profile → Quick Actions → Delete
3.2 Delete - No Associated Clients
- User clicks "Delete" on company with no associated clients
- System displays simple confirmation modal
- User clicks "Delete" to confirm
- System soft-deletes company record
- Success message displayed
- Company removed from listing
3.3 Delete - Clients with Active/Completed Projects (Blocked)
- User clicks "Delete" on company where any associated client has active or completed project associations
- System displays blocking modal with clickable client/project list
- Only "Cancel" button available
3.4 Delete - Clients with Archived Projects Only (Warning)
- User clicks "Delete" on company where clients are attached to archived projects only
- System displays warning modal
- User clicks "Delete" to confirm or "Cancel" to abort
- System soft-deletes company record
- Associated clients become "No Company"
- Success message displayed
3.5 Delete - Clients with No Project Associations (Warning)
- User clicks "Delete" on company with clients (none attached to any projects)
- System displays warning modal
- User clicks "Delete" or "Cancel"
- Associated clients become "No Company"
3.6 Alternative: Disassociate Clients First
User can disassociate all clients from the company before deletion:
- Navigate to Company Profile → Clients Section
- For each client with active/completed project associations:
- Click 3-dot menu → Disassociate from Company
- Client becomes "No Company" but remains on their projects
- After all clients with active/completed projects are disassociated, delete proceeds with warning (if other clients remain) or simple confirmation (if no clients remain)
4. Project Status Logic
4.1 Pipeline Stage to Project Status Mapping
Project status is determined based on the pipeline stages of events within the project:
Pipeline Stage
Maps To
New Leads
Active
Booked
Active
Post Event
Active
Completed
Completed
Archived
Archived
4.2 Project Status Determination
A single project can have multiple events. The overall project status is determined by evaluating the collective status of ALL events within that project.
Precedence Order: Active > Completed > Archived
Event Scenarios
Project Status
Reason
All events in Active stages (New Leads/Booked/Post Event)
Active
All events are active
All events in Completed stage
Completed
All events are completed
All events in Archived stage
Archived
All events are archived
Mix: Active + Completed events
Active
Active takes precedence
Mix: Active + Archived events
Active
Active takes precedence
Mix: Completed + Archived events
Completed
Completed takes precedence over Archived
Mix: Active + Completed + Archived events
Active
Active takes precedence
4.3 Project Status Check Logic
FOR each event in project:
IF event.pipeline_stage IN ["New Leads", "Booked", "Post Event"]:
has_active_event = TRUE
ELSE IF event.pipeline_stage = "Completed":
has_completed_event = TRUE
ELSE IF event.pipeline_stage = "Archived":
has_archived_event = TRUE
IF has_active_event:
project_status = "Active"
ELSE IF has_completed_event:
project_status = "Completed"
ELSE IF has_archived_event:
project_status = "Archived"
4.4 Examples
Example 1: Project with 3 events
- Event A: Booked (Active)
- Event B: Completed
- Event C: Archived
Result: Project Status = Active (because Event A is in an active stage)
Example 2: Project with 2 events
- Event A: Completed
- Event B: Archived
Result: Project Status = Completed (Completed takes precedence over Archived)
Example 3: Project with 2 events
- Event A: Archived
- Event B: Archived
Result: Project Status = Archived (All events are archived)
5. Functional Logic
5.1 Company Delete Logic
Scenario
Allowed?
Behavior
No associated clients
✅ Yes
Simple confirmation → Delete
Clients on active projects
❌ Blocked
Must disassociate clients from company first
Clients on completed projects
❌ Blocked
Must disassociate clients from company first
Clients on archived projects only
✅ Yes (with warning)
Warning shown → Data preserved → Delete
Clients with no project associations
✅ Yes (with warning)
Warning shown → Clients become "No Company" → Delete
5.2 Deletion Eligibility Check
System retrieves all clients associated with company_id
FOR each client:
System retrieves all projects for client
FOR each project:
Determine project_status using Project Status Logic (Section 4)
IF project_status = "Active" OR project_status = "Completed":
Add client and project to blocked_clients list
ELSE IF project_status = "Archived":
Add client to archived_clients list
IF blocked_clients.count > 0:
Return NOT_ALLOWED with reason "clients_on_active_completed_projects"
Include blocked_clients list with their project names
IF archived_clients.count > 0 OR clients_with_no_projects.count > 0:
Return ALLOWED_WITH_WARNING
Include clients list
ELSE:
Return ALLOWED
5.3 Soft Delete Implementation
IF deletion ALLOWED or ALLOWED_WITH_WARNING:
FOR each client associated with company_id:
System sets client.company_id = NULL (disassociates client)
System sets company.deleted_at = current_timestamp
System sets company.deleted_by = current_user_id
System sets company.status = "deleted"
System removes company from search index
System logs activity "company_deleted" with company_id and current_user_id
System preserves all historical data (payments, files, notes remain linked)
5.4 Client Disassociation on Delete
When company is deleted:
- All associated clients have company_id set to NULL
- Clients appear as "No Company" or "---" in listing
- Client records remain fully intact
- Client projects unaffected
- No notification sent to clients
5.5 Data Preservation
Deleted company data preserved includes:
- Payment records
- Files and documents
- Notes
- Activity logs
- Historical client associations (for reporting purposes)
5.6 Impact on Other Modules
Module
Impact
Company Listing
Company removed from listing
Client Listing
Affected clients show "---" or "No Company"
Client Profile
Company section shows "No company associated"
Search
Company not returned in search
Payments
Invoice records preserved with deleted company reference
Files
All files preserved and accessible
Reports
Historical data preserved; current counts exclude deleted
6. Field Details & Validations
6.1 Deletion Record Fields
Field Name
Type
Description
deleted_at
Timestamp
When deletion occurred
deleted_by
User ID
Who performed deletion
7. Success Message Handling
Action
Success Message
Display Type
Duration
Company deleted
"Company deleted successfully"
Toast notification
5 seconds
8. Error Message Handling
Error Type
Error Message
Display Type
Delete failed
"Unable to delete company. Please try again"
Toast notification
Permission denied
"You don't have permission to delete this company"
Toast notification
9. Confirmation & Blocking Modals
9.1 Delete Company - Blocking Modal (Clients on Active/Completed Projects)
Title: Cannot Delete Company
Message: This company cannot be deleted because [Client Name] (clickable link) is associated with active or completed project(s): [Project 1, Project 2 and Project 3] (clickable links)
Hint Box (Yellow): ⚠️ Please disassociate the clients from this company before proceeding.
Button: Cancel
9.2 Delete Company - Warning Modal (Clients on Archived Projects Only)
Title: Delete Company?
Message: This company has associated records. All related data including payments, files, and history will be preserved. Are you sure you want to delete [Company Name]?
Primary Button: Delete
Secondary Button: Cancel
9.3 Delete Company - Warning Modal (Clients with No Projects)
Title: Delete Company?
Message: This company has associated records. All related data including payments, files, and history will be preserved. Are you sure you want to delete [Company Name]?
Primary Button: Delete
Secondary Button: Cancel
9.4 Delete Company - Confirmation Modal (No Clients)
Title: Delete Company?
Message: Are you sure you want to delete [Company Name]?
Primary Button: Delete
Secondary Button: Cancel
10. Edge Cases
Edge Case ID
Scenario
Expected Behavior
Priority
EC-001
Company has 50+ clients
Warning/blocking modal shows scrollable client list
Low
EC-002
Client added to company during delete process
Delete fails; prompt to retry
Medium
EC-003
Company viewed by user while being deleted
Viewer sees "Company not found" on refresh
Medium
EC-004
Same company name exists after deletion
Allowed - deleted names can be reused
Low
EC-005
Network failure during delete
Retry prompt; ensure no partial deletion
High
EC-006
Client added to active project during company delete
Re-check eligibility; may now be blocked
High
EC-007
All clients manually disassociated before delete
Simple confirmation (no warning needed)
Low
EC-008
Company has clients on both active AND archived projects
Blocked - active project takes precedence
High
EC-009
Company has mix of clients: some on archived, some with no projects
Allowed with warning
Medium
EC-010
Project has mix of active and completed events
Project treated as Active; company deletion blocked
High
EC-011
Event status changes during delete flow
Re-evaluate project status; eligibility may change
Medium
EC-012
Client's project with single archived event
Project is Archived; does not block company deletion
Medium
11. Acceptance Criteria
11.1 Delete Flow
AC ID
Criteria
AC-001
Delete option accessible from listing 3-dot menu
AC-002
Delete option accessible from profile
AC-003
Confirmation dialog shown before deletion
AC-004
Success message displayed after deletion
11.2 Restrictions
AC ID
Criteria
AC-005
Company with clients on active/completed projects cannot be deleted
AC-006
Company with clients on archived projects only can be deleted with warning
AC-007
Blocking modal shows clickable client and project list
AC-008
Warning modal shows for companies with clients (no active/completed projects)
11.3 Project Status Logic
AC ID
Criteria
AC-009
Project status correctly determined based on all events
AC-010
Active events take precedence over completed/archived
AC-011
Completed events take precedence over archived
AC-012
Project with all archived events does not block company deletion
11.4 Post-Deletion
AC ID
Criteria
AC-013
Company removed from listings
AC-014
Company not returned in search
AC-015
Associated clients become "No Company"
AC-016
Associated clients are NOT deleted
AC-017
Historical data (payments, files, notes) preserved
12. Dependencies
Dependency ID
Module/Feature
Dependency Type
Description
DEP-001
Client Module
Data
Client associations
DEP-002
Project Module
Data
Project and event status check
DEP-003
Event Module
Data
Event pipeline stage for status determination
DEP-004
Search Service
Functional
Index removal
DEP-005
Activity Log
Functional
Deletion logging
13. References
13.1 Figma Designs
Change Log
Version
Date
Author
Changes
1.0
December 16, 2025
-
Initial version
2.0
April 10, 2026
-
Updated deletion logic: Company cannot be deleted if clients are on active/completed projects. Company can be deleted if clients are on archived projects only (with warning). Added Project Status Logic section with pipeline stage mapping and event-based status determination. All data (payments, files, records) preserved after deletion. Refined modal message format with clickable links and hint boxes.
No tickets linked — generate test cases directly from this FRD instead.