Social Lead Master
Social Lead Master

Social Lead Master — Source Setup Guide

Configure Facebook Lead Ads and Instagram Lead Forms to automatically capture leads from your social advertising campaigns directly into your CRM pipeline.

Overview

Social Lead Master captures leads from Facebook and Instagram ad campaigns in real-time and routes them into your CRM.

How It Works

1. Lead Captured

User fills out a Lead Ad form on Facebook/Instagram

2. Webhook Fires

Meta sends lead data to your CRM webhook endpoint

3. Lead Created

CRM creates a new lead with mapped field data

Leads are captured in real-time (within seconds) and automatically assigned to the correct pipeline, source tag, and sales agent based on your configuration.

Prerequisites

  • Meta Developer App — Same app used for Social Media module (with App ID and App Secret)
  • Facebook Page — With admin access; this Page will run the Lead Ad campaigns
  • Facebook Ads Manager — With active or planned Lead Ad campaigns
  • Page Access Token — With pages_manage_ads and leads_retrieval permissions
  • CRM Admin Access — To configure source setup and field mappings
  • HTTPS Domain — Webhooks require a publicly accessible HTTPS endpoint
Tip: If you already set up the Social Media module, you can reuse the same Meta Developer App. You just need to add the additional permissions for leads.

Facebook Lead Ads Setup

Configure your Meta Developer App to receive lead data from Facebook Lead Ad campaigns.

1

Get Webhook URL from CRM Dashboard

First, get the Webhook URL that Meta needs to send leads to:

  1. Log in to your CRM as an Administrator.
  2. Navigate to Social Lead Master → Source Setup (or Settings).
  3. Scroll to the Webhook Configuration section.
  4. Copy the Webhook Callback URL (e.g., https://yourdomain.com/social_lead/webhook).
  5. Copy or note down the Verify Token.
2

Configure Webhook in Meta Developer Console

Tell Meta where to send the lead data:

  1. Go to developers.facebook.com and open your App.
  2. If you haven't already, click Add Product and add Webhooks.
  3. In the left menu, click Webhooks.
  4. In the dropdown at the top, select "Page" as the object type.
  5. Click "Subscribe to this topic" (or "Edit Subscription").
  6. Paste your CRM's Webhook Callback URL and Verify Token into the respective fields.
  7. Click Verify and Save.
3

Subscribe to the leadgen Field

  1. After the webhook is verified, scroll down the Webhooks page to the list of Page fields.
  2. Locate the field named leadgen.
  3. Click Subscribe next to it.
  4. This instructs Meta to push data to your webhook whenever a user submits a Lead Ad form.
4

Add App ID and Secret Key to CRM

Your CRM needs your Meta App credentials to authenticate users and fetch lead details:

  1. In the Meta Developer Console, go to App Settings → Basic.
  2. Copy the App ID.
  3. Click "Show" next to App Secret, enter your password, and copy the secret.
  4. In your CRM, go to Admin Dashboard → Social Lead Master → Settings.
  5. Paste the App ID and App Secret into the provided fields and save.
5

Configure OAuth Redirect URL

To allow your users to connect their Facebook pages, you must configure Facebook Login:

  1. In your CRM's Social Lead Master → Settings page, copy the OAuth Redirect URL provided.
  2. In the Meta Developer Console, click Add Product and add Facebook Login for Business (or Facebook Login).
  3. Go to Facebook Login → Settings in the left menu.
  4. Scroll to Valid OAuth Redirect URIs.
  5. Paste your CRM's OAuth Redirect URL into the field and hit enter to save.
  6. Ensure Login with the JavaScript SDK is enabled and add your CRM domain to Allowed Domains for the JavaScript SDK.
  7. Click Save Changes at the bottom of the page.
6

Request Required Permissions (App Review)

To receive leads in live production, your Meta Developer App must be reviewed and granted specific permissions.

  1. In the Meta Developer Console, go to App Review → Permissions and Features.
  2. Search for and request Advanced Access for the following permissions:
PermissionPurposeAccess Level
pages_show_listList admin's Facebook PagesAdvanced
pages_manage_adsManage ads linked to pagesAdvanced
leads_retrievalDownload lead data from formsAdvanced
pages_read_engagementRead engagement dataAdvanced
App Review Required: The leads_retrieval permission requires you to submit a screencast demo to Meta showing how you use the data. Without this approval, leads will NOT be received from real users.
7

Subscribe Your Page to the App in CRM

This is a critical step. Even if webhooks are set up, you must tell Meta *which* Facebook Pages should send leads to your app.

  1. In your CRM, navigate to Admin Dashboard → Social Lead Master → Source Setup.
  2. Click Connect with Facebook to log in via the OAuth setup you configured in Step 5.
  3. Select the Facebook Page you will run ads from.
  4. Click the "Subscribe Page" (or "Enable Lead Sync") button.
  5. The CRM will call Meta's API to officially subscribe that specific Page to your webhook.
Common Mistake: Many users set up webhooks but forget to subscribe individual Pages. If you skip this step, Meta will NOT send any lead data.
8

Create a Lead Ad Campaign

  1. Go to Facebook Ads Manager.
  2. Create a new campaign with the "Leads" objective.
  3. Design your Lead Form with the fields you want to capture (name, email, phone, etc.).
  4. Publish the campaign. When users fill out the form, leads are automatically sent to your CRM.

Instagram Lead Forms

Instagram Lead Forms work through Facebook Ads Manager and use the same webhook infrastructure.

1

Link Instagram to Facebook Page

Ensure your Instagram Business account is connected to your Facebook Page (same as Social Media module setup). Instagram Lead Ads are managed through Facebook Ads Manager.

2

Create an Instagram Lead Ad

  1. In Ads Manager, create a campaign with "Leads" objective
  2. Under Placements, select Instagram (Feed, Stories, Reels, etc.)
  3. Create the Lead Form with desired fields
  4. Publish the campaign
3

Lead Data Flow

Instagram lead data flows through the same leadgen webhook as Facebook. No additional configuration is needed — if your Facebook Lead Ads are working, Instagram leads will automatically come through the same webhook.

No extra setup needed! Instagram leads use the same webhook endpoint and permissions as Facebook Lead Ads.

Webhook Configuration Details

How the Webhook Processes Leads

  1. Meta sends a POST request to your CRM's webhook URL with the leadgen_id
  2. CRM receives the event and uses the leadgen_id to fetch full lead data from Meta's Graph API
  3. Lead fields (name, email, phone, etc.) are extracted and mapped to CRM fields
  4. A new lead record is created in the CRM pipeline
  5. Optional: Notification sent to assigned sales agent
Real-time Processing: Leads are typically processed within 2–5 seconds of form submission. If you experience delays, check your server response time and webhook logs.

CRM Field Mapping

Map Facebook/Instagram lead form fields to your CRM's lead fields.

1

Navigate to Source Setup

In CRM, go to Social Lead Master → Source Setup.

2

Select Your Lead Form

Choose the Facebook Page and the specific Lead Form you want to map. The CRM will fetch available form fields from Meta.

3

Map Fields

Map each Facebook form field to a corresponding CRM field:

Facebook Form FieldCRM FieldExample
full_nameLead NameJohn Doe
emailEmail Addressjohn@example.com
phone_numberPhone+1 555 123 4567
cityCityNew York
company_nameCompanyAcme Corp
job_titleDesignationMarketing Manager
4

Set Default Values

Configure default values for new leads:

  • Lead Source: Automatically tagged (e.g., "Facebook Lead Ads")
  • Pipeline Stage: Choose which pipeline stage new leads enter
  • Assigned Agent: Auto-assign to a specific sales agent or round-robin
  • Lead Status: Default status for new leads (e.g., "New")

Testing Your Setup

1

Use Facebook's Lead Ads Testing Tool

  1. Go to your Developer App
  2. Navigate to Webhooks → Page → leadgen
  3. Click "Test" to send a test webhook event
  4. Check your CRM for the incoming test lead
2

Submit a Real Test Lead

  1. Preview your Lead Ad from Ads Manager
  2. Fill out the form with test data
  3. Submit the form
  4. Verify the lead appears in CRM within a few seconds
  5. Check that all mapped fields are populated correctly
3

Verify Lead Data

In CRM, check that:

  • Lead name, email, and phone are correct
  • Source tag shows "Facebook Lead Ads" or "Instagram Lead Ads"
  • Lead is in the correct pipeline stage
  • Assignment rules are working
Success! If the lead appears with correct data, your Social Lead Master integration is working perfectly.

Troubleshooting

ProblemPossible ReasonSolution
No leads arrivingPage not subscribed to webhookGo to Source Setup and click "Subscribe Page" for each Page
Webhook verification failsVerify Token mismatchEnsure the same token is in CRM settings and Meta Developer App
Permission denied errorMissing leads_retrievalRequest the permission via App Review with a screencast
Leads appear without dataField mapping incorrectCheck Source Setup → Field Mapping for correct mappings
Leads delayedServer response slowEnsure webhook endpoint responds within 5 seconds
Duplicate leadsWebhook firing multiple timesEnable deduplication in CRM settings (by email/phone)
Works in dev, not in productionApp in development modeSwitch app to Live Mode and ensure permissions have Advanced Access
Test webhook works, real leads don'tPage not linked to appSubscribe the specific Page in Source Setup
Debug Tip: Check your CRM's webhook logs (if available) to see raw incoming payloads from Meta. This helps identify if the issue is on Meta's side or the CRM's side.