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
Facebook Lead Ads Setup
Configure your Meta Developer App to receive lead data from Facebook Lead Ad campaigns.
Get Webhook URL from CRM Dashboard
First, get the Webhook URL that Meta needs to send leads to:
- Log in to your CRM as an Administrator.
- Navigate to Social Lead Master → Source Setup (or Settings).
- Scroll to the Webhook Configuration section.
- Copy the Webhook Callback URL (e.g.,
https://yourdomain.com/social_lead/webhook). - Copy or note down the Verify Token.
Configure Webhook in Meta Developer Console
Tell Meta where to send the lead data:
- Go to developers.facebook.com and open your App.
- If you haven't already, click Add Product and add Webhooks.
- In the left menu, click Webhooks.
- In the dropdown at the top, select "Page" as the object type.
- Click "Subscribe to this topic" (or "Edit Subscription").
- Paste your CRM's Webhook Callback URL and Verify Token into the respective fields.
- Click Verify and Save.
Subscribe to the leadgen Field
- After the webhook is verified, scroll down the Webhooks page to the list of Page fields.
- Locate the field named
leadgen. - Click Subscribe next to it.
- This instructs Meta to push data to your webhook whenever a user submits a Lead Ad form.
Add App ID and Secret Key to CRM
Your CRM needs your Meta App credentials to authenticate users and fetch lead details:
- In the Meta Developer Console, go to App Settings → Basic.
- Copy the App ID.
- Click "Show" next to App Secret, enter your password, and copy the secret.
- In your CRM, go to Admin Dashboard → Social Lead Master → Settings.
- Paste the App ID and App Secret into the provided fields and save.
Configure OAuth Redirect URL
To allow your users to connect their Facebook pages, you must configure Facebook Login:
- In your CRM's Social Lead Master → Settings page, copy the OAuth Redirect URL provided.
- In the Meta Developer Console, click Add Product and add Facebook Login for Business (or Facebook Login).
- Go to Facebook Login → Settings in the left menu.
- Scroll to Valid OAuth Redirect URIs.
- Paste your CRM's OAuth Redirect URL into the field and hit enter to save.
- Ensure Login with the JavaScript SDK is enabled and add your CRM domain to Allowed Domains for the JavaScript SDK.
- Click Save Changes at the bottom of the page.
Request Required Permissions (App Review)
To receive leads in live production, your Meta Developer App must be reviewed and granted specific permissions.
- In the Meta Developer Console, go to App Review → Permissions and Features.
- Search for and request Advanced Access for the following permissions:
| Permission | Purpose | Access Level |
|---|---|---|
pages_show_list | List admin's Facebook Pages | Advanced |
pages_manage_ads | Manage ads linked to pages | Advanced |
leads_retrieval | Download lead data from forms | Advanced |
pages_read_engagement | Read engagement data | Advanced |
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.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.
- In your CRM, navigate to Admin Dashboard → Social Lead Master → Source Setup.
- Click Connect with Facebook to log in via the OAuth setup you configured in Step 5.
- Select the Facebook Page you will run ads from.
- Click the "Subscribe Page" (or "Enable Lead Sync") button.
- The CRM will call Meta's API to officially subscribe that specific Page to your webhook.
Create a Lead Ad Campaign
- Go to Facebook Ads Manager.
- Create a new campaign with the "Leads" objective.
- Design your Lead Form with the fields you want to capture (name, email, phone, etc.).
- 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.
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.
Create an Instagram Lead Ad
- In Ads Manager, create a campaign with "Leads" objective
- Under Placements, select Instagram (Feed, Stories, Reels, etc.)
- Create the Lead Form with desired fields
- Publish the campaign
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.
Webhook Configuration Details
How the Webhook Processes Leads
- Meta sends a
POSTrequest to your CRM's webhook URL with theleadgen_id - CRM receives the event and uses the
leadgen_idto fetch full lead data from Meta's Graph API - Lead fields (name, email, phone, etc.) are extracted and mapped to CRM fields
- A new lead record is created in the CRM pipeline
- Optional: Notification sent to assigned sales agent
CRM Field Mapping
Map Facebook/Instagram lead form fields to your CRM's lead fields.
Navigate to Source Setup
In CRM, go to Social Lead Master → Source Setup.
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.
Map Fields
Map each Facebook form field to a corresponding CRM field:
| Facebook Form Field | CRM Field | Example |
|---|---|---|
| full_name | Lead Name | John Doe |
| Email Address | john@example.com | |
| phone_number | Phone | +1 555 123 4567 |
| city | City | New York |
| company_name | Company | Acme Corp |
| job_title | Designation | Marketing Manager |
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
Use Facebook's Lead Ads Testing Tool
- Go to your Developer App
- Navigate to Webhooks → Page → leadgen
- Click "Test" to send a test webhook event
- Check your CRM for the incoming test lead
Submit a Real Test Lead
- Preview your Lead Ad from Ads Manager
- Fill out the form with test data
- Submit the form
- Verify the lead appears in CRM within a few seconds
- Check that all mapped fields are populated correctly
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
Troubleshooting
| Problem | Possible Reason | Solution |
|---|---|---|
| No leads arriving | Page not subscribed to webhook | Go to Source Setup and click "Subscribe Page" for each Page |
| Webhook verification fails | Verify Token mismatch | Ensure the same token is in CRM settings and Meta Developer App |
| Permission denied error | Missing leads_retrieval | Request the permission via App Review with a screencast |
| Leads appear without data | Field mapping incorrect | Check Source Setup → Field Mapping for correct mappings |
| Leads delayed | Server response slow | Ensure webhook endpoint responds within 5 seconds |
| Duplicate leads | Webhook firing multiple times | Enable deduplication in CRM settings (by email/phone) |
| Works in dev, not in production | App in development mode | Switch app to Live Mode and ensure permissions have Advanced Access |
| Test webhook works, real leads don't | Page not linked to app | Subscribe the specific Page in Source Setup |