---
title: Lead Capture
subtitle: Understand how inbound leads enter the OrcaPulse project
slug: documentation/lead-capture
---

# Lead Capture

This page documents how lead capture works in the current OrcaPulse project: social integrations, LinkedIn Lead Gen syncing, temporary social lead storage, duplicate checks, conversion into main leads, and the operational views that support review.

## What lead capture covers

In this project, lead capture is not a single form submit event. It is the full system that receives inbound interest from social surfaces and connected sources, stores the incoming conversation context, optionally replies or extracts details with AI, and then converts accepted records into the main lead pipeline.

The codebase splits this into two layers:

- `SocialMediaLead`: temporary record for captured social activity before workflow assignment
- `Lead`: workflow-ready record used for execution timing, recall state, status, and timeline history

## Capture sources

The social integration model includes Facebook, Instagram, TikTok, Twitter, and LinkedIn platform records. For social capture, the project tracks origins such as comments, DMs, forms, story replies, story mentions, LinkedIn messages, and TikTok comments.

LinkedIn lead capture also includes ad-account and lead-form selection metadata so form-based capture can be synced on a schedule or manually.

## Capture settings

Each social integration has capture settings that control what enters the system and how the first response behaves.

- Capture from comments, DMs, lead ads, story replies, and story mentions
- Auto-reply with templates and trigger keywords
- AI extraction of contact details from raw text
- AI reply and AI DM conversation handling
- Duplicate blocking through `preventDuplicates`

## Capture pipeline

Once inbound activity is received, the project stores it on `SocialMediaLead` with platform identity, captured text, source type, optional extracted data, AI analysis, conversation history, and page/form metadata.

If the lead is accepted, OrcaPulse converts it into the main `Lead` model and attaches workflow assignment. From that point on, the lead can move through execution timing, recall behavior, messaging, AI calls, CRM sync, webhook sync, and timeline updates.

## Duplicates and conversion

Duplicate handling is part of the current product. Duplicate checks run before conversion when enough contact data is available. If a duplicate is found, the social lead can be marked as duplicate and linked to the existing lead. If not, the record is converted and assigned to a workflow.

- Social duplicate outcome: status can move to `duplicate`
- Main lead duplicate outcome: duplicate metadata and timeline events can mark the record as skipped
- Conversion output: converted leads become workflow-managed records with execution and status controls

## Operations and visibility

Operators already have two important places to review capture behavior in the app:

- `Social Media Leads`: integrations, capture settings, sync actions, and captured social leads
- `Lead Hub`: broader lead list across workflows once records are in the main system

After conversion, timeline events provide a structured audit trail for creation, assignment, delivery attempts, calls, transcripts, and status movement.

## Next steps

After lead capture is connected, continue into workflow setup, qualification prompts, and downstream actions like CRM sync, webhook sync, messaging, or AI calling.
