# Setting Up Facebook Lead Adform

## Introduction

Facebook lead adform is an adon to Picky Assist services which helps you to get realtime alert and set different actions when someone fills the Facebook lead ad form. See more details [here](https://pickyassist.com/en/get-facebook-leads-in-whatsapp)

## Prerequisite

1. Facebook Ad Account with Lead Adform&#x20;
2. Facebook Lead Adform Adon Enabled in the Picky Assist Platform&#x20;

## Getting Start&#x20;

### Connecting  Facebook Ad Account

Business can connect a Facebook page which is linked with a Facebook ad account enabled with lead generation as a campaign objective

Login into Picky Assist Web Console then navigate to  **`Settings -> App -> Facebook Lead Adform -> Settings`**&#x20;

Then please tick all terms and conditions and click on **`"Sign Into Facebook"`** button as shown below;

![](/files/-MIc8BValab6lau2YtCU)

Then please login with your Facebook account and select the page which contains the lead form and connect it with Picky Assist&#x20;

Once the account is connected  you will able to see all the linked pages and can select the page then it will show all the lead forms you have created as shown below;

![](/files/-MIc9GSZ3sZb9ZyTHC9T)

Select the lead form by clicking the down arrow to map the form fields with attributes in the social crm

### Processing Duplicate Mobile Numbers

{% hint style="info" %}
Please note if a lead form is submitted from the same mobile number more than once then the system will ignore the duplicate form submission and will not take any action as configured, however if you wish to update the data fields and take action for every new form submits irrespective of checking the duplicate then please enable **"Update Duplicate Lead with New Form Data"** as shown below;
{% endhint %}

![](/files/-MUwyDjOrtZuvb5f_4Zz)

Once you enabled this feature the system will replace the value of the existing fields with new form data also perform the action set by you, by default system will not take any action if a duplicate mobile number is used to fill any of the lead forms in a project.

### Mapping Form Fields with Social CRM Attributes

You can map the form fields with Picky Assist Social CRM Attributes this helps you to get the lead data saved in Picky Assist and able to take different actions&#x20;

Click On **"Select Attributes"** which is shown against each form fields, then a popup will open as shown below;

From the popup you can select the Attribute from the social CRM to map it with the respective fields in the form.

![](/files/-MIjp1r_PMF1XSBSwM04)

{% hint style="danger" %}
Please make sure you have always selected the default channel since the outgoing messages will use the default channel to send messages.

**Mobile number mapping is mandatory in order to send SMS or WhatsApp Alerts, the mobile number should be always with country code.**
{% endhint %}

![](/files/-MImN9uDIT58fyyqBJjC)

### Setting Up Actions&#x20;

Actions help you to take various actions whenever a new lead form is submitted ,  available type of actions are listed [here](/setting-up-guide/smart-replies/train-module/smart-actions.md#list-of-available-actions)

![](/files/-MImMlKfMHU-s4Sx2ojt)

### Testing the Lead Adform&#x20;

In order to test the lead adform please click the URL <https://developers.facebook.com/tools/lead-ads-testing/> please make sure you have logged into the facebook page&#x20;

Then select the **Page** then it will load all the forms, please select the **Form** from the drop-down you would like to test as shown below;

![](/files/-MIu16srIIe3RyA_zT-R)

**Then Click on "Preview Form" fill any sample data to test the form and click on Create Lead button as shown below;**

<figure><img src="/files/VQrfxN14mHvi0N7vefZ3" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Make sure that our app has a webhook subscription for the selected page in order to sync the leads with our platform, our app id **2263304397246751**
{% endhint %}

**You will able to see a "Track Status" button as shown below click on that to see the status of request.**

<figure><img src="/files/OTBT5Pyf5Z4SYeOUejFb" alt=""><figcaption></figcaption></figure>

**This result will be shown on the screen as shown below, make sure our App ID 2263304397246751 is listed and Status should be "success" and HTTP Code is 200 as shown below;**

<figure><img src="/files/fY2q4fRLJUJUjkZs4sCu" alt=""><figcaption></figcaption></figure>

## Troubleshooting if you are getting any error &#x20;

If you are getting any errors or our App ID is not showing in the list then mostly the issue is because of the additional security in your Facebook Business Manager, if you are an admin then you need to login into your [Facebook Business Manager](https://business.facebook.com/) then navigate to **Integrations -> Lead Access** as shown below;

<figure><img src="/files/nETTUkKozTDHzhHRfPVa" alt=""><figcaption></figcaption></figure>

**It will open a new section on the right side as shown below where you need to click on CRM's tab and check whether you are able to see the "Picky Assist" name under the Connected CRMs. If you are not seeing our name then click on the "Assign CRMs" button as shown below;**

<figure><img src="/files/n6p43QdH8vt4cvQdDXfg" alt=""><figcaption></figcaption></figure>

**This will open a popup where you can see the "Picky Assist" and select the same and click on the "Assign" button as shown below, now you can go back to the testing tool and try once more by submitted a lead and it should work.**&#x20;

<figure><img src="/files/aHgBTWvmebLa0mdLRTnQ" alt=""><figcaption></figcaption></figure>

## Routing to A Connector - Action

This feature allows you to route the incoming lead details to a Connector which helps you make complex work flow like Filters, Actions, Delayed Messages, Trigger HTTP API etc.

{% hint style="danger" %}
It is always advisable to route to a new connector in which the Connecting URL is not configured in any of the 3rd party Platforms.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.pickyassist.com/setting-up-guide/setting-up-ad-ons/setting-up-facebook-lead-adform.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
