Facebook LeadGen
Introduction
Lead Generation can be accomplished by the following:
Letting the Users filling the Form on either Messenger, Facebook, or WhatsApp. You can automate the process of sending those users Messages through UChat.
The Course is divided into Several Sections.
How you can connect UChat with your Facebook ads Environment
Create a Lead form using Instant Forms (can be used inside of FB Ads)
How you can send a Whatsapp Message to a New Lead
How to send an SMS towards a New Lead
Even how to call the New Leads if they have given their Phone Number
How to redirect the user back towards your Chatbot directly & instantly.
YouTube Video Link
Connecting your Facebook page inside of UChat
You need to first connect your Facebook Page inside of UChat.
Ā
Connecting Uchat with Facebook Ads Manager
You will need to connect your Facebook page first inside of UChat.
The same page that the instant form is linked to.
The same Facebook page that is linked to account you are planning to run ads.
Integrations inside Uchat
Integrations -> Others -> Facebook Ads
You need to connect your Facebood Ads Business Account over here.
Once you Click on the Button, it takes to the FB Ad Account Integration Page.
Once you Continue and you get one more page pops up where you need to Activate the points mentioned:
Manage ads for ad accounts that you have access to
Receive your email address <<email address>>
Once activated, you can click now on Done.
Going back to the UChat Integrations -> Others -> Facebook Ads š
You can see your Ads Business account is connected.
Cross Verify in Facebook, Uchat is assigned as CRM tool
Next we need to check UChat has been installed as your CRM Management System to receive the Lead Data.
Goto Facebook account -> Business Manager -> Integrations -> Leads Access -> CRMs:
Here you should ensure that UChat has been installed. Just to ensure that you can receive all the lead gen data.
In case it is not seen, just type UChat and search, you should be able to find it.
If you canāt find UChat or Chatbot app(for UChat partners), itās because you havenāt connect your Facebook page inside of workspace.
Please connect your Facebook Page inside of UChat platform.
Ā
Lead Generation can only be received on the Facebook Messenger Channel or the Omni Channel. These are the two channels where we can basically create this kind of automation.
Set the Admin for the Chatbot
Inside the Chatbot -> Tools -> Admins ->
It is important you sign as Admin here because all the Lead Gen Information will go towards this specific Admin, where you can set up all the automation.
You can find a new Admin and go for a Name search from the Bot users list and select one.
For receiving the Leads Generation Data, you can only use Messenger Profiles or your Web Chat Profile, whatever you prefer. Any of the two Profiles need to be the Admins of the Chatbot.
Now you are good to receive the data from the Meta Data, when a new lead signs up for your instant forms.
YouTube Video Link
Ā
Creating a Lead Form in Ads Manager
Create a New Campaign
Open your Ads Manager Account -> Create a New Ad Campaign
Under Campaigns, Create new Campaign -> Choose āLeadsā as your Campaign Objective.
Under Leads you can see:
Instant Forms - Capture the data and send it to UChat.
Messenger
Conversions
Carts
Once Lead forms chosen, Click āContinueā to go to āChoose a Campaign Setup pageā
Now Select on Manual Leads Campaign and press Continue.
Now letās give a Name to the Campaign as āLead form demoā.
Special Ad Categories : No change
Campaign Details: No Change
Advantage campaign budget: Off
Click āNextā Button.to switch to the Ad Set Section.
The AD Set Section.
The most important here is you are going to create a FORM. we leave the Ad Set section untouched and click on Next Button to move to AD Section.
The AD Section - Create Form
We need to scroll down to the Form Section called āInstant formā. Letās Create a form by Clicking on āCreate formā
Once you click on āCreate formā the following window pops up
Create form (Settings)
Form configuration
Language
Sharing: Restricted or Open. Letās select Open.
Field names: Email and Full name
Tracking Parameters: Parameter name and Parameter value.
Create form (Content)
Form name: Lead form demo
Form type: More volume - (this totally depends on userās preference)
Intro: Use a new Image or Uploaded Image
Greeting:
Headline: Want to learn how to write 100% human copies with ChatGPT?
Description : paragraph or List
Ā
Just fill in your data below and I will send it to you.
Questions:
Custom Questions: You can add additional Questions..
In case you need additional name like Business Name and other stuff, you need to add a new question.
Multiple Choice
Short answer
Conditional
Appointment request
Prefill Questions: It is the data, that Meta already has. It makes users to check the pre-filled data from their FB account, WA account or Instagram account and then press OK
Description: We keep your data safely stored on our servers and will not share with third-parties.
We just go with Prefill Questions and add Contact fields like Phone number, First name, Last name, Email address.
You can rearrange them in the order you need.
These are going to get populated Dynamically.
Privacy Policy: Itās also important to add Privacy Policy. You can link your Website for any kind of privacy Policy. Add the link of your Website Page.
Link text: TOS
Custom Disclaimer: You can also add this or you can leave as it is.
Message for Leads
Headline: Thanks, youāre all set.
Description: You can visit our website or exit the form now.
Call-to-action button: View Website | call Business | View file
Link: https://google.com/
Now we have our Form Published, so you can set up your own complete ad. Creating Ad is not the main intention of this Document.
You should know, how to setup your Facebook Ads.
Lead Form Testing
For testing the Leads Form, go to the website https://developers.facebook.com/tools/lead-ads-testing
Note: You need to select your correct page.
Now all the lead forms created will be shown. You can preview the form by clicking on āPreview formā link, and a Window will popup, showing your Ad along with the Form created.
All the user data gets automatically polluted without anything to enter. Just need to stream through the data mentioned in the form and just crosscheck the data is correct and press the next button.
You can see all the user data, first name, last name, Phone Number and Email on the form.
You can also create a Lead directy clicking on āCreate leadā and the lead gets created. By this we will be sending all the data towards UChat but before that we need to setup Automation for this.
YouTube Video Link
Create Automation in UChat
Creating Subflow in UChat for Automations
Letās create a Subflow called āFacebook leadgenā
Like earlier, we need to go to Automations and creating triggers inside the Automations.
Now we can create such a trigger inside the flow builder.
Click the Start Node -> Add Item -> Add Trigger.-> Facebook LeadGen and enable it.
Here you can save the data that we get back from Meta inside the Custom fields.
Webhook Payload: </> fb_lead_gen_data (JSON Variable)
LeadGen Id: fb_leadgen_id (Text Variable)
Lead Form Id: fb_leadgen_form_id (Text Variable)
You can also Implement certain filters if you like to / want to exclude certain people from signing up the Lead Form.
If you want to exclude them from the Automation, inside your UChat Chatbot is also possible.
You can have a Note for this trigger to have a little more of a Context what this trigger does. Letās press Save.
Now we have the Facebook LeadGen Trigger enabled on this flow directly.
Now we need to fetch the Userās Details.
Preview the Preload Data: Using Message Block, outputting the entire Payload data.
This is used to test the data as we need to setup our Automation on this to have sample data incoming .
As soon as I press the āCreate leadā button on the ādevelopers.facebook.com/tools/leads-ads-formā FB page as shown before, it tells āyour test lead has been sent.To create a new lead, please delete this one.ā
Letās see in Facebook Messenger Profile to see that, I have received the Payload.
Just received the payload and you can Inside the Livechat, you will see that we the created time, leadgen_id, page_id and form_id.
Ā
For example purpose, we will grab this data āleadgen_idā
Inside the UChat, we will remove the Message Block and go with the API Action.
Ā
Letās select the Facebook API related to āGet Lead Genā Action Function.
In the Lead Gen, we need the lead gen id, which we stored in the payload. Letās select the Custom field āfb_leadgen_idā and paste the Test Value inside to create the āTest Requestā
You can we have received the total Lead Gen data, letās do the mapping of the First name, Last name, Phone and email.
Letās do the mapping of the required Lead Gen Data
First name: $.field_data[0].values[0] -> leadgen_first_name
Last name: $.field_data[1].values[0] -> leadgen_last_name
.Email: $.field_data[2].values[0] -> leadgen_email
Phone Num: $.field_data[3].values[0] -> leadgen_phone
Also you can save the created time, if you want to:
Created Time: $.created_time -> leadgen_time_stamp
All these data can be exported to a Google sheet. In this way we are able to do lots of automations.
YouTube Video Link
Sending a Whatsapp message Template to the New Lead
Modify Subflow in UChat for WhatsApp Messaging.As you have seen earlier, we have mapped everything correctly. Now we are going to see the Usecase - Sending a WhatsApp Message template directly towards the New Lead.
The way to do this actually really simple, as follows:
In the previous Subflow called -> Facebook leadgen, we are adding the following blocks:
Action Block -> Notifications -> WhatsApp Template Notification
Now you can select the Phone number you need to send.
In our case, we have stored the same in āLeadgen_phoneā Custom Field with Number Variable.
You can also select the WhatsApp Message Template, from the drop down, you can select any of the WhatsApp Templates create earlier.
In our case, letās select āHello Worldā WhatsApp Message Template.
You can also test the receiving of the WhatsApp Template.
YouTube Video Link
Sending SMS over new Signup
Creating SMS Bot for the LeadGen Process
We are going to create / modify the subflow earlier created to send the SMS during LeadGen Process.
We are going with the same setup with little bit of tweaking.
First we need to ensure, you have connected your phone number towards your UChat workspace.
The SMS Channel should have some kind of phone number connected. For us we are connected with Twilio account for sending the SMS message. But you can see other accounts also like SignalWire and Message Media.
If you have any of these, you can create an SMS Bot. Once you set up your SMS Bot, you can use the registered number inside any of the Chatbots to send an SMS directly towards a user or a New Lead in this case.
Letās have a look at the flow. From the earlier feature of sending the WhatsApp Message, we are taking the same flow and removing the Action block connected with WhatsApp Message template and adding an Action block with SMS Notification.
Action Block -> Notifications -> SMS Notifications
Letās edit the SMS Notification Action block, by clicking on āEdit Actionā
Now we need to setup for the SMS Notification to send the SMS directly to the Lead Gen Phone number:
From Phone number: The registered Phone No.
To Phone number: Leadgen_phone (To the Phone no of the New Lead)
Message: Hey {{Leadgen_first_name}}, you have successfully submitted your data. Just type start to access your premium workshop. (same as the WA Message template)
Now on your Selected Channel, you will be able to set up a flow for this. Letās go to the SMS Channel -> Open Bot.
Now we will setup the flow for this. Letās go to Automation -> Keywords.-> Create New Keyword.
If message contains one of the following keywords: start
status : Active
Is Hotword: selected
Trigger Sub Flow: āLeadgen opt in workshopā
Now we have setup the Automation successfully.
As soon as the User responds towards the SMS that they had received as soon as the Leadgen data comes in, then we can use an SMS Notification to send the SMS towards the user.
From there we will be able to basically trigger the āLeadgen opt in workshopā flow by setting up a keyword trigger.
As soon as the user types āstartā or interacts with SMS responds to it, they automatically become a bot user inside the SMS Bot.
This is how easy it is to send an SMS to a new Lead or to an existing one as well.
YouTube Video Link
Sending a Phonecall through IVR
Creating Voice Bot for the LeadGen Process
We are going to create a Voice Call towards a new lead that signs up with your lead form on a FB Ad, or Messenger, WhatsApp or Instagram, wherever itās been displayed. Soon as they Signup, we would be able to call them if we have their phone.
In this usecase also, we are using the same phone number used for the SMS Bot.
We are going inside the main flow. The way that we are going to trigger this Voice Call is by referring to the Main flow at all times, but we need to know what kind of message that we need to send.
Going back to the āFacebook Leadgenā flow, we are adding the Action Block.
Action Block -> Notifications -> Phone Call.
Ref payload determines what kind of message that the Voice Call | Voice Bot is going to send towards the user.
For example, if this is an ad for a Premium Workshop access, letās say āadworkshopā - this will be the āref payloadā, which is going to be forwarded towards the Voice Bot phone number.
From Phone Number: The registered Phone Number with the Provider
To Phone Number: The Leadgen Phone Number stored inside the Custom field
Ref payload: adworkshop
Now are going to setup the Automation towards the Voice Bot side of things. Letās go the Main Flow of Voice Bot:
Now we need to determine what kind of Message we need to send. By default, any time Voice Bot is activated, Main flow is activated.
From the Main flow, you would be able to send the user to the different parts of your voicebot..
Trick is how to determine the payload that we basically saved inside the Action Block inside the previous Flow.
In the Main Flow -> Start node
Save Ref Payload to: (to the Custom variable of our won preference) letās say ārefā
As soon as the user is being called, this main flow will be activated. We would have received the payload of āadworkshopā.
Now we will set up the automation based on this. We will a add a Condition Block.
Condition Block -> if ārefā has any value
Then we are going to check which value it is having with another condition. If it doesnot got any value, it will just go towards to the regular Voice Bot main Menu Overview for example.
If the ārefā payload is āadworkshopā, now we can setup a Custom Message.
Letās say:
āYou have successfully submitted your data. Just type start to access your premium workshopā
Letās select Text, and set the āText to Speech Languageā to English(US). Actually you can choose from lot of countries and a lot of Variables from the drop down list. Choose the best preferred for you.
Selected Text
Text to Speech Language: English (US)
Message to the Leadgen User:
This is how you activate your Voice Bot on your IVR Flow, to be able to respond to any new Leadgen user that is coming inside of your OmniChannel Chatbot.
Make a Distinction on what kind of action you want to take after you capture the Lead Gen Data.
YouTube Video Link
Ā
Redirect users Directly towards Chatbot from the Lead Form
Getting Leads directly inside of Chatbot after Lead form submission.
At the very end of the Lead Form, we have got āMessage for Leadsā. You can customize this to anything that you like to.
Headline and Description and we also have a CTA
Call-to-action
View Website: āSelectedā
Call Business
View File
When we Select View Website, you can add a Ref URL under āAdd a Linkā .
You can shorten this Ref URL with a Link Shortner if you want to.
This Ref URL basically could also contain several kinds of Payloads which also directly activate certain data inside your own chatbot.
Letās go to Chatbot.
Tools -> Widgets -> New Widget. (Creating a New Widget)
Letās create a New Ref URL Widget.
Name -> refurl ad workshop
Now lets save and edit this new ārefurl ad workshopā
The great part of this refurl is you can select the channel where you want the users to Opt in.
You have different channels : Web | Facebook | WhatsApp | WhatsApp Cloud | Telegram | Line | Viber
Name: refurl ad workshop
Channel: Facebook.
Status: Active
Opt-in Flow: Leadgen follow up
Custom Ref Parameter: access-premium-workshop
Save Payload to Custom User fields:
Payload: leadgen_ad_data
Payload is basically a certain value that is saved to a specific CUF that you assign it to.
If you have this Ref URL, we can assign a Payload, an additional data source by adding two midlines ( - - ) and then a payload data.
The additional payload can be like āAdd Workshopā, āAdd Oneā, āCopy Oneā etc.,
You can add upto 10 different payloads, customize and save them to your CUFs.
Ā
Ā
āad1copy1ā value will then be stored in a CUF that is assigned under Payload list.
Letās give a name to the CUF - āleadgen_ad_dataā. This is the Custom field which will store the value āad1copy1ā
In the Ads Copy Lead form -> Message for leads -> Call-to-action text -> āaccess workshopā
This is an Additional Method in getting the users directly back towards your chatbot,
The Instant forms allows you to set up all kinds of Automations instead of going to Zapier or Pabbly connect to set all these kinds of automations.
You can create Automations very easily inside of the UChat Platform itself.
YouTube Video Link
Ā