Import Leads from WordPress Contact Form 7
Started 1 year ago by Thulo Support Team in Thulo Cloud
This guide will help you to import leads from WordPress Contact Form 7.
Body
Thulo Cloud can import/capture leadsย from the most popular contact form (and any other customizable forms) forย WordPress Contact Form 7,ย together with theย Email Integration feature that is built into Thulo Cloud.
The process is very easy; once you configure the contact form to be compatible with the email integration, you will be able to import leads in no time, with the fields filled in the contact form automatically added for the imported lead.
We recommend you first read this whole setup article to get an idea of how the contact form fields will be mapped and how the leads will be imported into Thulo Cloud. Once you get familiar with the steps you need to perform to make this configuration work, you can move on to configure the full setup.
For the simplicity of this example and setup, we will use a minimal example for the Contact Form config with fields Name, Email, and Message (see below for a more detailed example).
Install Contact Form 7
If you already have Contact Form 7 installed and are familiar with it, you can skip this step.
If you havenโt already installed Contact Form 7, you must install the plugin from your WordPress dashboard area, From the left menu, navigate to Plugins->Add Newย and search forย Contact Form 7, After you find the Contact Form 7 plugin click on Installย and after installation click onย Activate.
We assume that you are already familiar with how Contact Form 7 works and how you can embed the form into the custom page. Contact us; if you are not, you can read more by clickingย here.
Configure Contact Form 7
In this example, we will use the basic Contact Form 7 configuration which comes with the form after installation.
After you install and activate the plugin from the WordPress admin menu, click on Contact->Contact Forms.
Choose the form you want to configure and click on the name.
Click on theย Mail tabย in the contact form toย configure the contact form email to be compatible with Thulo Cloud.
Additional Headers
Add your Thulo Cloud integration email configured inย Setup->Leads->Email Integration.
In the new line, add eq. Bcc: yourleadsintegrationemail@example.com
Make sure that the Reply-To header is set as shown in the image.
This isย the important part: in this case, when a user fills out the form, the contact form plugin will add BCC your leads email integration email, and the Thulo Cloud CRON job will be able to catch this email and import the lead with the provided fields.
Message Body
The point here is to wrap all form values and include them in the email message/body with:
<div id="field_LEAD_FIELD">[your-CONTACT-FORM-FIELD]</div>
After the email is sent, this field will be populated with the actual field value and will become eq.
<div id="field_LEAD_FIELD">John Doe</div>
You will need to replace LEAD_FIELD with the actualย lead field.
Use HTML content type.
In the Contact Form 7 mail tab, check Use HTML Content Type; in this case, the email will be HTML.
Available lead fields
field_name field_title field_email field_website field_phonenumber field_company field_description field_address field_city field_state field_country field_zip field_lead_value (v2.5.0)
Country Field
If you are passing aย country field, keep in mind that the country must have an ID from the Thulo Cloud database table for countries (tblcountries) or the name Eq. United States (without typos) because Thulo Cloud will compare the country name passed in the message body and find a suitable country ID from the Thulo Cloud countries table.
If the user writes United States, this will work fine, but if the user writes a country name that does not exist in the countries table or makes a typo,.ย In the Untited States, Thulo Cloud wonโt be able to identify the ID of the country from the countries table.
Custom Fields
In case you want to integrate a custom field for a lead, you can use custom_field_ID,ย Replace the ID with the actual custom field ID, which can be found inย Setup->Custom Fields.
If you use a custom field, the email message markup should look like this:
<div id="custom_field_ID">[your-CONTACT-FORM-FIELD]</div>
Eq. example for a custom field of typeย Select in Thulo Cloud: Click hereย to see the options configuration.
Eq. example for a custom field of typeย Select in Contact Form 7: Click hereย to see the option configuration.
Attachments
In the Mail Tab in Contact Form 7, simply add the field tagย in the File Attachmentsย Area.
Keep in mind that only attachment extensions allowed in Setup->Settings->General (Thulo Cloud installation) will be added while importing the lead.
Full example with more fields
Letโs say our Contact Form 7 has the following fields:
- Subject
- Name
- Website
- Phone number
- Company
- Message
Contact Form Fields
Our contact form field configuration should look like this (you can format it however you like):
ย
<label> Subject [text* your-subject] </label> <label> Your Name (required) [text* your-name] </label> <label> Your Email is required. [email* your-email] </label> <label> Website [text your-website] </label> <label> Phone Number [text your phone number] </label> <label> Company [text your-company] </label> <label> Your Message [textarea your-message] </label> [submit "Send"]
ย
Mail Tab Config
Click on the mail tab to configure the email body content.
You can get the available shortcodes of the field values at the top of the Mail Tab Config, where it says, โIn the following fields, you can use these mail- tags.โ
The email body content should look like this:
From: [your-name] <[your-email]> Subject: [your-subject] Name: <div id="field_name">[your-name]</div> Email: <div id="field_email">[your-email]</div> Website: <div id="field_website">[your-website]</div> Phone Number: <div id="field_phonenumber">[your-phonenumber]</div> Company: <div id="field_company">[your-company]</div> Message Body: <div id="field_description">[your-message]</div> -- This e-mail was sent from a contact form on Thulo Cloud (https://mycloud.thulo.com)
You can see howย all field values are wrapped within div with id=โfield_LEAD_FIELDโ, theย LEAD_FIELDย is actually from theย available lead fields
In this example the message that the user will write in the contact form, we are populating the lead description text area, which is suitable for this case.
Keep in mind thatย the subject wonโt be added to the leads section of Thulo Cloud because the subject is not suitable for any field that belongs to lead, You can either create a custom field or you will be able to view the subject by clicking on theย Email Activity tab in the lead modal, Clickย hereย to check how this will look.
Now, when a user fills Contact Form 7, the plugin will add your email integration email as BCC header and this email will also be sent to the email integration email.
The Thulo Cloud cron job will read this email, map all fields provided within the email message and import the lead in Thulo Cloud leads section.
-
No one is replied to this thread yet. Be first to reply!