## Understanding Expenses in Alpha Insights

Expenses in Alpha Insights are business costs that aren't directly tied to individual products or orders - like rent, salaries, software subscriptions, and operational expenses. The expense management system helps you track all business costs to calculate true net profit and understand your complete financial picture.

### Why Track Expenses?

Without expense tracking: You only see gross profit (revenue minus product costs, shipping, and payment fees)

With expense tracking: You see net profit (true profitability after ALL business expenses)

Example Profit Calculation:

    Revenue:           $50,000
    Product Costs:     -$20,000
    Shipping Costs:    -$3,000
    Payment Fees:      -$1,500
                       --------
    Gross Profit:      $25,500 (51% margin)

    Rent:             -$2,000
    Salaries:         -$8,000
    Software:         -$500
    Marketing:        -$3,000
    Other Expenses:   -$1,000
                       --------
    Net Profit:        $11,000 (22% margin)

### How Expenses Work in Alpha Insights

The expense system is built on a custom post type with rich metadata and taxonomies:

- One-Time Expenses: Single occurrence costs assigned to a specific date
- Recurring Expenses: Automatically calculated expenses that repeat on a schedule
- Paid vs Unpaid: Track which expenses have been paid and which are outstanding
- Multi-Currency: Expenses in any currency are automatically converted to your store currency
- Categories: Hierarchical taxonomy for organizing expenses (with parent/child relationships)
- Suppliers: Track which suppliers expenses are paid to (shared with products)

### Types of Expenses

### Operating Expenses

What they are: Day-to-day costs of running your business

Examples:

- Office or warehouse rent
- Utilities (electricity, water, internet)
- Insurance (business liability, property)
- Office supplies
- Equipment maintenance

### Software and Services

What they are: Technology and service subscriptions

Examples:

- WooCommerce hosting
- Email marketing software (Klaviyo, Mailchimp)
- Accounting software (QuickBooks, Xero)
- Other WooCommerce plugins
- Photography and design tools

### Personnel Costs

What they are: Employee and contractor payments

Examples:

- Employee salaries
- Contractor fees
- Payroll taxes
- Health insurance
- Freelancer payments (designers, developers)

### Marketing and Advertising (Non-Ad Platforms)

What they are: Marketing costs not tracked by Facebook/Google integrations

Examples:

- Influencer payments
- Affiliate commissions
- Email marketing costs
- Content creation
- Print advertising
- Sponsorships

Note: Facebook and Google ad spend is automatically tracked via integrations, don't add these as expenses

### Professional Services

What they are: Expert services you hire

Examples:

- Accounting and bookkeeping
- Legal services
- Business consulting
- Tax preparation

### Bank and Financial Fees

What they are: Banking and loan costs

Examples:

- Business bank account fees
- Loan interest payments
- Credit card annual fees (business cards)
- Currency conversion fees

Note: Per-transaction payment fees (Stripe, PayPal) are tracked automatically per order, not as expenses

### How Expenses Affect Profit Calculations

Expenses in Alpha Insights are tracked by date and aggregated for reporting, not allocated to individual orders. The system calculates:

- Total Expenses: Sum of all paid expenses in a date range
- Store Profit: Total order profit minus total expenses for the same period
- Expense Trends: Expenses tracked over time by day/week/month/year
- Category Breakdown: Expenses grouped by category and supplier

Important: Expenses are NOT divided among individual orders. They're aggregated totals that reduce your overall store profit for a given time period. This is different from per-order costs like product costs, shipping, and payment fees which ARE tracked per order.

### Gross vs Net Profit

Gross Profit calculation:

    	Revenue - (Product Costs + Shipping + Payment Fees) = Gross Profit

Net Profit calculation:

    	Gross Profit - (Operating Expenses + Ad Spend) = Net Profit

### Why Both Matter

- Gross profit: Shows if your pricing covers direct costs (sustainable product pricing)
- Net profit: Shows if your business is actually profitable overall

You can have great gross margins but still lose money if expenses are too high!

### Expense Frequency Options

Alpha Insights supports both one-time and recurring expenses with multiple frequency options:

#### One-Time Expenses

What they are: Single occurrence costs assigned to a specific date

Examples:

- Equipment purchase
- Website redesign
- Legal fees for contract
- One-time marketing campaign

How they work: Recorded once on the date specified

#### Recurring Expenses

Recurring expenses are automatically calculated and tracked based on their frequency. The system generates occurrences from the start date through either the end date (if specified) or the current date.

Supported Frequencies:

- Daily: Occurs every day (e.g., daily contractor fees)
- Weekly: Occurs once per week (e.g., weekly cleaning service)
- Fortnightly: Occurs every 2 weeks (e.g., bi-weekly payroll)
- Monthly: Occurs once per month (e.g., rent, most software subscriptions)
- Quarterly: Occurs every 3 months (e.g., quarterly tax payments)
- Yearly/Annually: Occurs once per year (e.g., annual insurance premiums)

#### Recurring Expense Details

- Start Date: Required - when the recurring expense begins
- End Date: Optional - when the recurring expense stops (leave blank for ongoing)
- Amount: The amount charged per occurrence (not total)
- Occurrence Tracking: The system tracks total occurrences and total amount paid to date
- Current Date Limit: Recurring expenses never calculate beyond today's date

Example Monthly Recurring Expense:

    Expense: Office Rent
    Amount: $2,500
    Frequency: Monthly
    Start Date: January 1, 2024
    End Date: (blank - ongoing)

    Result: $2,500 expense recorded on the 1st of each month
    Total to date (10 months): $25,000

### Expense Categories & Suppliers

Alpha Insights uses two taxonomy systems to organize expenses:

#### Expense Categories (Hierarchical)

Categories support parent/child relationships, allowing you to create structured organizational systems:

- Parent Categories: Top-level groupings (e.g., "Marketing")
- Child Categories: Sub-categories (e.g., "Marketing > Social Media Advertising")

Benefits of hierarchical categories:

- Report on parent categories to see totals across all child categories
- Drill down into specific expense types
- Flexible organizational structure that grows with your business

#### Suppliers

The Suppliers taxonomy is shared between expenses AND products, allowing you to:

- Track all costs associated with a specific supplier
- See both product costs and operational expenses by supplier
- Store supplier metadata like tax numbers and country information
- Generate supplier-specific reports

Creating Categories and Suppliers:

1. Go to Expense Manager → Manage Taxonomies
2. Choose Expense Categories or Suppliers
3. Click Add New
4. Enter name and details
5. For categories, optionally select a parent category
6. Save

Managing Taxonomies: You can edit, delete, and bulk manage taxonomies through the Manage Taxonomies interface.

#### When to Add Expenses

### At Setup

When first setting up Alpha Insights, add:

- All recurring monthly expenses (rent, software, etc.)
- Regular personnel costs
- Fixed ongoing costs

#### As They Occur

Add one-time expenses as they happen:

- Equipment purchases
- Professional services
- One-off marketing campaigns

### Regular Reviews

Review expenses monthly to:

- Add any new recurring costs
- Remove expired subscriptions
- Update amounts if costs changed
- Verify allocations are correct

#### What NOT to Track as Expenses

### Already Tracked Automatically

Don't add these - they're handled automatically:

- Product costs (tracked per product)
- Shipping costs (tracked per order)
- Payment gateway fees (tracked per order)
- Facebook Ads spend (synced via integration)
- Google Ads spend (synced via integration)

### Personal Expenses

Don't include personal costs:

- Personal vehicle expenses (unless 100% business use)
- Personal phone bills
- Personal meals
- Home rent (unless home office with proper deduction)

Why: Alpha Insights tracks business profit, not personal finances

### Tax Payments

Generally don't include tax payments:

- Income tax payments
- Sales tax remittances

Why: These are paid from profit, not operating expenses. Track profit before tax for clarity.

Exception: Payroll taxes and property taxes ARE business expenses

#### Expense Best Practices

### Be Consistent

- Add expenses in the same currency as your store
- Use consistent naming conventions
- Add expenses promptly (don't let them pile up)
- Review and update monthly

### Start With Major Expenses

Don't get overwhelmed - start with the big ones:

1. Rent/lease
2. Largest software subscription (hosting, email marketing)
3. Employee salaries
4. Major marketing costs

Add smaller expenses later as time allows

### Round When Appropriate

For recurring expenses, rounding simplifies tracking:

- $497/month software → $500/month
- $2,995/month rent → $3,000/month

Small rounding differences won't materially affect profit calculations

#### Document Everything

Use the notes field to remember:

- Why the expense was incurred
- Invoice numbers
- Vendor names
- Contract terms (e.g., "Annual - renews December")

### Viewing Expense Data

#### Expense Manager Dashboard

The main Expense Management page shows:

- Key Metrics: Paid Expenses, Unpaid Expenses (all time), Net Revenue, Net Profit
- Recent Expenses: List of recent paid or unpaid expenses (configurable date range)
- Recurring Expenses: All active recurring expenses with total paid to date
- Quick Actions: Add expense, manage taxonomies, import/export

#### Manage All Expenses

Advanced expense list with:

- Filter by: date range, category, supplier, paid/unpaid status, recurring/one-time, attachment status
- Search by expense name or reference
- Bulk operations: delete, update paid status, assign category or supplier
- Export: all expenses or filtered results to CSV
- Pagination for large expense lists

#### In Reports

The Report Builder shows expense data in:

- Profit & Loss Statement: Complete P&L with expense breakdown by category
- Expense Reports: Pre-built and custom expense analysis reports
- Store Profit Reports: Net profit calculations including expenses
- Time-Based Reports: Expenses tracked by day/week/month/year

### Automatic Expense Creation via API

Alpha Insights can automatically create and update expenses from advertising platforms:

#### Facebook Ads Integration

When Facebook Ads integration is configured and enabled:

- Daily ad spend is automatically created as expenses
- Each day's spend is tracked as a separate expense post
- Expenses include Facebook API metadata (account name, account ID, last updated)
- Updates existing expenses if they already exist for that day
- Campaign-level spend tracking available

#### Google Ads Integration

When Google Ads integration is configured and enabled:

- Campaign and account data automatically synced
- Daily spend tracked per campaign
- Expenses include Google API metadata (campaign details, account data)
- GCLID tracking for order attribution
- Campaign performance data stored with expenses

Benefits of API Integration:

- No manual data entry for ad spend
- Always accurate and up-to-date
- Automatic reconciliation
- Campaign-level expense tracking
- Complete attribution from ad to order

Note: API-created expenses should not be manually edited as they will be overwritten on the next API sync.

### Expense Attachments

Alpha Insights supports multiple file attachments per expense:

- Supported File Types: Images (JPG, PNG, GIF, WebP), PDFs, and documents
- Multiple Attachments: Attach multiple receipts, invoices, or supporting documents
- File Size Limit: 10MB per file
- Storage: Files stored in WordPress media library
- Viewing: Click thumbnail to view full attachment
- Management: Add or remove attachments when editing expenses

Best Practices for Attachments:

- Attach invoice PDFs for large expenses
- Include receipt images for in-person purchases
- Attach contracts for recurring service agreements
- Use consistent file naming (e.g., "Invoice-2024-10-CompanyName.pdf")

### Expense Benchmarks

#### Typical eCommerce Expense Ratios

Rent/Facilities:5-15% of revenue

Software/Tools:2-5% of revenue

Marketing (beyond ads):3-8% of revenue

Personnel:15-30% of revenue (varies widely)

Total Operating Expenses:25-50% of revenue

Target Net Margin:15-25% after all costs