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

https://www.youtube.com/watch?v=d-voMne5bxI

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:

  1. Manage ads for ad accounts that you have access to

  2. 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)

  1. Form configuration

    1. Language

    2. Sharing: Restricted or Open. Letā€™s select Open.

Field names: Email and Full name

Tracking Parameters: Parameter name and Parameter value.

Create form (Content)

  1. Form name: Lead form demo

  2. Form type: More volume - (this totally depends on userā€™s preference)

  1. Intro: Use a new Image or Uploaded Image

  2. Greeting:

    1. Headline: Want to learn how to write 100% human copies with ChatGPT?

    2. Description : paragraph or List

Ā 

Just fill in your data below and I will send it to you.

  1. Questions:

    1. 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.

  1. Webhook Payload: </> fb_lead_gen_data (JSON Variable)

  2. LeadGen Id: fb_leadgen_id (Text Variable)

  3. 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

  1. First name: $.field_data[0].values[0] -> leadgen_first_name

  2. Last name: $.field_data[1].values[0] -> leadgen_last_name

  3. .Email: $.field_data[2].values[0] -> leadgen_email

  4. 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:

  1. From Phone number: The registered Phone No.

  2. To Phone number: Leadgen_phone (To the Phone no of the New Lead)

  3. 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.

  1. Selected Text

  2. Text to Speech Language: English (US)

  3. 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

  1. Name: refurl ad workshop

  2. Channel: Facebook.

  3. Status: Active

  4. Opt-in Flow: Leadgen follow up

  5. Custom Ref Parameter: access-premium-workshop

  6. 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.

Ā 

https://www.uchat.com.au/p/facebook/68761e6bd55862b42817eb8d1eaad971?ref=access-premium-workshop-ad1copy1

Ā 

ā€œ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

Ā