Premium CRM Solution

Complete MediansCRM
Documentation

Everything you need to install, configure, and master the most powerful Laravel-based AI-Powered CRM system. Built for businesses that demand excellence.

50+
Modules
100%
Responsive
24/7
Support
MediansCRM Dashboard
Customer Management
Sales Analytics
Project Management

Welcome to MediansCRM

The most comprehensive Laravel-based CRM solution for modern businesses

Lightning Fast

Built with Laravel 11 and optimized for performance with advanced caching strategies.

Fully Responsive

Perfect experience across all devices - desktop, tablet, and mobile.

Enterprise Security

Advanced security features with role-based permissions and data encryption.

Highly Customizable

Extensive customization options with modular architecture and theme support.

What's Included

Complete source code, comprehensive documentation, free updates, premium support, and installation service.

System Requirements

Ensure your server meets these requirements for optimal performance

PHP Requirements

  • PHP Version: 8.2 or higher
  • Memory Limit: 256MB minimum (512MB recommended)
  • Max Execution Time: 300 seconds
  • Extensions: OpenSSL, PDO, Mbstring, Tokenizer, XML, Ctype, JSON, BCMath, Fileinfo, GD

Database Requirements

  • MySQL: 5.7 or higher
  • MariaDB: 10.3 or higher
  • PostgreSQL: 9.6 or higher
  • SQLite: 3.8 or higher

Server Requirements

  • Web Server: Apache 2.4+ or Nginx 1.15+
  • SSL Certificate: Recommended for production
  • URL Rewriting: mod_rewrite (Apache) or equivalent
  • Storage: 1GB minimum free space
Quick Server Check
# Check PHP version
php -v

# Check required extensions
php -m | grep -E "(openssl|pdo|mbstring|tokenizer|xml|ctype|json|bcmath|fileinfo|gd)"

# Check MySQL version
mysql --version

Installation Guide

Step-by-step installation process for MediansCRM

1

Download & Extract

Download MediansCRM from CodeCanyon and extract the files to your web server directory.

# Extract the downloaded file
unzip medians-crm-v2.0.zip
cd medians-crm
2

Set Permissions

Set proper file permissions for Laravel directories.

# Set permissions
chmod -R 777 storage public bootstrap/cache
chmod -R 777 app/Modules app/Modules/modules.json #used for Modules Management

#If you user is www-data
chown -R www-data:www-data storage public bootstrap/cache
3

Access Setup Wizard

Navigate to your domain and follow the automatic setup wizard.

Visit https://yourdomain.com/setup to start the installation wizard.

1

Install Dependencies

# Install Composer dependencies
composer install --optimize-autoloader --no-dev

# Install NPM dependencies
npm install
npm run build
2

Environment Configuration

# Copy environment file
cp .env.example .env

# Generate application key
php artisan key:generate
3

Database Setup

Configure your database settings in the .env file:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=medianscrm
DB_USERNAME=your_username
DB_PASSWORD=your_password
4

Run Migrations

# Run database migrations
php artisan migrate

# Seed initial data
php artisan db:seed
1

Docker Compose Setup

# docker-compose.yml
version: '3.8'
services:
  app:
    build:
      context: .
      dockerfile: Dockerfile
    ports:
      - "8000:8000"
    volumes:
      - .:/var/www/html
    environment:
      - DB_HOST=database
      - DB_DATABASE=medianscrm
      - DB_USERNAME=root
      - DB_PASSWORD=secret
    depends_on:
      - database

  database:
    image: mysql:8.0
    environment:
      MYSQL_ROOT_PASSWORD: secret
      MYSQL_DATABASE: medianscrm
    volumes:
      - mysql_data:/var/lib/mysql

volumes:
  mysql_data:
2

Launch with Docker

# Start the containers
docker-compose up -d

# Access the application
# Visit http://localhost:8000/setup

Setup Wizard Guide

Complete walkthrough of the MediansCRM installation wizard

1

Welcome & System Check

Setup Wizard Step 1

What happens in this step:

  • Welcome message and feature overview
  • Automatic system requirements check
  • PHP version and extensions validation
  • Directory permissions verification
  • Server configuration assessment

Important: All requirements must pass before proceeding to the next step.

2

Database Configuration

Setup Wizard Step 2

Database setup process:

  • Choose database type (MySQL, PostgreSQL, SQLite)
  • Enter database connection details
  • Test database connection
  • Automatic database creation (if needed)
  • Connection validation and optimization
Example Configuration:
3

Administrator Account

Setup Wizard Step 3

Admin account creation:

  • Administrator personal information
  • Secure password setup with strength meter
  • Company details and branding
  • Time zone and locale settings
  • Contact information and preferences

Security: Passwords must be at least 8 characters with mixed case, numbers, and special characters.

4

Module Selection

Setup Wizard Step 4

Choose your modules:

Core Modules (Required)
  • Customer Management
  • Lead Management
  • Deal Pipeline
  • Project Management
  • ...
Optional Modules
  • WhatsApp Integration
  • Marketing Campaigns
  • Advanced Analytics
  • Workflow Automation
  • ...
5

Installation Process

Setup Wizard Step 5

Automated installation:

  • Environment file generation
  • Database table creation
  • Initial data seeding
  • Module activation and configuration
  • Cache optimization and cleanup

Installation Complete!

Installation Complete!

After successful installation, you'll be redirected to the login page where you can access your new MediansCRM system with the administrator account you created.

Lead Management

Complete lead management system with advanced generation, assignment, and tracking capabilities

Comprehensive Lead Management

MediansCRM's lead management module provides everything you need to capture, qualify, assign, and convert leads into customers with advanced automation and reporting features.

Lead Capture & Creation
Lead Generation APIs
Smart Assignment
Lead Analytics
Lead Management Interface

Core Features

Lead Capture

  • Manual lead creation with custom fields
  • CSV/Excel import functionality
  • Web form integration
  • Multiple lead sources tracking
  • Automated lead validation

Lead Generation

  • Google Search API integration
  • Brave Search API integration
  • Apollo.io API integration
  • Foursquare Places API
  • NLP text extraction

Assignment & Distribution

  • Manual lead assignment
  • Automatic distribution rules
  • Team capacity tracking
  • Round-robin assignment
  • Assignment analytics

Tracking & Reports

  • Lead status management
  • Conversion tracking
  • Performance reports
  • Lead source analytics
  • Team performance metrics

Lead Creation & Import

Manual Lead Creation

Create leads directly through the web interface with all necessary information and custom fields.

Lead Information Fields
Basic Information:
  • First Name & Last Name
  • Contacts & Location
  • Company & Position
  • Lead Source
Assignment:
  • Assigned Staff Member
  • Lead Status
  • Priority Level
  • Info about the Lead

CSV Import

Import multiple leads from CSV or Excel files with field mapping and validation.

1
Upload File

Upload your CSV file with lead data

2
Map Fields

Map CSV columns to CRM fields

3
Validate & Import

Review and import leads

API Lead Creation

Create Lead via API
curl -X POST "https://yourcrm.com/api/v1/leads" \
  -H "Content-Type: application/json" \
  -d '{
    "first_name": "John",
    "last_name": "Doe",
    "email": "john.doe@example.com",
    "phone": "+1234567890",
    "company": "Acme Corp",
    "position": "Marketing Manager",
    "source_id": 1,
    "assigned_to": 5,
    "status_id": 1
  }'

Lead Generation APIs

MediansCRM integrates with multiple lead generation services to help you find potential customers automatically.

Google Search API

Search for businesses and contacts using Google's comprehensive database

Business Search Contact Discovery Location-based

Brave Search API

Privacy-focused search engine for finding business contacts and information

Privacy-focused Business Data Contact Info

Apollo.io Integration

Professional contact database with verified business emails and phone numbers

Verified Contacts Company Data Email Verification

Foursquare Places

Location-based business discovery with detailed venue information

Location-based Venue Details Business Hours

Lead Generation Workflow

Search

Define search criteria and target audience

Filter

Apply filters and validation rules

Import

Import qualified leads into CRM

Assign

Automatically assign to team members

Lead Assignment & Distribution

Manual Assignment

Manually assign leads to specific team members based on expertise or availability

  • Individual lead assignment
  • Bulk assignment operations
  • Assignment history tracking

Round-Robin Assignment

Automatically distribute leads evenly among team members

  • Equal distribution algorithm
  • Capacity-based assignment
  • Skip unavailable members

Smart Assignment

AI-powered assignment based on performance and expertise

  • Performance-based routing
  • Skill matching
  • Workload balancing

Assignment Analytics

Team Capacity
85%
Current utilization
Distribution Balance
92%
Even distribution
Avg Response Time
2.5h
First contact time

Lead Reports & Analytics

Performance Reports

Lead Conversion Report Track lead-to-customer conversion rates
Source Performance Analyze performance by lead source
Team Performance Individual and team performance metrics

Sales Pipeline

Pipeline Overview Visual pipeline with stage analysis
Stage Duration Time spent in each pipeline stage
Bottleneck Analysis Identify pipeline bottlenecks

Activity Reports

Follow-up Activity Track follow-up actions and outcomes
Stale Leads Identify leads requiring attention
Response Times Measure team response efficiency

Lead Dashboard

New Leads Today
23
+12% from yesterday
Conversion Rate
18.5%
+2.3% this month
Active Leads
347
In pipeline
Hot Leads
45
Ready to convert

Integration Examples

Create Lead with Assignment

// Create a new lead
$lead = new Lead([
    'first_name' => 'Jane',
    'last_name' => 'Smith',
    'email' => 'jane.smith@company.com',
    'phone' => '+1987654321',
    'company' => 'Tech Solutions Inc',
    'position' => 'CTO',
    'source_id' => 2, // Web form
    'status_id' => 1, // New lead
    'assigned_to' => 3, // Auto-assigned
    'business_id' => auth()->user()->business_id
]);

$lead->save();

// Trigger assignment notification
event(new LeadEventCreated($lead));
Bulk Lead Assignment

// Assign multiple leads using round-robin
$leadIds = [1, 2, 3, 4, 5];
$teamMembers = [10, 11, 12]; // Staff IDs

$assignmentHelper = new LeadAssignmentHelper();
$result = $assignmentHelper->assignLeadsRoundRobin($leadIds, $teamMembers);

// Update lead assignments
foreach ($result as $leadId => $staffId) {
    Lead::where('lead_id', $leadId)
        ->update(['assigned_to' => $staffId]);
}
Update Lead Status

// Update lead status and log activity
$lead = Lead::find(1);
$lead->update([
    'status_id' => 3, // Qualified
]);

// Log status change activity
$lead->logActivity('status_updated', [
    'old_status' => 'New',
    'new_status' => 'Qualified',
    'updated_by' => auth()->user()->id
]);

Deals & Pipelines Management

Complete sales pipeline management with customizable stages, deal tracking, and conversion analytics

Advanced Sales Pipeline Management

MediansCRM's deals and pipelines module provides a comprehensive solution for managing your sales process from lead qualification to deal closure with customizable pipelines and advanced analytics.

Deal Management
Custom Pipelines
Lead Conversion
Sales Analytics
Deals Pipeline Interface

Core Features

Deal Management

  • Create and track sales opportunities
  • Deal value and probability tracking
  • Expected close date management
  • Multi-currency support
  • Deal assignment and ownership

Custom Pipelines

  • Create unlimited sales pipelines
  • Customizable pipeline stages
  • Drag-and-drop stage management
  • Stage-specific automation
  • Pipeline templates

Lead Conversion

  • Convert qualified leads to deals
  • Automatic data transfer
  • Lead-to-deal mapping
  • Conversion tracking
  • Source attribution

Sales Analytics

  • Pipeline performance metrics
  • Win rate analysis
  • Sales forecasting
  • Team performance tracking
  • Revenue reports

Deal Creation & Management

Manual Deal Creation

Create deals directly through the web interface with complete deal information and pipeline assignment.

Deal Information Fields
Basic Information:
  • Deal Name & Code
  • Deal Amount & Currency
  • Probability & Expected Close Date
  • Description & Notes
Assignment:
  • Related Model ( Project/Client )
  • Pipeline & Stage
  • Deal Client
  • Team Members

Lead Conversion

Convert qualified leads into deals with automatic data transfer and pipeline placement.

1
Select Lead

Choose qualified lead to convert

2
Deal Details

Add deal value and timeline

3
Pipeline Assignment

Assign to appropriate pipeline

API Deal Creation

Create Deal via API
curl -X POST "https://yourcrm.com/api/v1/deals" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Website Redesign Project",
    "amount": 15000,
    "currency_code": "USD",
    "probability": 75,
    "expected_due_date": "2025-09-15",
    "client_id": 123,
    "pipeline_id": 1,
    "stage_id": 2,
    "description": "Complete website redesign project"
  }'

Pipeline Management

Create and customize sales pipelines to match your unique sales process and business requirements.

Pipeline Creation

Create multiple pipelines for different products, services, or sales processes

Unlimited Pipelines Custom Naming Process Specific

Stage Management

Define custom stages with specific criteria and automation rules

Custom Stages Drag & Drop Stage Rules

Stage Transitions

Control how deals move between stages with validation and automation

Validation Rules Auto-progression Required Fields

Example Sales Pipeline

1. Prospecting
12 deals
$45,000
2. Qualification
8 deals
$78,000
3. Proposal
5 deals
$125,000
4. Negotiation
3 deals
$95,000
5. Closed Won
2 deals
$65,000

Deal Tracking & Progress

Value Tracking

Monitor deal values, probability changes, and revenue forecasting

  • Deal amount history
  • Probability adjustments
  • Weighted pipeline value
  • Currency conversion

Timeline Management

Track important dates and milestones throughout the sales process

  • Expected close dates
  • Stage entry dates
  • Activity timelines
  • Follow-up reminders

Activity Tracking

Monitor all deal-related activities and communications

  • Meeting history
  • Email communications
  • Call logs
  • Document sharing

Deal Status Management

Active
Won
Lost

Sales Reports & Analytics

Pipeline Reports

Pipeline Performance Overall pipeline health and velocity
Stage Analysis Time spent and conversion rates by stage
Deal Velocity Average time to close by pipeline

Performance Reports

Win Rate Analysis Success rates by team and individual
Revenue Forecasting Projected revenue based on pipeline
Team Performance Individual and team sales metrics

Period Reports

Monthly Sales Monthly performance and trends
Quarterly Review Quarterly pipeline and revenue analysis
Annual Summary Year-over-year growth and performance

Sales Dashboard

Active Deals
47
+5 this week
Pipeline Value
$485K
+12% this month
Win Rate
68%
+3% this quarter
Avg. Cycle Time
28 days
-4 days improved

Integration Examples

Create Deal with Pipeline Assignment

// Create a new deal
$deal = new Deal([
    'name' => 'Enterprise Software License',
    'amount' => 50000,
    'currency_code' => 'USD',
    'probability' => 60,
    'expected_due_date' => '2025-10-30',
    'client_id' => 15,
    'status' => 'active',
    'business_id' => auth()->user()->business_id,
    'created_by' => auth()->user()->id
]);

$deal->save();

// Assign to pipeline and stage
$deal->assignToPipeline(2, 1); // Pipeline ID 2, Stage ID 1

// Trigger deal creation event
event(new DealCreated($deal));
Convert Lead to Deal

// Convert lead to deal
$lead = Lead::find(25);

$deal = Deal::create([
    'name' => $lead->company . ' - ' . $lead->position,
    'amount' => 25000,
    'currency_code' => 'USD',
    'probability' => 50,
    'expected_due_date' => now()->addDays(45),
    'lead_id' => $lead->lead_id,
    'status' => 'active',
    'business_id' => $lead->business_id,
    'created_by' => auth()->user()->id
]);

// Update lead status
$lead->update(['status_id' => 4]); // Converted status

// Log conversion activity
$deal->logActivity('converted_from_lead', [
    'lead_id' => $lead->lead_id,
    'converted_by' => auth()->user()->id
]);
Update Deal Stage

// Update deal stage and probability
$deal = Deal::find(10);

$oldStage = $deal->current_stage;
$newStage = 3; // Proposal stage

$deal->update([
    'probability' => 75, // Increase probability
    'amount' => 45000 // Update deal value
]);

// Move to next stage
$deal->moveToStage($newStage);

// Log stage change
$deal->logActivity('stage_updated', [
    'old_stage' => $oldStage,
    'new_stage' => $newStage,
    'updated_by' => auth()->user()->id
]);

// Trigger stage update event
event(new DealUpdated($deal));
Create Custom Pipeline

// Create new sales pipeline
$pipeline = Pipeline::create([
    'name' => 'SaaS Sales Process',
    'model' => 'Deal',
    'description' => 'Pipeline for SaaS product sales',
    'business_id' => auth()->user()->business_id,
    'created_by' => auth()->user()->id
]);

// Create pipeline stages
$stages = [
    ['name' => 'Demo Scheduled', 'sort' => 1],
    ['name' => 'Needs Analysis', 'sort' => 2],
    ['name' => 'Proposal Sent', 'sort' => 3],
    ['name' => 'Contract Review', 'sort' => 4],
    ['name' => 'Closed Won', 'sort' => 5]
];

foreach ($stages as $stageData) {
    $pipeline->stages()->create($stageData);
}

Customer Management

Comprehensive customer relationship management with advanced features

Complete Customer Lifecycle Management

MediansCRM's customer management module provides everything you need to track, manage, and nurture your customer relationships from first contact to long-term loyalty.

360° Customer Profiles
Complete Interaction History
Advanced Segmentation
Customer Analytics
Customer Management Interface

Key Features

Customer Profiles

  • Complete contact information management
  • Custom fields for industry-specific data
  • Social media integration
  • Document and file attachments
  • Relationship mapping

Communication Tracking

  • Email integration and tracking
  • Call logs and recordings
  • Meeting notes and follow-ups
  • WhatsApp conversation history
  • Social media interactions

Segmentation & Targeting

  • Dynamic customer segments
  • Behavioral targeting
  • Purchase history analysis
  • Lifecycle stage tracking
  • Custom tag management

Analytics & Insights

  • Customer lifetime value
  • Engagement metrics
  • Satisfaction scores
  • Revenue attribution
  • Churn prediction

API Integration Example

Create Customer via API

// Create a new customer
$customer = new Customer([
    'first_name' => 'John',
    'last_name' => 'Doe',
    'email' => 'john.doe@example.com',
    'phone' => '+1234567890',
    'company' => 'Acme Corp',
    'status' => 'active',
    'source' => 'website',
    'custom_fields' => [
        'industry' => 'Technology',
        'company_size' => '50-100'
    ]
]);

$customer->save();

// Add to segment
$customer->addToSegment('high-value-prospects');

// Log activity
$customer->logActivity('customer_created', [
    'source' => 'api',
    'created_by' => auth()->user()->id
]);

Projects Module

Comprehensive project management and collaboration system

Complete Project Lifecycle Management

MediansCRM's Projects module provides powerful project management capabilities to plan, track, and deliver projects efficiently with team collaboration and client transparency.

Project Planning
Task Management
Time Tracking
Progress Monitoring
Projects Dashboard

Core Features

Project Creation & Setup

  • Project name and description
  • Client assignment
  • Start and deadline dates
  • Budget and cost tracking
  • Status management
  • Custom fields support

Team Collaboration

  • Team member assignment
  • Role-based permissions
  • Activity tracking
  • File sharing
  • Comments and notes

Progress Tracking

  • Task completion tracking
  • Progress percentage
  • Timeline visualization
  • Milestone management
  • Status reporting

Integration Features

  • Task integration
  • Time tracking
  • Meeting scheduling
  • File attachments
  • Client portal access

Project Workflow

1. Create Project

Set up project details, assign client, define scope and timeline.

2. Add Tasks

Break down project into manageable tasks and assign team members.

3. Execute & Track

Monitor progress, log time, update status, and collaborate with team.

4. Complete & Review

Finalize deliverables, review outcomes, and close project.

API Integration Examples

Create New Project

POST /api/projects

// Create a new project
$project = Project::create([
    'name' => 'Website Redesign',
    'description' => 'Complete website redesign project',
    'client_id' => 123,
    'start_date' => '2025-08-15',
    'deadline_date' => '2025-10-15',
    'total_cost' => 15000,
    'is_paid' => false,
    'status_id' => 1,
    'business_id' => auth()->user()->business_id
]);

// Add custom fields
$project->fields()->create([
    'code' => 'project_type',
    'value' => 'Web Development'
]);

return response()->json($project->load('client', 'status'));

Update Project Status

PUT /api/projects/{id}

// Update project details
$project = Project::findOrFail($id);
$project->update([
    'name' => $request->name,
    'description' => $request->description,
    'deadline_date' => $request->deadline_date,
    'status_id' => $request->status_id
]);

// Log activity
$project->activities()->create([
    'action' => 'updated',
    'description' => 'Project details updated',
    'user_id' => auth()->id()
]);

return response()->json($project->fresh());

Query Projects with Filters

GET /api/projects

// Query projects with filters
$projects = Project::query()
    ->with(['client', 'status', 'tasks'])
    ->when($request->status_id, function($q, $status) {
        return $q->where('status_id', $status);
    })
    ->when($request->client_id, function($q, $client) {
        return $q->where('client_id', $client);
    })
    ->when($request->search, function($q, $search) {
        return $q->where('name', 'like', "%{$search}%");
    })
    ->forBusiness(auth()->user()->business_id)
    ->paginate(15);

return response()->json($projects);

Advanced Features

Time Tracking & Timesheets

Time Logging

Track time spent on projects and tasks with start/stop functionality

Timesheet Management

Generate detailed timesheets for billing and reporting

Cost Calculation

Automatic cost calculation based on hourly rates

File & Document Management

File Uploads

Attach documents, images, and files to projects

Organization

Organize files by project and task for easy access

Sharing

Share files with team members and clients securely

Project Reports & Analytics

Progress Reports

Track project completion and milestones

Time Reports

Analyze time spent across projects and tasks

Cost Analysis

Review project costs and budget utilization

Team Performance

Evaluate team productivity and workload

Project Settings & Configuration

Status Management

Configure project status options (Active, On Hold, Completed, Cancelled)

Custom Fields

Add custom fields to capture project-specific information

Permissions

Control access levels for different user roles

Available Routes

GET /projects/index List all projects with filters
POST /projects Create new project
GET /projects/{id} View project details
PUT /projects/{id} Update project
DELETE /projects/{id}/delete Delete project
GET /projects/{id}/settings Project settings page
GET /projects/reports Project analytics and reports

Finance Module

Complete financial management solution for invoicing, payments, expenses, and financial reporting

Comprehensive Financial Management

MediansCRM's Finance module provides a complete financial ecosystem to manage invoices, credit notes, transactions, items, and expenses. Track your business finances with detailed reporting and automated workflows.

Invoice Management
Credit Notes
Transactions
Items & Inventory
Expense Tracking
Finance Dashboard

Finance Module Components

Invoices

Create, send, and manage professional invoices with automated payment tracking and client communication.

  • Professional invoice templates
  • Automated invoice numbering
  • Payment status tracking
  • Email delivery system
  • Multi-currency support
  • Tax calculations

Credit Notes

Issue credit notes for returns, refunds, and adjustments with full invoice integration and tracking.

  • Link to original invoices
  • Automated calculations
  • Approval workflows
  • Client notifications
  • Status management
  • Reporting integration

Transactions

Track all financial transactions with detailed payment records and automated transaction matching.

  • Payment method tracking
  • Transaction categorization
  • Automated reconciliation
  • Payment confirmations
  • Transaction history
  • Financial reporting

Items & Inventory

Manage your products and services catalog with pricing, categories, and inventory tracking.

  • Product/service catalog
  • Dynamic pricing
  • Item categorization
  • Tax rate management
  • Bulk operations
  • Usage analytics

Expenses

Track business expenses with categorization, receipt management, and detailed expense reporting.

  • Expense categorization
  • Receipt attachments
  • Project allocation
  • Approval workflows
  • Expense reports
  • Tax compliance

Financial Workflow

1. Setup Items & Services

Create your product/service catalog with pricing, taxes, and categories for consistent invoicing.

Example: Web Development Service - $100/hour + 10% tax

2. Create & Send Invoices

Generate professional invoices from your items catalog, send to clients via email with automated tracking.

Status Flow: Draft → Sent → Viewed → Paid

3. Track Payments

Record payments, create transactions, and automatically update invoice status with payment confirmations.

Methods: Bank Transfer, Credit Card, PayPal, Cash

4. Handle Returns/Adjustments

Issue credit notes for refunds, returns, or invoice adjustments with full audit trails.

Types: Full Refund, Partial Refund, Service Adjustment

5. Track Expenses

Record business expenses with proper categorization and project allocation for accurate profitability.

Categories: Office Supplies, Travel, Marketing, Software

6. Financial Reporting

Generate comprehensive financial reports for business analysis and tax compliance.

Reports: P&L, Cash Flow, Tax Summary, Client Statements

Advanced Finance Features

Professional Invoicing System

Automated Invoice Generation

Create invoices from projects, estimates, or recurring schedules with automated numbering and calculations.

Email Delivery System

Send professional invoices directly to clients with customizable email templates and delivery tracking.

Multi-Currency Support

Handle international clients with multi-currency invoicing and automatic currency conversion.

Advanced Tax Calculations

Automatic tax calculations with support for multiple tax rates, tax-inclusive/exclusive pricing.

Invoice Creation Example

// Create invoice from project
$invoice = $invoiceService->createInvoice([
    'model_id' => $project->id,
    'model_type' => Project::class,
    'client_id' => $project->client_id,
    'date' => now()->format('Y-m-d'),
    'due_date' => now()->addDays(30)->format('Y-m-d'),
    'description' => 'Web Development Services',
    'total' => 5000.00,
    'subtotal' => 4545.45,
    'tax_amount' => 454.55,
    'status_id' => 1 // Draft
], [
    ['item_id' => 1, 'quantity' => 40, 'price' => 100.00, 'total' => 4000.00],
    ['item_id' => 2, 'quantity' => 10, 'price' => 50.00, 'total' => 500.00]
]);

// Send invoice via email
$invoiceService->sendInvoice($invoice->id);

Payment & Transaction Management

Multiple Payment Methods

Support for various payment methods including bank transfers, credit cards, PayPal, and cash payments.

Automated Status Updates

Automatically update invoice status when payments are recorded and notify relevant parties.

Payment Security

Secure payment processing with transaction verification and audit trails for compliance.

Payment History

Complete payment history tracking with detailed transaction records and reconciliation tools.

Payment Status Flow
Pending
Payment initiated
Processing
Payment verification
Completed
Payment confirmed

Items & Inventory Management

Product/Service Catalog

Comprehensive catalog management for products and services with detailed descriptions and pricing.

Category Management

Organize items into categories and groups for easy navigation and reporting.

Dynamic Pricing

Flexible pricing options with support for tiered pricing, discounts, and tax configurations.

Bulk Import/Export

Import items from CSV files or export catalog data for external processing and analysis.

Item Usage Analytics
Most Used Items
Web Development
+25% this month
Total Revenue
$45,280
+12% this month

Expense Tracking & Management

Expense Categories

Organize expenses into customizable categories for better tracking and tax reporting.

Project Allocation

Allocate expenses to specific projects for accurate profitability analysis and client billing.

Approval Workflows

Set up approval processes for expense submissions with role-based authorization levels.

Receipt Management

Attach digital receipts and documents to expense records for audit trails and compliance.

Common Expense Categories
Office Supplies
Travel & Transport
Marketing
Software & Tools
Meals & Entertainment
Equipment

Financial Reports & Analytics

Revenue Reports

Track income from invoices and payments with trend analysis and forecasting.

  • Monthly/Quarterly revenue
  • Client revenue breakdown
  • Service/product performance
  • Payment method analysis
Tax Reports

Comprehensive tax reporting for compliance with automated calculations and summaries.

  • Tax liability summary
  • Deductible expenses
  • VAT/GST reporting
  • Export for accounting software
Profit & Loss

Detailed P&L statements showing revenue, expenses, and profitability by period.

  • Revenue vs expenses
  • Gross and net profit
  • Project profitability
  • Year-over-year comparison
Cash Flow

Monitor cash flow with incoming and outgoing transaction analysis and projections.

  • Cash flow forecast
  • Outstanding invoices
  • Payment trends
  • Liquidity analysis

API Integration Examples

Invoice Management API

Create and Send Invoice

// Create invoice
$invoice = $invoiceService->createInvoice([
    'model_id' => $project->id,
    'model_type' => Project::class,
    'client_id' => $client->id,
    'date' => now()->format('Y-m-d'),
    'due_date' => now()->addDays(30)->format('Y-m-d'),
    'description' => 'Project Development Invoice',
    'status_id' => 1 // Draft status
], $invoiceItems);

// Send invoice via email
$result = $invoiceService->sendInvoice($invoice->id);

// Mark invoice as paid
$payment = $invoiceService->markAsPaid($invoice->id, [
    'amount' => $invoice->total,
    'payment_method' => 'bank_transfer',
    'transaction_id' => 'TXN123456',
    'payment_date' => now()->format('Y-m-d')
]);

return response()->json([
    'invoice' => $invoice->load('client', 'items', 'status'),
    'payment' => $payment
]);

Payment Processing API

Record Payment Transaction

// Create payment transaction
$transaction = $transactionService->createTransaction([
    'model_id' => $invoice->id,
    'model_type' => Invoice::class,
    'user_id' => $client->id,
    'user_type' => Client::class,
    'amount' => 5000.00,
    'description' => 'Payment for Invoice #INV-001',
    'payment_method' => 'credit_card',
    'date' => now()->format('Y-m-d'),
    'status_id' => 7, // Completed
    'custom_field' => [
        'transaction_id' => 'stripe_pi_1234567890',
        'card_last_four' => '4242',
        'receipt_url' => 'https://stripe.com/receipt/123'
    ]
]);

// Update invoice status automatically
$invoice->update(['status_id' => 8]); // Paid

return response()->json($transaction->load('model', 'user'));

Expense Management API

Create and Categorize Expense

// Create business expense
$expense = $expenseService->createExpense([
    'amount' => 250.00,
    'description' => 'Office supplies for Q4',
    'date' => now()->format('Y-m-d'),
    'category_id' => 3, // Office Supplies category
    'model_id' => $project->id, // Optional: allocate to project
    'model_type' => Project::class,
    'status_id' => 1, // Pending approval
    'business_id' => auth()->user()->business_id,
    'created_by' => auth()->id()
]);

// Attach receipt
$expense->uploads()->create([
    'file_path' => $receiptPath,
    'file_name' => 'receipt.pdf',
    'file_type' => 'application/pdf'
]);

return response()->json($expense->load('category', 'model'));

Item Management API

Manage Items Catalog

// Create service item
$item = $itemService->createItem([
    'name' => 'Web Development (Hourly)',
    'description' => 'Professional web development services',
    'price' => 100.00,
    'tax' => 10.00, // 10% tax rate
    'group_id' => 1, // Services group
    'business_id' => auth()->user()->business_id,
    'created_by' => auth()->id()
]);

// Bulk update prices
$priceUpdates = [
    ['item_id' => 1, 'price' => 110.00],
    ['item_id' => 2, 'price' => 55.00],
];
$results = $itemService->bulkUpdatePrices($priceUpdates);

// Import items from CSV
$importData = [
    ['name' => 'Consulting', 'price' => 150.00, 'tax' => 10.00],
    ['name' => 'Design', 'price' => 80.00, 'tax' => 10.00],
];
$imported = $itemService->importItems($importData);

return response()->json([
    'item' => $item,
    'bulk_update' => $results,
    'imported' => $imported
]);

Available Routes

Invoice Routes

GET /invoices List all invoices with filters
POST /invoices Create new invoice
GET /invoices/{id}/show View invoice details
POST /invoices/{id}/send Send invoice via email
POST /invoices/{id}/mark-paid Mark invoice as paid
GET /invoices/reports Invoice analytics and reports

Payment & Transaction Routes

GET /transactions List all transactions
POST /transactions Create payment transaction
GET /transactions/{id} View transaction details

Items & Inventory Routes

GET /items List all items/services
POST /items Create new item
POST /items/import Bulk import items
POST /items/update-prices Bulk update item prices

Expense Routes

GET /expenses List all expenses
POST /expenses Create new expense
GET /expenses/{id} View expense details

Credit Notes Routes

GET /credit-notes List all credit notes
POST /credit-notes Create credit note
GET /credit-notes/{id} View credit note details

Business Settings & Configuration

Invoice Settings

  • Invoice number format and sequences
  • Default payment terms and due dates
  • Email templates for invoice delivery
  • Currency and tax rate configurations
  • Invoice capacity limits per business
  • Automated reminder schedules

Payment Settings

  • Supported payment methods
  • Payment gateway integrations
  • Transaction fee calculations
  • Payment confirmation templates
  • Automatic payment matching rules
  • Late payment penalties

Item Settings

  • Item categories and groups
  • Default tax rates by category
  • Price list management
  • Unit of measurement options
  • Inventory tracking preferences
  • Item capacity limitations

Expense Settings

  • Expense categories management
  • Approval workflow configuration
  • Expense limits and policies
  • Receipt submission requirements
  • Project allocation rules
  • Tax deductibility settings

Integration & Best Practices

Financial Workflow Optimization

Set up automated workflows for invoice creation, payment processing, and expense approvals to reduce manual work and improve accuracy.

Data Security & Compliance

Ensure all financial data is properly secured with encryption, access controls, and regular backups for compliance with financial regulations.

Financial Reporting

Use comprehensive reporting features to track business performance, generate tax reports, and make data-driven financial decisions.

System Integration

Integrate with external accounting software, payment gateways, and banking systems for seamless financial management.

Proposals & Estimates Modules

Professional proposal creation and accurate project estimation system

Complete Sales & Estimation Pipeline

MediansCRM's Proposals and Estimates modules provide comprehensive tools for creating professional proposals, generating accurate estimates, and managing client requests with seamless conversion to invoices.

Professional Proposals
Accurate Estimates
Invoice Conversion
Performance Analytics
Proposals & Estimates Dashboard

Proposals Module

Create and manage professional business proposals with templates, approval workflows, and conversion tracking.

  • Template-based proposal creation
  • Client approval workflows
  • Multi-currency support
  • Automated assignment system
  • Conversion to invoices
  • Performance analytics

Estimates Module

Generate accurate project estimates with detailed breakdowns, client portal access, and automatic follow-up systems.

  • Detailed cost breakdowns
  • Estimate request management
  • Client portal integration
  • Automatic assignment
  • Expiry date tracking
  • Conversion tracking

Core Features

Document Creation

  • Rich text content editor
  • Item-based line items
  • Tax and discount calculations
  • Currency selection
  • Template integration
  • Custom fields support

Assignment & Workflow

  • Automatic staff assignment
  • Round-robin distribution
  • Workload-based assignment
  • Approval workflows
  • Status tracking
  • Notification system

Client Portal

  • Client viewing access
  • Online approval/rejection
  • Estimate request creation
  • Status updates
  • Download capabilities
  • Comment system

Business Settings

  • Numbering systems
  • Default currencies
  • Capacity limits
  • Retention policies
  • Notification preferences
  • Validation rules

Module Workflows

1. Create Proposal

Draft proposal with items, assign staff, set deadlines

2. Send to Client

Share via client portal or email notification

3. Client Review

Client reviews and approves/rejects proposal

4. Convert to Invoice

Generate invoice from approved proposal

1. Receive Request

Client submits estimate request through portal

2. Auto Assignment

System assigns to staff based on workload/rules

3. Create Estimate

Staff prepares detailed cost breakdown

4. Client Decision

Client accepts estimate and initiates project

API Integration Examples

Create Business Proposal

POST /api/proposals

// Create a new proposal
$proposal = Proposal::create([
    'title' => 'Website Development Proposal',
    'content' => 'Comprehensive website development package',
    'client_id' => 123,
    'client_type' => Client::class,
    'date' => now(),
    'expiry_date' => now()->addDays(30),
    'currency_code' => 'USD',
    'subtotal' => 15000,
    'tax_amount' => 1500,
    'total' => 16500,
    'business_id' => auth()->user()->business_id,
    'created_by' => auth()->id()
]);

// Add proposal items
$proposal->items()->create([
    'description' => 'Frontend Development',
    'quantity' => 1,
    'rate' => 8000,
    'amount' => 8000
]);

return response()->json($proposal->load('items', 'client'));

Generate Project Estimate

POST /api/estimates

// Create estimate from request
$estimate = Estimate::create([
    'title' => 'Mobile App Development Estimate',
    'client_id' => $request->client_id,
    'date' => now(),
    'expiry_date' => now()->addDays(15),
    'currency_code' => 'USD',
    'subtotal' => 25000,
    'discount_amount' => 2500,
    'tax_amount' => 2250,
    'total' => 24750,
    'estimate_number' => EstimateService::generateNumber(),
    'business_id' => auth()->user()->business_id
]);

// Auto-assign based on business settings
EstimateAssignmentHelper::autoAssignEstimate($estimate);

// Send notification
EstimateNotificationHelper::notifyEstimateCreated($estimate);

return response()->json($estimate);

Convert to Invoice

POST /api/proposals/{id}/convert-to-invoice

// Convert proposal/estimate to invoice
$proposal = Proposal::findOrFail($id);

$invoice = Invoice::create([
    'client_id' => $proposal->client_id,
    'proposal_id' => $proposal->id,
    'date' => now(),
    'due_date' => now()->addDays(30),
    'subtotal' => $proposal->subtotal,
    'tax_amount' => $proposal->tax_amount,
    'total' => $proposal->total,
    'currency_code' => $proposal->currency_code,
    'business_id' => $proposal->business_id
]);

// Copy items from proposal
foreach ($proposal->items as $item) {
    $invoice->items()->create($item->toArray());
}

// Update proposal status
$proposal->update([
    'converted_to_invoice' => true,
    'invoice_id' => $invoice->id,
    'converted_at' => now()
]);

return response()->json($invoice->load('items'));

Advanced Features

Automated Assignment System

Assignment Methods
Round Robin

Distribute proposals/estimates evenly among staff members

Workload Based

Assign based on current workload and capacity

Random

Random assignment within qualified staff pool

Manual

Manual assignment by managers

Estimate Request Management

Client Portal Integration

Clients can submit estimate requests directly through the portal

Daily Limits

Configurable daily limits per client to prevent spam

Attachment Support

Clients can attach files with size and type restrictions

Auto-Response

Automated acknowledgment and response time tracking

Analytics & Performance Reports

Conversion Rate

Track proposal to invoice conversion rates

Response Time

Average time to respond to estimate requests

Value Analysis

Total value of proposals and estimates by period

Staff Performance

Individual staff conversion and response metrics

Status Distribution

Breakdown of proposals/estimates by status

Approval Time

Average time from submission to client approval

Business Configuration

Numbering & Format
  • Auto-numbering system
  • Custom number prefixes
  • Number format templates
Financial Settings
  • Default currencies
  • Minimum/maximum amounts
  • Tax calculation rules
Notifications
  • Assignment notifications
  • Status change alerts
  • Expiry warnings
Validation & Limits
  • Capacity management
  • Retention policies
  • Approval workflows

Available Routes

Proposals Routes

GET /proposals/index List all proposals with filters
POST /proposals/store Create new proposal
GET /proposals/{id}/show View proposal details
POST /proposals/{id}/update Update proposal
POST /proposals/{id}/convert-to-invoice Convert to invoice
GET /proposals/reports Proposal analytics

Estimates Routes

GET /estimates/index List all estimates with filters
POST /estimates/store Create new estimate
GET /estimates/{id}/show View estimate details
POST /estimates/{id}/change-status Update estimate status
POST /estimates/{id}/convert-to-invoice Convert to invoice
GET /estimate_requests Estimate requests management

WhatsApp Business Integration

Seamless WhatsApp Business API integration for customer communication

Why WhatsApp Integration?

2+ Billion Users

Connect with customers on their preferred platform

Instant Communication

Real-time messaging with read receipts

Rich Media Support

Send documents, images, videos, and locations

End-to-End Encryption

Secure business communications

WhatsApp Business API Setup

1. WhatsApp Business Account

Create a WhatsApp Business Account and get approved for the WhatsApp Business API.

  • Apply through a WhatsApp Business Solution Provider
  • Complete business verification process
  • Obtain your Business Account ID and Phone Number ID

2. API Credentials

Configure your WhatsApp Business API credentials in MediansCRM.

# WhatsApp Configuration
WHATSAPP_TOKEN=your_access_token
WHATSAPP_PHONE_NUMBER_ID=your_phone_number_id
WHATSAPP_BUSINESS_ACCOUNT_ID=your_business_account_id
WHATSAPP_WEBHOOK_VERIFY_TOKEN=your_verify_token

3. MediansCRM Configuration

Navigate to Settings > WhatsApp Integration to complete the setup.

WhatsApp Features in MediansCRM

Unified Messaging Interface

Unified Inbox

All WhatsApp conversations in one place alongside email and other channels

Team Collaboration

Assign conversations to team members with internal notes

Rich Media

Send and receive images, documents, videos, and location data

WhatsApp Messaging Interface

Message Templates

Create and manage WhatsApp Business message templates for consistent communication.

Template Example: Order Confirmation
{
  "name": "order_confirmation",
  "language": "en",
  "category": "TRANSACTIONAL",
  "components": [
    {
      "type": "HEADER",
      "format": "TEXT",
      "text": "Order Confirmed ✅"
    },
    {
      "type": "BODY",
      "text": "Hello {{1}}, your order #{{2}} has been confirmed! Expected delivery: {{3}}. Track your order: {{4}}"
    },
    {
      "type": "FOOTER",
      "text": "Thank you for choosing us!"
    },
    {
      "type": "BUTTONS",
      "buttons": [
        {
          "type": "URL",
          "text": "Track Order",
          "url": "https://yourstore.com/track/{{5}}"
        }
      ]
    }
  ]
}

WhatsApp Automation

Welcome Messages

Automatically send welcome messages to new WhatsApp contacts

Follow-up Reminders

Automated follow-up messages based on customer actions

Abandoned Cart Recovery

Send cart abandonment messages with personalized offers

Event-based Messages

Birthday wishes, anniversaries, and milestone celebrations

WhatsApp Analytics

Messages Sent
1,247
+15% this month
Message Read Rate
94.2%
+2.1% this month
Response Rate
78.5%
+5.3% this month
Avg Response Time
12 min
-3 min this month

Campaign Management

Multi-channel marketing campaigns with advanced targeting, automation, and comprehensive analytics

Advanced Marketing Campaign System

MediansCRM's campaign module provides a comprehensive solution for creating, managing, and analyzing multi-channel marketing campaigns with email, WhatsApp, and mixed communication strategies.

Multi-Channel Campaigns
Advanced Targeting
Scheduled Delivery
Performance Analytics
Campaign Management Interface

Core Features

Multi-Channel Campaigns

  • Email marketing campaigns
  • WhatsApp Business messaging
  • Mixed channel campaigns
  • Template-based content creation
  • Personalized message content

Smart Targeting

  • Dynamic audience segmentation
  • Criteria-based targeting
  • Lead, deal, and client targeting
  • Custom field filtering
  • Real-time audience preview

Campaign Automation

  • Scheduled campaign delivery
  • Automated send triggers
  • Drip campaign sequences
  • Follow-up automation
  • Response-based actions

Analytics & Tracking

  • Delivery and open rates
  • Click-through tracking
  • Engagement analytics
  • ROI measurement
  • Performance comparison

Campaign Creation & Setup

Visual Campaign Builder

Create comprehensive campaigns using our intuitive builder with advanced targeting and content customization.

1
Campaign Settings

Define campaign name, type, and basic configuration

  • Campaign name and description
  • Channel selection (Email/WhatsApp/Mixed)
  • Priority and scheduling options
2
Audience Targeting

Define your target audience with precise criteria

  • Target model selection (Leads/Deals/Clients)
  • Custom filtering criteria
  • Real-time audience count preview
3
Content Creation

Design engaging content for your campaign

  • Email template selection and customization
  • WhatsApp message formatting
  • Personalization variables
4
Review & Launch

Test and deploy your campaign

  • Campaign preview and testing
  • Delivery scheduling
  • Performance tracking setup

Template-based Campaigns

Start with pre-designed campaign templates optimized for different business scenarios and objectives.

Lead Nurturing Templates
Welcome Series

Multi-step onboarding sequence

Re-engagement

Win back inactive prospects

Sales Campaigns
Deal Follow-up

Automated deal progression

Customer Success

Post-purchase engagement

API Campaign Creation

Create Campaign via API
curl -X POST "https://yourcrm.com/api/v1/campaigns" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Product Launch Campaign",
    "subject": "Introducing Our Latest Innovation",
    "campaign_type": "email",
    "target_model_type": "Lead",
    "target_criteria": {
      "status": "qualified",
      "source": "website",
      "created_after": "2025-01-01"
    },
    "email_content": "...",
    "scheduled_at": "2025-08-15 10:00:00"
  }'

Multi-Channel Campaign Types

Reach your audience through their preferred communication channels with targeted messaging strategies.

Email Campaigns

Professional email marketing with advanced features and tracking

HTML Email Designer
Personalization Variables
Open & Click Tracking
Mobile Optimization

WhatsApp Campaigns

Direct messaging through WhatsApp Business API for personal engagement

Rich Media Messages
Approved Templates
Delivery Confirmation
Two-way Communication

Mixed Campaigns

Coordinated multi-channel approach for maximum reach and engagement

Channel Sequencing
Cross-channel Analytics
Synchronized Messaging
Unified Reporting

Advanced Audience Targeting

Dynamic Segmentation

Create sophisticated audience segments using multiple criteria and filters

  • Demographic filtering
  • Behavioral segmentation
  • Custom field criteria
  • Activity-based targeting

Multi-Model Targeting

Target across different CRM entities with unified campaign management

  • Lead-based campaigns
  • Deal-focused messaging
  • Client retention campaigns
  • Cross-entity targeting

Real-time Preview

See your audience size and composition before campaign launch

  • Live audience count
  • Segment composition
  • Target validation
  • Reach estimation

Targeting Configuration Example

Target Model: Leads
Status equals Qualified
Source in Website, Referral
Company Size greater than 50 employees
Created Date within last 30 days
Estimated Reach: 1,247 leads

Campaign Analytics & Performance

Performance Metrics

Delivery Rate
96.8%
+2.1% vs last campaign
Open Rate
24.5%
+1.8% vs industry avg
Click Rate
5.2%
+0.7% vs last month
Conversion Rate
3.1%
+0.3% improvement

Real-time Tracking

Email Open Tracking Track when recipients open your emails
Click-through Analysis Monitor link clicks and user engagement
Delivery Monitoring Real-time delivery status updates

Audience Insights

Engagement Patterns Analyze when and how users engage
Segment Performance Compare performance across segments
Response Analysis Track responses and conversions

ROI Measurement

Revenue Attribution Link campaigns to revenue generation
Cost Analysis Calculate campaign costs and efficiency
Performance Comparison Compare campaigns and identify trends

Campaign Automation & Scheduling

Scheduled Campaigns

Plan and schedule campaigns for optimal delivery timing

  • Date and time scheduling
  • Timezone optimization
  • Recurring campaign setup
  • Send time optimization

Trigger-based Automation

Automatically send campaigns based on user actions and events

  • Event-triggered campaigns
  • Behavioral automation
  • Milestone celebrations
  • Follow-up sequences

Drip Campaigns

Nurture leads with automated message sequences over time

  • Multi-step sequences
  • Time-based delivery
  • Conditional branching
  • Response handling

Campaign Automation Workflow

Trigger Event
Lead created, Deal updated, etc.
Audience Check
Verify targeting criteria
Content Generation
Personalize message content
Message Delivery
Send via selected channel
Track Performance
Monitor engagement metrics

Integration Examples

Create Multi-Channel Campaign

// Create a new campaign
$campaign = Campaign::create([
    'name' => 'Q4 Product Launch Campaign',
    'subject' => 'Discover Our Revolutionary New Product',
    'description' => 'Multi-channel campaign to promote new product launch',
    'campaign_type' => 'mixed', // email + whatsapp
    'target_model_type' => 'Lead',
    'target_criteria' => [
        'status' => 'qualified',
        'source' => ['website', 'referral'],
        'custom_fields' => [
            'company_size' => ['operator' => '>=', 'value' => 50],
            'budget' => ['operator' => '>=', 'value' => 10000]
        ],
        'created_after' => '2025-06-01'
    ],
    'email_content' => view('campaigns.templates.product-launch-email')->render(),
    'whatsapp_content' => 'Hi {{first_name}}, exciting news about our new product! 🚀',
    'scheduled_at' => '2025-08-20 09:00:00',
    'business_id' => auth()->user()->business_id,
    'created_by' => auth()->user()->id
]);

// Calculate target audience
$audienceCount = $campaign->recipients->count();
$campaign->update(['total_recipients' => $audienceCount]);
Advanced Audience Targeting

// Set up complex targeting criteria
$targetingCriteria = [
    'model_type' => 'Lead',
    'conditions' => [
        'status_id' => ['operator' => 'in', 'values' => [1, 2, 3]], // New, Qualified, Contacted
        'source_id' => ['operator' => 'not_in', 'values' => [5]], // Exclude cold calls
        'created_at' => [
            'operator' => 'between',
            'start' => '2025-01-01',
            'end' => '2025-07-31'
        ],
        'custom_fields' => [
            'industry' => ['operator' => 'in', 'values' => ['Technology', 'Healthcare']],
            'budget_range' => ['operator' => '>=', 'value' => 25000],
            'decision_timeline' => ['operator' => 'in', 'values' => ['Immediate', 'Within 3 months']]
        ]
    ],
    'exclude_conditions' => [
        'email_campaigns' => [
            'operator' => 'sent_within_days',
            'value' => 7 // Don't send if emailed in last 7 days
        ]
    ]
];

// Preview audience before campaign creation
$campaignService = new CampaignService();
$audiencePreview = $campaignService->previewAudience($targetingCriteria);

echo "Target Audience: {$audiencePreview['count']} leads";
echo "Segments: " . implode(', ', $audiencePreview['segments']);
Send Campaign with Tracking

// Send campaign with full tracking setup
$campaign = Campaign::find(1);

// Generate recipient list
$recipients = $campaignService->generateRecipientList($campaign);

// Send campaign
$sendResult = $campaignService->sendCampaign($campaign, [
    'send_immediately' => false,
    'scheduled_at' => $campaign->scheduled_at,
    'test_mode' => false,
    'tracking_enabled' => true,
    'personalization' => [
        'first_name' => true,
        'company' => true,
        'custom_fields' => ['industry', 'position']
    ]
]);

// Process each recipient
foreach ($recipients as $recipient) {
    // Create campaign message record
    $message = CampaignMessage::create([
        'campaign_id' => $campaign->id,
        'recipient_type' => $campaign->campaign_type,
        'recipient_id' => $recipient->id,
        'recipient_model_type' => $campaign->target_model_type,
        'recipient_email' => $recipient->email,
        'recipient_phone' => $recipient->phone,
        'subject' => $campaign->subject,
        'content' => $campaignService->personalizeContent($campaign, $recipient),
        'status' => 'pending',
        'business_id' => $campaign->business_id
    ]);
    
    // Add tracking parameters
    $trackingData = [
        'campaign_id' => $campaign->id,
        'message_id' => $message->id,
        'recipient_email' => $recipient->email,
        'tracking_pixel' => route('read-campaign-email-picture', [
            'email' => $recipient->email,
            'nid' => $message->id
        ])
    ];
    
    $message->update(['tracking_data' => $trackingData]);
}

// Update campaign status
$campaign->update([
    'status_id' => 2, // Sending
    'sent_at' => now(),
    'total_recipients' => $recipients->count()
]);
Campaign Performance Tracking

// Get comprehensive campaign analytics
$campaign = Campaign::with(['messages'])->find(1);

// Calculate performance metrics
$analytics = [
    'total_sent' => $campaign->messages()->where('status', 'sent')->count(),
    'delivery_rate' => $campaign->sent_count > 0 ? 
        ($campaign->sent_count - $campaign->failed_count) / $campaign->sent_count * 100 : 0,
    'open_rate' => $campaign->sent_count > 0 ? 
        $campaign->opened_count / $campaign->sent_count * 100 : 0,
    'click_rate' => $campaign->opened_count > 0 ? 
        $campaign->clicked_count / $campaign->opened_count * 100 : 0,
    'bounce_rate' => $campaign->sent_count > 0 ? 
        $campaign->failed_count / $campaign->sent_count * 100 : 0
];

// Get detailed message tracking
$messageTracking = CampaignMessage::where('campaign_id', $campaign->id)
    ->select('status', DB::raw('count(*) as count'))
    ->groupBy('status')
    ->pluck('count', 'status')
    ->toArray();

// Performance by time periods
$hourlyPerformance = CampaignMessage::where('campaign_id', $campaign->id)
    ->where('opened_at', '>=', $campaign->sent_at)
    ->select(
        DB::raw('HOUR(opened_at) as hour'),
        DB::raw('count(*) as opens')
    )
    ->groupBy('hour')
    ->orderBy('hour')
    ->get();

// Top performing links (if email campaign)
$linkPerformance = CampaignMessage::where('campaign_id', $campaign->id)
    ->whereNotNull('clicked_at')
    ->select('tracking_data->clicked_link as link', DB::raw('count(*) as clicks'))
    ->groupBy('link')
    ->orderByDesc('clicks')
    ->limit(10)
    ->get();

// Generate performance report
$report = [
    'campaign' => $campaign->name,
    'metrics' => $analytics,
    'message_breakdown' => $messageTracking,
    'hourly_opens' => $hourlyPerformance,
    'top_links' => $linkPerformance,
    'roi' => $campaignService->calculateROI($campaign)
];

return response()->json($report);

Workflows & Automation

Advanced workflow automation with AI agents, visual editor, and intelligent lead management

Intelligent Workflow Automation

MediansCRM's workflow module provides a powerful visual automation platform with AI-powered agents, custom workflow creation, and intelligent lead processing capabilities.

Visual Workflow Editor
AI-Powered Agents
Automated Execution
Lead Processing
Workflow Editor Interface

Core Features

Visual Workflow Builder

  • Drag-and-drop workflow editor
  • Node-based workflow design
  • Visual connection mapping
  • Real-time workflow validation
  • Template workflow library

AI Agent Integration

  • Custom AI agent creation
  • Pre-built agent templates
  • Agent configuration management
  • Multi-agent workflows
  • Agent performance analytics

Workflow Execution

  • Manual and automated triggers
  • Real-time execution monitoring
  • Error handling and retries
  • Execution history tracking
  • Performance optimization

Analytics & Reporting

  • Workflow performance metrics
  • Execution success rates
  • Agent usage statistics
  • Processing time analysis
  • ROI tracking

Workflow Creation & Design

Visual Workflow Editor

Create complex workflows using our intuitive drag-and-drop interface with pre-built nodes and connectors.

Drag & Drop Interface

Intuitive node-based editor for building complex workflows

Pre-built Components

Library of ready-to-use workflow nodes and actions

Real-time Validation

Instant feedback and error detection while building

Template-based Creation

Start with pre-built workflow templates designed for common business processes and customize as needed.

Code-based Workflow

Create Workflow Programmatically

// Create a new workflow
$workflow = Workflow::create([
    'name' => 'Lead Processing Workflow',
    'description' => 'Automatically process and qualify leads',
    'workflow_data' => [
        'nodes' => [
            [
                'id' => 'start',
                'type' => 'trigger',
                'config' => ['event' => 'lead.created']
            ],
            [
                'id' => 'qualify',
                'type' => 'agent',
                'config' => ['agent_id' => 1]
            ],
            [
                'id' => 'assign',
                'type' => 'action',
                'config' => ['action' => 'assign_lead']
            ]
        ],
        'connections' => [
            ['from' => 'start', 'to' => 'qualify'],
            ['from' => 'qualify', 'to' => 'assign']
        ]
    ],
    'status' => 'active',
    'user_id' => auth()->id(),
    'business_id' => auth()->user()->business_id
]);

AI Agents & Intelligence

Leverage AI-powered agents to automate complex tasks and decision-making within your workflows.

Lead Qualification Agent

Automatically analyze and score leads based on predefined criteria and machine learning models

Lead Scoring Data Analysis Decision Making

Communication Agent

Handle automated responses, email generation, and customer communication workflows

Email Generation Auto-responses Content Creation

Data Processing Agent

Extract, transform, and process data from various sources with intelligent data handling

Data Extraction Data Validation Data Enrichment

Routing Agent

Intelligently route leads and deals to appropriate team members based on criteria and workload

Smart Routing Load Balancing Performance Tracking

Agent Configuration

Basic Settings
  • Agent name and description
  • Agent type and behavior
  • Trigger conditions
  • Input/output parameters
AI Configuration
  • Model selection and parameters
  • Training data sources
  • Confidence thresholds
  • Learning algorithms
Integration Settings
  • API connections
  • External service integration
  • Data source mapping
  • Output formatting

Workflow Execution & Monitoring

Execution Triggers

Multiple ways to initiate workflow execution

  • Event-based triggers (lead created, deal updated)
  • Scheduled execution (time-based)
  • Manual triggers
  • API-triggered workflows

Real-time Monitoring

Track workflow execution in real-time

  • Live execution status
  • Node-by-node progress tracking
  • Error detection and alerts
  • Performance metrics

Error Handling

Robust error handling and recovery

  • Automatic retry mechanisms
  • Fallback workflows
  • Error logging and reporting
  • Manual intervention options

Execution Dashboard

Active Workflows
12
Currently running
Success Rate
94.2%
+1.5% this week
Processed Today
847
+23% from yesterday
Avg Execution Time
2.3s
-0.5s improved

Lead Management Workflows

Specialized workflows designed for intelligent lead processing and management.

Lead Qualification Workflow

Automatically qualify leads based on multiple criteria and data points

Data Collection Scoring Algorithm Classification Assignment

Lead Assignment Workflow

Intelligently distribute leads to team members based on various factors

Capacity Check Skill Matching Load Balancing Assignment

Lead Nurturing Workflow

Automated follow-up sequences and personalized communication

Segmentation Content Selection Scheduling Delivery

Workflow Builder Example

Lead Created
AI Qualification
Score > 70?
Yes →
Assign to Sales
No →
Nurture Campaign

Workflow Analytics & Reports

Performance Analytics

Execution Success Rate Track workflow completion and failure rates
Processing Time Analysis Monitor workflow execution times and bottlenecks
Resource Utilization Track agent usage and system resources

Agent Analytics

Agent Performance Individual agent success rates and accuracy
Learning Progress Track AI model improvement over time
Usage Statistics Agent utilization and demand metrics

Business Impact

ROI Analysis Return on investment from automation
Time Savings Hours saved through workflow automation
Lead Quality Improvement Impact on lead quality and conversion rates

Integration Examples

Create Lead Processing Workflow

// Create workflow with AI agent integration
$workflow = Workflow::create([
    'name' => 'Intelligent Lead Processing',
    'description' => 'AI-powered lead qualification and assignment',
    'workflow_data' => [
        'nodes' => [
            [
                'id' => 'trigger_1',
                'type' => 'trigger',
                'config' => [
                    'event' => 'lead.created',
                    'conditions' => ['source' => 'website']
                ]
            ],
            [
                'id' => 'agent_1',
                'type' => 'ai_agent',
                'config' => [
                    'agent_id' => 'lead_qualifier',
                    'parameters' => [
                        'scoring_model' => 'advanced',
                        'threshold' => 70
                    ]
                ]
            ],
            [
                'id' => 'condition_1',
                'type' => 'condition',
                'config' => [
                    'field' => 'lead_score',
                    'operator' => '>=',
                    'value' => 70
                ]
            ]
        ],
        'connections' => [
            ['from' => 'trigger_1', 'to' => 'agent_1'],
            ['from' => 'agent_1', 'to' => 'condition_1']
        ]
    ],
    'status' => 'active',
    'user_id' => auth()->id(),
    'business_id' => auth()->user()->business_id
]);

// Publish workflow
$workflow->update(['is_published' => true]);
Configure AI Agent

// Create AI agent for lead qualification
$agent = Agent::create([
    'name' => 'Lead Qualification Agent',
    'description' => 'AI agent for scoring and qualifying leads',
    'type' => 'lead_qualifier',
    'config' => [
        'model' => 'gpt-4',
        'prompt_template' => 'Analyze lead data and provide score 1-100',
        'parameters' => [
            'temperature' => 0.3,
            'max_tokens' => 150,
            'criteria' => [
                'company_size' => 20,
                'budget_range' => 25,
                'timeline' => 15,
                'decision_maker' => 25,
                'fit_score' => 15
            ]
        ],
        'output_format' => 'json',
        'validation_rules' => [
            'score' => 'required|numeric|min:0|max:100',
            'reasoning' => 'required|string|max:500'
        ]
    ],
    'status' => 'active',
    'user_id' => auth()->id(),
    'business_id' => auth()->user()->business_id,
    'is_public' => false
]);

// Test agent configuration
$result = $agent->test([
    'company' => 'Tech Startup',
    'budget' => 50000,
    'timeline' => 'Q4 2025',
    'contact_level' => 'CTO'
]);
Execute Workflow

// Execute workflow with lead data
$workflowService = new WorkflowService();

$executionResult = $workflowService->execute($workflow->id, [
    'trigger_data' => [
        'lead_id' => 123,
        'source' => 'website',
        'urgency' => 'high'
    ],
    'context' => [
        'user_id' => auth()->id(),
        'timestamp' => now(),
        'session_id' => session()->getId()
    ]
]);

// Check execution status
if ($executionResult->isSuccessful()) {
    $leadScore = $executionResult->getOutput('lead_score');
    $assignment = $executionResult->getOutput('assignment');
    
    // Log successful execution
    Log::info('Workflow executed successfully', [
        'workflow_id' => $workflow->id,
        'lead_id' => 123,
        'score' => $leadScore,
        'execution_id' => $executionResult->getId()
    ]);
} else {
    // Handle execution errors
    Log::error('Workflow execution failed', [
        'workflow_id' => $workflow->id,
        'error' => $executionResult->getError()
    ]);
}
Monitor Workflow Execution

// Get workflow execution history
$executions = WorkflowExecution::where('workflow_id', $workflow->id)
    ->with(['workflow', 'nodes'])
    ->orderBy('created_at', 'desc')
    ->paginate(20);

// Calculate performance metrics
$metrics = [
    'total_executions' => $executions->total(),
    'success_rate' => $executions->where('status', 'completed')->count() / $executions->total() * 100,
    'average_duration' => $executions->avg('execution_time'),
    'error_rate' => $executions->where('status', 'failed')->count() / $executions->total() * 100
];

// Get real-time execution status
$activeExecutions = WorkflowExecution::where('status', 'running')
    ->where('workflow_id', $workflow->id)
    ->with('currentNode')
    ->get();

// Monitor agent performance
$agentMetrics = Agent::withCount(['executions', 'successful_executions'])
    ->where('business_id', auth()->user()->business_id)
    ->get()
    ->map(function ($agent) {
        return [
            'agent_id' => $agent->id,
            'name' => $agent->name,
            'success_rate' => $agent->successful_executions_count / max($agent->executions_count, 1) * 100,
            'usage_count' => $agent->executions_count
        ];
    });

Email Management

Comprehensive IMAP & SMTP email functionality with account management, automation, and CRM integration

Advanced Email Communication System

MediansCRM's email module provides complete email management with IMAP/SMTP support, multi-account handling, automated fetching, signature management, and seamless CRM integration.

IMAP & SMTP Support
Multi-Account Management
Automated Fetching
CRM Integration
Email Management Interface

Core Features

Email Account Management

  • Multiple IMAP/SMTP accounts
  • Provider-specific configurations
  • App password support
  • Connection testing & validation
  • Custom folder synchronization

Email Composition

  • Rich HTML email editor
  • Template-based composition
  • Email signatures
  • File attachments
  • CC/BCC support

Email Organization

  • Folder management
  • Message filtering
  • Search functionality
  • Read/unread tracking
  • Favorite marking

Automation & Integration

  • Automated email fetching
  • Lead/Client integration
  • Push notifications
  • Template variables
  • Email tracking

Templates & Signatures

Email Templates

Standardized email templates with dynamic content and personalization

HTML Template Support
Variable Substitution
Template Preview
Responsive Design

Email Signatures

Professional signatures with automatic insertion and customization options

HTML Formatting
Default Signatures
Multiple Signatures
Auto-insertion

Available Template Variables

Contact Information
{{$name}} Recipient name
{{$email}} Recipient email
{{$company}} Company name
Business Information
{{$business_name}} Your business name
{{$site_url}} CRM website URL
{{$user}} Sender information
Content Elements
{{$content}} Message content
{{$signature}} Email signature

CRM Integration Features

Lead Integration

Seamless email communication directly from lead profiles

  • Lead-specific email history
  • Quick email composition
  • Email activity tracking
  • Automated follow-ups

Client Management

Complete email communication tracking for client relationships

  • Client communication history
  • Project-related emails
  • Service notifications
  • Support ticket integration

Email Analytics

Track email performance and engagement metrics

  • Delivery tracking
  • Open rate monitoring
  • Response tracking
  • Communication frequency

Implementation Examples

Create Email Account

// Create new email account
$emailAccount = EmailAccount::create([
    'business_id' => auth()->user()->business_id,
    'user_id' => auth()->id(),
    'user_type' => get_class(auth()->user()),
    'email' => 'user@gmail.com',
    'imap_host' => 'imap.gmail.com',
    'imap_port' => 993,
    'imap_username' => 'user@gmail.com',
    'imap_password' => encrypt('app_password'),
    'smtp_host' => 'smtp.gmail.com',
    'smtp_port' => 465,
    'smtp_username' => 'user@gmail.com',
    'smtp_password' => encrypt('app_password')
]);

// Create CRM folder and fetch initial folders
$emailService = new EmailAccountService($emailAccount);
$emailService->handleCRMFolder($emailAccount);
$emailService->connect($emailAccount)->fetch();
Send Email with Template

// Compose and send email
$emailData = [
    'account_id' => $emailAccount->id,
    'email' => 'recipient@example.com',
    'cc' => 'cc@example.com',
    'subject' => 'Welcome to Our Service',
    'message_text' => 'Your custom message content here',
    'signature_id' => $defaultSignature->id,
    'template_id' => $emailTemplate->id
];

// Handle file attachments
$attachments = [];
if (request()->hasFile('attachments')) {
    $attachments[] = request()->file('attachments');
}

// Send email through service
$messageService = new EmailMessageService();
$result = $messageService->sendMail($emailData, $emailAccount, $attachments);

// Track email in CRM folder
$emailMessage = EmailMessage::create([
    'account_id' => $emailAccount->id,
    'folder_name' => 'CRM',
    'subject' => $emailData['subject'],
    'sender_email' => $emailAccount->email,
    'email' => $emailData['email'],
    'message_html' => $emailData['message_text'],
    'business_id' => auth()->user()->business_id
]);
Fetch Emails from Server

// Fetch emails from IMAP server
$emailService = new EmailAccountService($emailAccount);
$messageService = new EmailMessageService();

// Connect to email account
$emailService->connect($emailAccount);

// Get account settings
$days = $emailAccount->field('since_days')->first()->value ?? 7;
$limit = $emailAccount->field('fetch_limit')->first()->value ?? 20;

// Fetch messages from INBOX
$savedMessages = $emailService->fetchMessages('INBOX', $emailAccount, $days, $limit);

// Process each fetched message
foreach ($savedMessages as $message) {
    // Save attachments if any exist
    if ($message->hasAttachments()) {
        $attachments = $messageService->saveMessageAttachments($message, $message);
    }
    
    // Send push notification for new emails
    if ($emailAccount->user->pushSubscription()) {
        $emailAccount->user->notify(new EmailNotification($emailAccount, [$message]));
    }
}
Create Email Signature

// Create professional email signature
$signature = EmailSignature::create([
    'business_id' => auth()->user()->business_id,
    'user_id' => auth()->id(),
    'name' => 'Professional Signature',
    'content' => '
        

Best regards,
' . auth()->user()->name . '
' . (auth()->user()->job_title ?? '') . '
' . (auth()->user()->company_name ?? '') . '

' . (auth()->user()->phone ?? '') . '
' . auth()->user()->email . '
' . config('app.url') . '

', 'is_default' => true, 'is_active' => true ]); // Use signature service to manage signatures $signatureService = new EmailSignatureService(); // Get user's default signature $defaultSignature = $signatureService->getUserDefaultSignature(); // Append signature to email content $messageWithSignature = $signatureService->appendSignatureToMessage( $emailContent, $signature->id );

Troubleshooting & Performance

Common Issues

Cannot connect to IMAP server
Check host, port, and credentials. Enable app passwords for Gmail/Yahoo
SMTP authentication failed
Verify SMTP credentials and server settings. Check firewall/proxy settings
Emails not fetching automatically
Verify cron job setup and account configuration. Check folder permissions
Attachments not downloading
Check storage permissions and available disk space

Performance Tips

Limit email fetch frequency to avoid server overload
Use appropriate fetch limits based on email volume
Regularly clean up old emails and attachments
Use efficient search queries for better performance

Security Considerations

All email passwords are encrypted in the database
Use app passwords instead of account passwords where supported
SSL/TLS encryption is enforced for all connections

API Reference

Complete REST API documentation for MediansCRM integration

MediansCRM REST API

The MediansCRM API is a RESTful API that allows you to integrate MediansCRM with your applications, websites, and third-party services. All API responses are returned in JSON format.

OAuth 2.0 Authentication
Rate Limiting
RESTful Design
JSON Responses

Base URL

https://yourcrm.com/api/v1

Authentication

Bearer Token

Rate Limit

1000 requests/hour

API Endpoints

Customers

GET
/customers
Get all customers
GET
/customers/{id}
Get customer by ID
POST
/customers
Create new customer
PUT
/customers/{id}
Update customer
DELETE
/customers/{id}
Delete customer

Deals

GET
/deals
Get all deals
GET
/deals/{id}
Get deal by ID
POST
/deals
Create new deal
PUT
/deals/{id}
Update deal

API Usage Examples

Customer Management

Create Customer
curl -X POST "https://yourcrm.com/api/v1/customers" \
  -H "Content-Type: application/json" \
  -d '{
    "first_name": "John",
    "last_name": "Doe", 
    "email": "john.doe@example.com",
    "phone": "+1234567890",
    "company": "Acme Corp",
    "source": "website"
  }'
Response:
{
  "success": true,
  "data": {
    "id": 123,
    "first_name": "John",
    "last_name": "Doe",
    "email": "john.doe@example.com", 
    "phone": "+1234567890",
    "company": "Acme Corp",
    "source": "website",
    "status": "active",
    "created_at": "2025-08-09T10:30:00Z",
    "updated_at": "2025-08-09T10:30:00Z"
  }
}

Deal Management

Create Deal
curl -X POST "https://yourcrm.com/api/v1/deals" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Website Redesign Project",
    "value": 15000,
    "currency": "USD",
    "customer_id": 123,
    "stage": "proposal",
    "expected_close_date": "2025-09-15"
  }'

Webhook Integration

Setup Webhook
curl -X POST "https://yourcrm.com/api/v1/webhooks" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://yourapp.com/webhooks/crm",
    "events": ["customer.created", "deal.updated", "invoice.paid"],
    "secret": "your_webhook_secret"
  }'

Frequently Asked Questions

Common questions and answers about MediansCRM

Installation & Setup

What are the minimum system requirements?

MediansCRM requires PHP 8.2+, MySQL 5.7+ (or equivalent), and at least 256MB RAM. For optimal performance, we recommend PHP 8.3+, MySQL 8.0+, and 512MB RAM. See the complete system requirements in our installation guide.

Can I install MediansCRM on shared hosting?

Yes, MediansCRM can be installed on shared hosting as long as it meets the system requirements. However, for better performance and security, we recommend VPS or dedicated hosting, especially for production environments.

How long does the installation take?

The automatic installation wizard typically takes 5-10 minutes, depending on your server speed and the number of modules you choose to install. Manual installation may take 15-30 minutes.

Licensing & Usage

What's included in the license?

Your license includes the complete MediansCRM source code, all modules, 6 months of free updates, documentation, and email support. You can use it for one domain/subdomain per license.

Can I customize the source code?

Yes, you have full access to the source code and can customize it according to your needs. However, customizations may affect future updates, so we recommend using the modular architecture for custom features.

Do you offer extended licenses?

Yes, we offer extended licenses for multiple domains, white-label solutions, and commercial distribution. Contact our sales team for custom licensing options.

Features & Functionality

How many users can I add?

There's no limit on the number of users you can add to MediansCRM. The system is designed to scale with your business, supporting everything from small teams to large enterprises.

Does it integrate with third-party services?

Yes, MediansCRM includes integrations for email services, payment gateways (Stripe, PayPal), WhatsApp Business API, and many other services. You can also build custom integrations using our REST API.

Is there a mobile app?

MediansCRM is fully responsive and works perfectly on mobile devices through web browsers. We're also developing native mobile apps, which will be available as separate products.

Support & Updates

What kind of support do you provide?

We provide email support for all customers, comprehensive documentation, video tutorials, and a community forum. Premium support with live chat and phone support is available as an add-on.

How often do you release updates?

We release major updates quarterly and minor updates/bug fixes monthly. All updates include new features, performance improvements, and security patches. You'll receive 6 months of free updates with your license.

Do you offer installation services?

Yes, we offer professional installation services for customers who prefer hands-off setup. Our team can install, configure, and customize MediansCRM according to your requirements.