LeadFlow AI Documentation

Official buyer guide

Build assessment funnels that qualify leads.

LeadFlow AI is a self-hosted Laravel application for multi-step assessments, backend scoring, lead capture, result delivery, and optional AI-generated recommendations.

Version 1.0.0Laravel 12PHP 8.2+Vue 3 + Inertia

Before installation

Server requirements

Use hosting that allows you to point a domain or subdomain to the application’s public directory and run Composer and Artisan commands.

RequirementSupported valueWhy it is needed
PHP8.2 or newerLaravel runtime
DatabaseMySQL 8+ or MariaDBApplication, queue, cache, and session data
PHP extensionsPDO, OpenSSL, Mbstring, Tokenizer, XML, Ctype, JSON, BCMath, Fileinfo, CurlInstaller and framework services
Writable pathsstorage, bootstrap/cacheUploads, logs, compiled views, and cache
Command accessComposer, PHP CLI, cronDependencies, migrations, queue, and scheduler
Web root/path/to/leadflow/publicPrevents private application files from being web-accessible
Shared hosting

Confirm that your plan supports Composer 2, cron jobs, PHP CLI, symbolic links, and a persistent queue worker. If it cannot run a worker continuously, configure a frequent cron-based queue command with your hosting provider.

Guided setup

Installation

  1. Upload and extract the package.
    Place the application outside the public web root whenever your hosting layout allows it.
  2. Install PHP dependencies.
    Run Composer from the application root.
  3. Create an empty database.
    Keep the host, port, database name, username, and password ready.
  4. Configure the document root.
    Point the domain or subdomain to the package’s public directory.
  5. Open the installer.
    Visit https://your-domain.example/install, pass the server checks, enter database details, and create the administrator.
  6. Sign in.
    The installer redirects to /login after migrations and demo content are complete.
cd /path/to/leadflow
composer install --no-dev --optimize-autoloader

The installer creates .env, generates the application key, runs database migrations, creates the administrator, seeds three demo assessments, creates the public storage link, and writes storage/app/installed.

Do not expose the project root

The web server document root must be the public directory. Never serve .env, storage, or vendor files directly.

Manual storage link

The installer creates the link automatically. If image previews are unavailable, run:

php artisan storage:link

First 15 minutes

Post-install checklist

  1. Open /admin/settings and set the app name, timezone, date format, logo, colors, and legal links.
  2. Configure SMTP, save, send a test email, and confirm its status in Email Logs.
  3. Configure the AI provider only when personalized recommendations are required.
  4. Open the included demo assessments and review their steps, questions, scoring, and results.
  5. Duplicate a demo assessment, customize it, publish it, and open the public URL.
  6. Complete the assessment once and confirm the lead, answers, result, email log, and AI history.
  7. Configure the queue worker and scheduler for continuous operation.

Product model

Core concepts

Assessment

The complete public qualification funnel and its design, contact, scoring, and result configuration.

Step

One visitor-facing screen. Steps determine navigation and progress.

Question

An input or information block inside a step.

Submission

A visitor session created when Start is clicked, including incomplete sessions.

Lead

The contact record created only after a successful Finish action.

Result category

The outcome selected by backend scoring from non-overlapping score ranges.

Submission count is not lead count

A visitor can start and leave before finishing. This increases submissions, but it does not create a lead.

Form builder

Assessment builder

Create and manage funnels from /admin/assessments. Drafts are private, Published assessments are publicly accessible, and Paused assessments remain in admin without an active public funnel.

Recommended structure

  • Use two to four focused steps and put easy questions first.
  • Collect contact information at the end.
  • Create complete fallback results before enabling AI.
  • Keep result score ranges continuous and non-overlapping.
  • Preview a draft before publishing it.

Question types

TypeUse caseAvailable validation
Short textName, role, short answerRequired, min/max length
Long textContext or detailed answerRequired, min/max length
NumberBudget, team size, volumeRequired, min/max value
EmailEmail-formatted answerRequired, email format
PhoneTelephone answerRequired, text length
Single choiceOne answer from optionsRequired, option membership
Multiple choiceSeveral answersRequired, min/max selections
Yes / NoCompact binary choiceRequired
Information textInstructions between questionsNot scored
Consent checkboxConsent or acknowledgementRequired

Question settings

Internal name is the stable admin/export identifier. Question text is visitor-facing. Use Lead card for answers that sales staff should see quickly and Send to AI only for context the provider should receive.

Options and disqualification

Choice options have a visitor label, stored value, score, and optional Disqualify flag. A disqualifying option completes the submission as disqualified while preserving the lead for follow-up.

Duplicate and preview

Duplicate creates an independent Draft with its own slug. Use authenticated Preview while editing. Public Open becomes available after publishing.

Deterministic qualification

Scoring and conditional logic

All scores are calculated on the backend. AI never calculates a score and never selects the result category.

Score sources

  • Scores attached to selected options.
  • Stacked positive scores for multiple-choice answers.
  • Numeric range score rules.
  • Condition-based score rules.

Conditional visibility

A condition shows a target question when a source answer matches equals, not equals, contains, greater than, or less than. Hidden questions are not validated or scored, and stale hidden answers are removed.

Result ranges

0–25    Not Qualified
26–50   Potential Lead
51–75   Qualified
76–100  High Priority

Each result can have a title, description, image, CTA, AI prompt guidance, and fallback recommendation.

Visitor experience

Public funnel

A published assessment is available at /assessment/{slug}. Visitors move through visible steps, submit required contact data, and receive a protected result URL at /result/{token}.

  • Current-step validation runs before moving forward.
  • Progress and Back/Continue navigation follow the configured steps.
  • Scores and result selection are server-side.
  • A random token protects submission and result URLs.
  • UTM parameters, referrer, IP address, and user agent are stored for lead context.
  • Public write endpoints use rate limiting.

Lead operations

Leads and submissions

Open /admin/leads to search and filter completed contacts. The detail view includes answers, score, result, source data, status history, AI recommendation, and generation attempts.

Lead statuses

New, Contacted, Qualified, Unqualified, Converted, and Lost.

CSV export

Export respects active search, assessment, result, status, and date filters.

The assessment list’s submission count includes incomplete visitor sessions. Leads appear only after final validation and successful completion.

Brand controls

Appearance

Use /admin/settings to configure the application name, brand logo, favicon, primary and button colors, public form background, footer text, privacy URL, and terms URL. Image upload controls show previews and preserve stored paths after saving.

The account profile supports name, email, password, and avatar updates. The interface includes light and dark modes; public brand settings are applied to assessment start, submission, and result screens.

Outbound email

SMTP and Email Logs

Configure mail transport in /admin/settings, save, and send a test email. The job is queued, then appears in /admin/email-logs as Pending, Sent, or Failed.

SettingTypical value
Mailersmtp
HostYour provider’s SMTP hostname
Port587 for STARTTLS or 465 for implicit TLS
Encryptiontls, ssl, or empty
Username / passwordProvider credentials; password is encrypted at rest
From address / nameVerified sender identity
Admin notification emailRecipient for new-lead notifications
What Sent means

Sent confirms that the configured transport accepted the message. Inbox placement still depends on the mail provider, SPF, DKIM, DMARC, sender reputation, and recipient filtering.

New-lead notifications are skipped when the admin notification address is empty. Test emails always produce a log once a running worker processes the job.

Optional personalization

AI recommendations

LeadFlow AI supports an OpenAI-compatible chat-completions endpoint. Enter the complete endpoint URL, API key, model, temperature, max tokens, and system prompt in Settings.

https://api.openai.com/v1/chat/completions

The provider must accept Bearer authentication and JSON response mode, then return JSON text in choices[0].message.content:

{
  "summary": "Short qualification summary",
  "recommendation": "Personalized recommendation",
  "next_step": "Suggested next action"
}
Safe failure behavior

If AI is disabled, incomplete, or unavailable, the visitor still receives the configured fallback recommendation. Failed attempts are stored in the lead’s generation history and can be retried.

The API key is encrypted in the database. Only answers marked Send to AI are included in prompt context.

Background processing

Queue and scheduler

AI generation, AI regeneration, new-lead notifications, and SMTP tests run through the Laravel queue. The default production connection is database.

php artisan queue:work --tries=3 --timeout=120

Use Supervisor, systemd, or the process manager supplied by your host to keep the worker alive. Restart workers after deploying application changes:

php artisan queue:restart

Scheduler cron

* * * * * cd /path/to/leadflow && php artisan schedule:run >> /dev/null 2>&1

The scheduler removes incomplete submissions according to the retention period configured in Settings.

Version maintenance

Updating LeadFlow AI

Back up first

Create a database backup and copy .env and storage/app/public before every update.

  1. Read the release changelog for version-specific notes.
  2. Enable maintenance mode: php artisan down.
  3. Replace application files without deleting .env, storage, or buyer-created custom files.
  4. Install optimized dependencies and run migrations.
  5. Clear caches, restart queue workers, and leave maintenance mode.
  6. Verify login, a public assessment, uploads, Email Logs, and one test lead.
composer install --no-dev --optimize-autoloader
php artisan migrate --force
php artisan optimize:clear
php artisan queue:restart
php artisan up

Production baseline

Security checklist

  • Set APP_ENV=production and APP_DEBUG=false.
  • Use HTTPS and a correct APP_URL.
  • Serve only the public directory.
  • Use a dedicated database user with access only to this database.
  • Restrict write permissions to the required storage and cache paths.
  • Use strong administrator and SMTP passwords and rotate provider keys when needed.
  • Back up the database and uploaded files outside the application server.
  • Monitor public-form traffic and AI usage. Public write routes are rate-limited, but high-traffic sites may require additional edge or CAPTCHA protection.

Common fixes

Troubleshooting

SymptomResolution
/install returns 403The application is already installed. Remove storage/app/installed only for an intentional clean reinstall with a prepared database.
Installer requirement failsEnable the named PHP extension or correct write permissions for storage and bootstrap/cache.
Database connection failsConfirm host, port, database, credentials, remote access policy, and that the database exists.
Uploaded image is brokenRun php artisan storage:link and confirm the web server can read storage/app/public.
Email or AI stays queuedStart the queue worker and inspect storage/logs/laravel.log plus failed jobs.
SMTP log is FailedRead the stored error, verify host/port/encryption, sender verification, credentials, and provider relay rules.
AI uses fallbackConfirm AI is enabled, the full endpoint and model are correct, the key has quota, and inspect generation history on the lead.
Settings appear staleRun php artisan optimize:clear, then restart queue workers.
Application returns 500Check PHP version/extensions, permissions, .env, application logs, and that Composer dependencies are installed.

Useful diagnostic commands

php artisan about
php artisan migrate:status
php artisan queue:failed
php artisan optimize:clear

Help and attribution

Support and credits

Before requesting support, include the LeadFlow AI version, PHP version, browser, clear reproduction steps, screenshots when relevant, and the exact error message with passwords and API keys removed. Use the Support tab on the CodeCanyon item page for product support.

Support covers confirmed product defects and clarification of documented features. Server administration, provider account setup, custom development, and third-party service availability are outside standard item support.

Core open-source projects

ProjectPurposeWebsite
LaravelPHP application frameworklaravel.com
Vue.jsFrontend component frameworkvuejs.org
Inertia.jsLaravel and Vue application bridgeinertiajs.com
Tailwind CSSUtility CSS frameworktailwindcss.com
Vueform MultiselectAccessible custom selectsGitHub
Vue DatepickerCustom date picker controlsvue3datepicker.com

Dependency licenses and exact installed versions are recorded in composer.lock and package-lock.json. No third-party stock photography is required by the application package.

Release history

Changelog

Version 1.0.0

Initial CodeCanyon release.

  • Multi-step assessment builder with validation, conditions, and scoring.
  • Public lead funnels, backend result calculation, and fallback recommendations.
  • Lead management, status history, filters, pagination, and CSV export.
  • OpenAI-compatible recommendation generation and generation history.
  • SMTP configuration, new-lead notifications, test email, and Email Logs.
  • Guided installer, demo assessments, branding, profile, uploads, light/dark modes, and responsive UI.