Import Leads from CSV

@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif @if(session('import_errors') && count(session('import_errors')) > 0)

Import completed with the following errors:

    @foreach(session('import_errors') as $error)
  • {{ $error }}
  • @endforeach
@endif

CSV Format Requirements

Your CSV file must have these required columns:

  • name - Lead's full name (required)
  • email - Lead's email address (required)
  • businessType - Business type (required - will be created if it doesn't exist)

These columns are optional and can be included or omitted:

  • phone - Phone number
  • company - Company name
  • lead_owner - Lead owner name
  • leadValue - Lead value in numeric format
  • leadSource - How the lead was acquired
  • leadStatus - Lead status (defaults to 'new' if empty)

✅ Your CSV can have any combination of these columns

Example minimal CSV:

name,email,businessType

Example full CSV:

name,email,phone,company,businessType,lead_owner,leadValue,leadSource,leadStatus

Note: Business types will be automatically created if they don't exist. Duplicate business types (case-insensitive) will be avoided.

@csrf
@error('file')

{{ $message }}

@enderror
Download Sample CSV

What happens during import:

  • Business types are automatically created if they don't exist
  • Existing leads (by email) are updated with new information
  • All operations are wrapped in a database transaction
  • Invalid rows are skipped and reported as errors
  • Maximum file size: 10MB