The Direct Post interface is a simple way to collect data from your website forms in channelLEADS. No programming is necessary beyond setting up the correct fields in your HTML form.
If you want to submit leads from a program instead of from a web form, please review our channelLEADS REST API documentation. Note that Direct Post uses the REST API under the hood, so most of this page applies to API users as well.
The approach is this: you supply a form on your website and POST the form to our server. The information entered on the form will then be stored and ready for distribution. There are certain required fields (see “REQUIRED fields” below) that are necessary in order to process the leads. You may also add optional standard fields and define your own custom fields if you want to capture extra information about the prospective Lead.
Using Direct Post from a web form requires some setup in channelLEADS and some web work.
The sample form has html code you can cut and paste into a page on your website, test, and then customize as needed. It includes client side javascript validation to check for required fields. The only required customization is to add your Direct Post Key to the directPostKey hidden field value.
Your website Direct Post form can contain “standard fields” and “custom fields”. We recommend using standard field names whenever possible because it makes it easier to maintain consistency between multiple lead sources. Some of the standard fields are required – the form data must include a valid directPostKey, and contain data in the “email” field and “contact” field.
Field | Required | Hidden | Description |
---|---|---|---|
Y | Email Address | ||
contact | Y | Contact Name (first and last) | |
company | Company Name | ||
directPostKey | Y | Y | identifies this form to channelLEADS |
thankYouUrl | Y | user will be redirected to this URL after submitting form | |
phone1 | Phone Number | ||
street1 | Street Address | ||
city | City | ||
stateProvince | State or Province | ||
country | Country | ||
postalCode | Postal Code | ||
saveRecord | Y | for debugging: set to 0 to echo form data instead of saving lead | |
apiFlag | Y | when set, return XML response instead of thank you page, for automated submission only | |
comments | Y | see “spam trap” discussion below |
Notes:
The following field is required in order to create a new Lead:
<input value="" name="email" type="text" id="email" />
You must also include at least one of the following fields:
<input value="" name="contact" type="text" id="contact" />
The following hidden field is required in order to process the submission.
<input type="hidden" name="directPostKey" value="AAAA BBBB CCCC DDDD" />
There are several other standard fields you may optionally use in your lead data. The geography related fields are useful to category leads into markets and provide automated handling.
The optional standard fields include:
You may also include the following optional hidden fields to control aspects of the form processing:
To capture additional fields beyond the standard fields, prepend the name of the field with 'x-'. For example if your custom field is 'color', give it a form element name of 'x-color'. The captured fields will appear in the additional information section of leads as key value pairs. The 'x-' will not appear in the custom field name when displayed on the site.
Caution: Be careful not to use any of the standard field names listed above (ie: 'x-company'.) The custom field will trump the related standard field in these cases.
Forms on public websites are often targets for “spambots” – automated “spiders” that wander around the web looking for forms. The spambot puts its irrelevant message in whatever fields it can find, and submits the form in the hopes that the posted content will show up somewhere where it will be seen. These submissions would show up as bogus entries in your leads database. Quite annoying.
Spambots aren't very sophisticated, and they can be effectively defeated by using a “captcha”, the most common example being to ask your users to type in the text from a distorted text image. This works, but it's irritating to your users.
We use a simpler method called a spam trap or “honeypot”. We add a field to your form that users can't see, but that the spambots can't easily identify as a hidden field. The spambots will typically insert content into this field. If the field isn't empty, it's usually a spambot submission, and we reject it with an appropriate error message. The field contains a label that instructs users of alternative browsers (handicapped-accessible screen readers, for example) to leave the field empty. This method is very effective, and causes no problems for legitimate users.
To implement the spam trap, simply add the following hidden span tag containing the empty field 'comments' in your form:
<span style="display:none;visibility:hidden;"> <label for="comments">Ignore this text box. It is used to detect spambots. If you enter anything into this text box, your submission will be rejected.</label> <input type="text" name="comments" size="1" value="" id="comments" /> </span>
A javascript file is provided that implements client-side validation for your direct post form. The files can be loaded from the LEADpiper server as shown, or if you prefer you can download the files and host them on your server.
Add this in the <head> section of your html form:
<!-- LEADpiper REQUIRED --> <script type="text/javascript" src="http://[your channelSUITE install]/API/v2/js/leadsForm.js"></script> <!-- end LEADpiper REQUIRED →
LEADpiper will redirect the user to the specified “thank you” page after they submit the lead form. To enable the thank you page, put a full URL (beginning with http: or https:) in the thankYouUrl field.
If you don't specify a “thank you” page, the user will be shown a generic thank you page and they'll need to use their browser's back button to get back to your site.