[#Blogged] How to capture Facebook leads in Salesforce?

Business Requirement - Client promotes his business on Facebook and would like to use Salesforce to store leads and contact them in future. What would be the solution to go ahead with it?

Solution- Rest API Integration/Data upload via Data Loader/Salesforce Lead Capture.

Let's go ahead easy Automation way, Salesforce Lead Capture.
Automate leads from Facebook Lead Ads directly into Sales Cloud
Lead Capture for Sales Cloud allows brands running demand generation campaigns on Facebook using Lead Ads to automate lead form submissions directly into Sales Cloud and map them to Lead Objects.

Screen Shot 2018-03-16 at 7.47.37 PM

This App is provided by Salesforce.

Let's start configuring it in our Developer Org.

Login to App-Exchange and download an app from the link below:

https://appexchange.salesforce.com/appxlistingdetail?listingId=a0N3A00000DrzmfUAB.

Install for Admins only, as we would need to setup it correctly. You can decide it according to your business requirements.

Screen Shot 2018-03-16 at 7.49.29 PM.png

After installing an Appexchange, we usually look in the Application tab for the app installed.

You can find a custom tab created as 'Lead Capture' in the All tabs in Salesforce.

Please authenticate your facebook account which has your business page.Make sure you are admin of the facebook page you wish to automate leads.

Screen Shot 2018-03-16 at 8.05.45 PM.png

Please select which business page(Facebook) you would like to link it.

You would be shown some active forms which fetch data from the Facebook business page.

Screen Shot 2018-03-16 at 8.05.56 PM.png

Map Form fields with Salesforce lead fields (Standard and Custom Fields).

Screen Shot 2018-03-16 at 8.06.05 PM

You can use Fixed Value for some required fields in the lead object.

Screen Shot 2018-03-16 at 8.06.30 PM

So whenever new lead would be submitted, It would be automatically transferred to Salesforce.

Screen Shot 2018-03-16 at 8.06.41 PM.png

How to differentiate between Normal leads and leads which would be inserted into Facebook?

Salesforce Lead Capture used an External ID field as Facebook lead ID ( External ID field is used to avoid duplicates in the records as it performs as a unique key ). You won't find it in the page layout but you can add it there.

Create a list view and in the criteria, you can use Facebook Lead Id not equal to NULL( Facebook_lead_id__c != NULL).List view would show all the leads which would be coming from Facebook.

As we installed the App in the developer org, How to test it if we configured it correct or wrong and lead is going correctly in Salesforce?

Thanks to Facebook, we have a Lead Ads Testing Tool.https://developers.facebook.com/tools/lead-ads-testing