Quantcast
Channel: Forms – ClickDimensions Training
Viewing all 14 articles
Browse latest View live

Programmatic Form Capture

$
0
0

NOTE: Programmatic form capture is an open-source community-supported project. This information is provided without warranty and is subject to change. ClickDimensions does not provide support for custom code that you develop. If you have questions about these code samples or how to get your programmatic form captures to work, post them on our Q&A forum.

ClickDimensions Form Capture is a service that allows form post data to be synchronized into Microsoft CRM. Once a Form Capture is configured, under the ClickDimensions Settings area, an Action URL is provided by ClickDimensions which represents the location to which the specific form will be submitted. There are 2 options to post data to the Form Capture location:

  • Replace the action attribute in existing HTML Form. This is the method previously outlined in this guide. For example, consider the following form:
    <form action= “http://analytics.clickdimensions.com/forms/h/aQmmV6psLk6yLb12C6j” method=”post” name=”frmWebCapture” id=”frmWebCapture”>
    <input id=”txtEmail” size=”25″ name=”txtEmail” />
    <input type=”submit” value=”go” id=”emaillistbtn” name=”Submit”>
    </form>

    The “action” attribute represents the location of the form capture. The txtEmail is the Email field which will be posted once the user clicks the submit button.

Important: the ClickDimensions tracking script must be present inside the page that contains the form. It must be after the closing </form> tag, and before the closing </body> tag.

  • Programmatically post the data using server side code. In order to implement this scenario, you must provide special parameters to the posted data which the Form Capture expects. These are:

    a. Visitor Key (parameter name: cd_visitorkey): Again, the form page must include the ClickDimensions tracking script for this to work. The script creates a cookie which contains a unique Visitor Key that is associated with the visitor who submits the form. There are 2 version of the key format:v[number]_[UUID]
    or
    UUIDFor example:v1294610734264_71186AF1FE674FE78A5CEEF96E0FB1A2
    or
    71186AF1FE674FE78A5CEEF96E0FB1A2The cookie name which holds this value is cuvid. In order to retrieve the cookie value you can use JavaScript as described here: http://www.w3schools.com/JS/js_cookies.asp

    b. Referrer Header:
    the referrer value determines the domain from which the form was posted. Because ClickDimensions validates domain origin for all analytics requests, it is important to include the web site domain.

    Here is an example of posted data which was captured by Fiddler:

    POST http://analytics.clickdimensions.com/forms/h/aZ7R5w1EbG0CIwwRohiwAW HTTP/1.1Accept: application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap, application/x-shockwave-flash, */*Referer: http://mysite.com/ Accept-Language: en-US,he-IL; q=0.5User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; MDDC; .NET4.0C; .NET4.0E; MS-RTC LM 8; InfoPath.3) Content-Type: application/x-www-form-urlencoded Accept-Encoding: gzip, deflateHost: analytics.clickdimensions.com Content-Length: 105 Connection: Keep-AlivePragma: no-cache Cookie: cuvid=v2294610734264_71186AF55E674FE78A5CEEF96E0FB1A2; cusid=1295380830094; cuvon=1295380830115; txtEmail=john@domain.com&Submit=go&cd_visitorkey= v2294610734264_71186AF55E674FE78A5CEEF96E0FB1A2

    The above data has been POSTed to the ClickDimensions Form Capture URL.

    Please note the cd_visitorkey value which is concatenated to the posted fields’ data (in this case it is a simple email address). The referrer value points to http://mysite.com because the form was posted from the mysite.com web site.

    It may also be helpful to refer to the MSDN article titled “How to: Send Data Using the WebRequest Class” at http://msdn.microsoft.com/en-us/library/debx8sh9.aspx. The article contains an example of how to post form data programmatically.

A full example in C# for sending posted data to form capture can be found here: http://clickdimensions.com/download/ClickDimensions.FormCapture.zip

 

Update: The below Java sample was shared by a ClickDimensions customer:

We successfully post to form captures with server side java code. Below is the central code. We’re not using the static success and error redirect urls defined in the Clickdimensions form captures, so I’ve just set them to ‘http://success‘ and ‘http://error‘. The method is checking response to decide if the post has succeeded or not.

private boolean createCRMContent(HttpServletRequest request) throws Exception {

 final String referer = request.getHeader("referer");
 final String visitorKey = getCookieValue(request.getCookies(), "cuvid", "-1");
 String postData = "cd_visitorkey=" + visitorKey;
 Enumeration<String> paramNames = request.getParameterNames();

 while (paramNames.hasMoreElements()) {
 String paramName = (String)paramNames.nextElement();
 String paramValue = request.getParameter(paramName);
 postData += "&" + paramName + "=" + URLEncoder.encode(paramValue, "UTF-8");
 }

 HttpURLConnection connection = null;

 try {

 // Create connection
 URL url = new URL("http://analytics.clickdimensions.com/forms/h/...");
 connection = (HttpURLConnection) url.openConnection();
 connection.setDoOutput(true);
 connection.setDoInput(true);
 connection.setInstanceFollowRedirects(false);
 connection.setRequestMethod("POST");
 connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
 connection.setRequestProperty("charset", "utf-8");
 connection.setRequestProperty("Referer", referer);
 connection.setRequestProperty("Content-Length", "" + Integer.toString(postData.getBytes().length));
 connection.setUseCaches(false);

 // Send request
 DataOutputStream wr = new DataOutputStream(connection.getOutputStream());
 wr.writeBytes(postData);
 wr.flush();
 wr.close();

 // Get response
 InputStream is = connection.getInputStream();
 BufferedReader rd = new BufferedReader(new InputStreamReader(is));
 String line;
 StringBuffer response = new StringBuffer(); 
 while((line = rd.readLine()) != null) {
 response.append(line);
 response.append('\r');
 }
 rd.close();

 return response.toString().toLowerCase().contains("http://success&quot ;

 } catch (Exception e) {

 throw e;

 } finally {

 if(connection != null) {
 connection.disconnect(); 
 }

 }

}

public static String getCookieValue(Cookie[] cookies, String cookieName, String defaultValue) {
 for(int i=0; i < cookies.length; i++) {
 Cookie cookie = cookies;
 if (cookieName.equals(cookie.getName()))
 return(cookie.getValue());
 }
 return(defaultValue);
}

Integrating Forms using Form Capture

$
0
0

ClickDimensions Form Capture records allow you to integrate an existing form with your CRM. Before integrating your form, please make sure that you have read this article. There are a few things that you need to make sure are in place before going through the steps below.

In this article we will cover how to create a Form Capture record, adding Form Capture fields, and taking the final steps in integrating your web form to CRM.

Step 1: Create a new Form Capture record

Go to Settings > ClickDimensions > Form Captures


Create a New Form Capture record.

In the new Form Capture record, enter the following fields:

  • Name: required This is the name of your form.
  • Campaign: You can associate a Form Capture record with a Campaign record in CRM. If you do associate this Form Capture with a Campaign record, you will be able to see the Posted Form records in the Campaign record.
  • Visitor Entity: When a form is submitted, ClickDimensions checks the email address and looks for a Contact or Lead in your CRM who contains the same email address. If ClickDimensions does not find a match, ClickDimensions will create a new record for you. The Visitor Entity lets you choose which entity you want ClickDimensions to create  – Lead or Contact.
  • Redirect on Error: required If an error occurs, such as the visitor not filling in a required field, the visitor is redirected to the URL entered in this field. It is a good idea to have a dedicated page for an error page so you can give the visitor proper feedback, such as forgetting to fill in required fields, etc…
  • Redirect on Success: required When the form is submitted successfully, the visitor is redirected to the URL entered in this field. This page should give the visitor confirmation that the form was successfully posted.

After entering the necessary fields, click Save.

Step 2: Add the Form Fields

Now, we need to tell CRM, which fields will be in this form. To do that we are going to add Form Field records as a Form Capture Field. On the left navigation panel, click on Form Capture Fields.

In the top left corner, click on Add New Form Capture Field.

A new Form Capture field record will open. Enter the following fields:

  • Form Field: required Use the look up field to select the Form Filed record you want to add to the form.
  • Label: Enter the Label for your field. For example, if this was your first name field, you would enter something like First Name.
  • Override in CRM:  This field determines if the information entered in the form will replace any information that exists in CRM. For example, you have mapped your Last Name field to the Last Name field in a Contact record. If you choose Yes for Override in CRM, when someone submits the form, anything they enter in the Last Name field in the form will replace what is currently in the Last Name field in the Contact record.
  • Required: This will make the field required. If you do select Yes, we recommend you use JavaScript to alert the visitor they forget to fill out a required field.

Once you’ve filled out all of the necessary fields, click Save, and repeat for the rest of the fields.

After adding all of the Form Capture fields, you will see a list of the form fields.

Step 3: Connecting the Form Capture record with your HTML Form

After saving your Form Capture record, you’ll notice that the Form Action/Location filled contains an URL. This is the action URL that you will place in the HTML form.

Copy the URL in the Form Action/Location field

and paste it as the action URL in your HTML.

Tip: If you wish to programmatically post forms through ClickDimensions to your CRM – for example, if you have an existing form that sends data to another database and you need to continue to do that in addition to posting to CRM - check out the examples of using custom code to post forms on our community forum: http://help.clickdimensions.com/forum/?vasthtmlaction=viewtopic&t=5.0

That’s it! Your form is now integrated. You can now submit information directly into your CRM.

Steps to Check Before Using Form Capture Records

$
0
0

ClickDimensions Form Capture records allow you to integrate an existing HTML form on your website to your CRM. By using Form Capture, you will be able to capture information submitted through forms in your CRM environment. In this article, we will go through the key elements that need to be in place before integrating your form with Microsoft CRM using ClickDimensions.

1. Tracking Script

The ClickDimensions tracking script must be installed and working on the page that contains the form.

A good way to check to see if the tracking script is working, is to go to the page on your website. Then in CRM, go to Marketing > ClickDimensions > Page Views. Do you see that page listed?

If you don’t see the page listed, you might need to check a couple of things:

1. Did you create a Domain record in CRM that contains the same domain as the website you’re tracking?

2. Does the domain in the tracking script match the domain of the website you are tracking?

2. HTML Form Field Id and Name

The id and name values must exist and be identical for each form field in your HTML form.

For example, a First Name field line of HTML should look like this:

The id  and name values are exactly the same. For the last name field, you could have “id=’txtlastname’ ” and “name=’txtlastname’ “. The id and name value will change for every field, but they must match in each field.

3. Creating Form Field records in CRM

In order to map the information to CRM, you will also need to create Form Field records in CRM for each field in your HTML form.

To learn how to create Form Field records,learn about the different types available, and how to map the fields to Lead and Contact records read this article.

IMPORTANT!

The Form Field ID field is incredibly important when using Form Capture. For each Form Field Record, the ID field value must match the id value in the HTML form field. If we take a look at the First Name field again, the HTML id is “txtfirstname”

Therefore, the ID field in the Form Field record must also contain “txtfirstname”.

For every field you create the Form Field record’s ids must match to the HTML field’s ids. If they do not match, your form will not work.

4. Email Address Field

You must include an Email field in your form in order to capture who is filling out the form. ClickDimensions relies on the email address that people submit as the unique identifier in CRM. When someone submits a form (including the email address), ClickDimensions scans your Leads and Contacts in CRM to see if any of the records contains the same email address.

If there is a match, ClickDimensions will pair that form to the Lead or Contact in CRM. If there isn’t a match, ClickDimensions will create a new Lead or Contact in your CRM (based on your preference).

The Form Field record for the email address field has to have the type “Email”, in order for ClickDimensions to know which field contains the email address. If the email field does not have type “Email”, ClickDimensions not be able to identify the visitor, because it views that field as another text field.

If you are 100% sure that everything above is completed, you are ready to move to the next step in integrating your form with ClickDimensions: Integrating Forms using Form Capture.

Publish Metadata

$
0
0

After installing ClickDimensions in Microsoft CRM, you must publish your CRM’s metadata to our system. Publishing your CRM’s metadata will make custom fields available for use in creating Email Templates or when mapping Form Fields for use in a ClickDimensions Form. (For example, if you have added a field to the Contact entity to track the Contact’s eye color, this field will not be available to include as dynamic data in an Email Template unless you first publish your metadata.) See the article “Personalization” for more detailed information.

NOTE: You should publish your metadata anytime you add new custom fields to the Lead, Contact or Account that you wish to be available for use within ClickDimensions.

To publish the metadata, follow these steps:

  1. Open CRM in your browser and navigate to Settings > ClickDimensions Settings.
  2. Click the “Metadata” button:
    metadata
    A dialog will alert you in a moment that the metadata has been published:
    metadata-published

What to do next:

Embed Web Content

$
0
0

Once you’ve created a Form, Survey, or Landing Page you’ll want to embed it in an email or on your website in some way.

Press the Embed Button on the Web Content you created.

Embed Button

Then you’ll see this window with your different options:

Embed As Link: This will take you straight to the form on its own page. Use this in an email or on your website.

Embed As Iframe: Place this Iframe code on your website within the <body> tags.

Embed As Widget: Place this code on your website within the <body> tags. The Widget will allow for CSS to be applied to it. (Not available for Landing Pages)

Place the iframe or widget code on your site by embedding the it in the HTML of the web page.

iframe Code

You can then see your form in action on your website.

Form On The Website

Test the form and you will see your confirmation message.

Confirmation Text

ClickDimensions Actions

$
0
0

With ClickDimensions Form Actions, you can specify certain actions to trigger once someone has submitted a form, survey, and subscription management pages created with ClickDimensions. In this article, we will cover every form action and what it will do in CRM.

In the Form or Survey editor, there is a tab called Form Actions. Under the Form Actions tab, you’ll see a list of all the available actions in the right column.

To add a Form Action, click the action on the right and drag it to the left.

Add to Marketing List

The “Add to Marketing List” will add the person submitting the form to a specified Marketing List. When you add the Marketing List action, use the look up field to specify the Marketing List(s).

Please make sure that you do select a Marketing List with the correct member type. For example, if a Lead submits the form, that Lead will only be able to be added to a Lead Marketing List. It might be a good idea to make sure that you have a Marketing List for leads and contacts (if applicable).

Once the Marketing List(s) have been added, you will see it listed in the Marketing List Action.

Follow Up

The “Follow Up” action will create an activity record in the prospect’s Lead/Contact record after the prospect submits the form. In the task window, you can

  • Select the Activity Type (Task or Phone Call)
  • Enter the Activity Subject and Activity Content
  • Assign the activity to a CRM User (required)
  • Set a Due Date.

This action will create an Activity record in the prospect’s record with the information entered.

Email Notification

An “Email Notification” action will send an email to a CRM User(s). In this activity window

  • Select the User(s) you would like to send the notification to
  • Enter the Subject line of the email.
  • Notify Record Owner: this field will send the notification to the Owner of the Lead/Contact who submitted the form.
  • Enter any content in the text box field.

Once someone submits the form, the User will be sent an email containing the Subject, Message, and the information submitted. Here is what the email will look like:

Team Notification

If you have created a Team through CRM you can also email each member of that Team when someone has submitted a form, survey, or their subscription preferences. It functions very similar to the Email Notification Action above:

  • Select the Team you would like to send the notification to.
  • Enter the Subject line of the email.
  • Enter any content in the text box field.

Once someone submits the form, survey, or their subscription preferences, the entire Team will be sent an email containing the Subject, Message, and the information submitted.

Campaign Response

If you have associated the Web Content record for your form with a Campaign record in CRM, the Campaign Response action will create a Campaign Response in the associated Campaign record.

In the action window, enter the Name and Content for the Campaign Response record.

Auto Responder

The “Auto Responder” action will send an email to the prospect who filled out the form. The Auto Responder window resembles a simplified version of an Email Send record. You will need to…

  • Select an Email Template (required)
  • Enter a Subject line for the email (required)
  • You can choose if the email will come from the prospect’s record owner in the Send From Owner field
  • Select a User record for the From Name and From Email. By selecting a User record, the From Name and From Email fields will populate with the User’s information  (required)

Assign

The “Assign” action will give the specified user ownership of the lead or contact record that is created or updated when the form is submitted. Use the lookup button to find the desired user, or type in the name of a user.

Assign Action

Click Save

Always make sure to click the Save button in the Form Builder to save any changes made to the Form Actions. Also, if you want to remove an action, click the red button in the top right corner of the action’s window.

Profile Management

$
0
0

Profile Management allows you to put a link to a form in your emails that will pre populate with that Contact or Lead’s information. This means you can show them what information you already have and let them update the current information and/or add new information.

Start by creating a Form or just opening one you’ve already created (Settings > ClickDimensions > Web Content).

In the Designer of the Form you’ll see two buttons Lead Attributes and Contact Attributes:

Click on the one that refers to the type you’ll be sending to (or both). You’ll be able to add which fields will be on this form or any other form you’ll be using Profile Management with.

IMPORTANT: Every form does not have different Attributes. No matter which form you open the Attributes you’ve added will be the same. So, don’t change the Attributes for each form, just add any additional fields if you create another Profile Management Form.

Make sure all fields that you want to update are set to Override in CRM. (Go to the Properties of that field in the Designer).

Now Save your Attributes and Save the Designer.

When you’re creating your Email Template, you need to insert the Profile Management link. To do this click on the Profiles button in the Editor.

This will produce a list of all Forms you’ve created. Choose the correct form and a link will be inserted into the email.

Now when you send out the email and someone clicks on the link, their information will already be in the fields if it is in CRM.

IMPORTANT NOTE: If the Email is changed it will create a new Lead/Contact. If you want them to be able to change their Email Address, create one field that says Old Email Address and make that Email type field and map it to the Lead/Contact Email Field. Create a second field that says New Email Address that is type Text and mapped to the Lead/Contact Email field and choose Override in CRM when you add the field to the form.

This will create a Posted Form Record and update the Lead/Contact Record with the new information.

Create a Form with the Form Builder

$
0
0

With ClickDimensions, you can build your own forms or you can integrate ones that currently exist on your website.

Form Fields can be created before you create the actual form or during this process.

IMPORTANT: Your CNAMEs and Domain records also need to be set up before creating your forms.

Step 1: Create a Web Content Record

To create a ClickDimensions form with the Form Builder go to Settings > ClickDimensions > Web Content.

Web Content

Press the New button to create a new record.

New Web Content

A new Web Content record will appear.

New Web Content Records

In the new record, enter the following fields:

Name: This is the reference name of the form. You could use the title of the page that will contain the form – for example: ‘Contact Us’, ‘Newsletter Sign-up’.

Type: choose Form

Domain: Select a domain record you want to associate with the form. Make sure that you select the domain record that matches the domain of the page that will contain the form.

Create New Visitor As: Choose which type of record to create in your CRM if it does not match an existing Lead or Contact.

Tip: When an Anonymous Visitor fills out a form and his or her email address does not already exist in a Lead or Contact record in your CRM, ClickDimensions automatically creates a record with the information provided on the form. In the Create New Visitor As field, you can specify if ClickDimensions will create a Lead or a Contact record.

Campaign: (Optional) If you link a CRM campaign to this Form Capture record, all associated Posted Form records will be linked the campaign you specified. You will be able to view all of the Posted Form records in the Campaign record.

Auto Responder Email Template: (Optional) link an Email Template record to use for an auto-respond email. When someone completes a form on your site, ClickDimensions will send the Email Template via an Email Send record, which will allow you to see all tracking information regarding that email.

Once all of the required information is entered, click Save.

Step 2: Add the Form Fields to Your Form

Click the Design button to start adding your form fields to the form.

Design button

That will open the Design window.

In the Design window, you will see the Filter field is set to Form Fields on the right and there is a list of Form Fields. To add them to your form, simply click on the form field you want to add and drag it to the Form column on the left. If you haven’t created your form fields already you may press New at the bottom and create them straight from here. To learn more check out this article.

The Submit button is also moveable on the bottom.

As you drag and drop the fields to the left a red bar will appear and the field it will be dropped into will turn a darker color of blue.

Repeat until all the fields you want in the form  have been added.

IMPORTANT: Keep in mind that you’ll always want to have an email field on the form so that if someone is already in your CRM and they fill out the form, the information will be mapped to that person’s record. Whether the form is mapped to an existing person or not depends on the email field and if the email that they provide matches an email on an existing record. It will check the Email, Email Address 2, and Email Address 3 fields of all records. [If there are no matches, it will then check to see if their Visitor Key (created when a cookie is placed in their browser, and unque to that browser) matches an exisiting Lead or Contact's Visitor Key. If it matches neither, ClickDimensions automatically creates a record with the information provided on the form.]

Once the fields have been added you can click and drag the fields in the Form column to re-arrange the order of the form fields.

Step 3: Add Form Components

To add components, change the Filter drop down field to Form Components. Just drag and drop these just like the form fields.

Here is a list of the following Components that you can include in your form:

Section Title: This allows you to place a title/text anywhere on your form.

CAPTCHA: This is a slide button that users must slide before they submit the form so they can prove they are a human and not a computer.

Line: A line can be placed anywhere on the form.

Page Break: This will place a next button on the bottom of the page, and place what is after this component on another page. Once they’ve pressed next, there will be a previous button on that page. You can place as many Page Breaks in a form as you’d like.

HTML: Place this component in your form to add text, images, or any html.

File Upload: This allows the person submitting the form to upload a file with the max size of 10MB with their submission. Most file types are allowed, however .exe’s are not. The file will be saved in the Notes section of the corresponding Posted Form Field record. Please Note: The dedicated ClickDimensions user needs to have the appropriate permissions to create a note in CRM. This is required in order to allow ClickDimensions to create a note in the Posted Field record with the file that was uploaded.

Regardless of the maximum file size you configure for the File Upload component, the maximum file size for attachments in your CRM is governed by the System Settings in the Administration area of CRM:

Step 4: Edit the Properties of your Form Fields and Components

Double click on any of these fields or components once you drop them into the form, or select one and chose Properties to edit the field or component.

The properties window will appear. For Form Field Properties there are three different sections: Display, Formatting, and Mapping.

In the Display section, you are able to change the Label of the form, insert a Default Value, make the field required, make it read only, and change the color, font, and size of the label.

In the Formatting section, you can change the width of the label of the field and the width of the actual field by selecting the number of columns you want the label and/or field to span. You can also alter the Validation of the form.  This means that if someone types in a character that you put in the Set custom regex field in this particular field, then it will not submit the form and will give them the error message you tpe in the Set error message field when they press submit. (For example, making sure an email address is in the proper format: someone@something.something.)

 

Also, for form fields of type Email, you can see an additional option (pictured here): Filter free email addresses. This will not allow any of the listed email domains (hotmail, gmail, yahoo, aol) to be submitted as part of an email address. This feature is useful if you want to make sure your customers submit their business or professional email address rather than a personal one.
In the Mapping section, you can specify which fields you want to map your form field to in Lead and Contact records. You can also specify if you want the information submitted in the form to override any information currently in the Lead/Contact record field.

 

Please note that Override in CRM will show up for form fields of all types except Email. This is because overriding this value would create a new Lead or Contact in CRM. For more information on the details of this process, click here.
Press OK when you are finished making the necessary changes.
Each of the different Components also have different Properties that you can edit.

 

Step 5: Make Additional Changes

Remove a Field
 If a field needs to be taken off of a form, select it and press Remove in the top ribbon.
Remove Field
Edit the Properties of the Form

Some style elements of the form can be changed, such as text and margins. To do so, click Properties in the Form section of the ribbon.

Form Properties

This will open the Form Properties window. In this window, you can specify the Font Name, Font Size, and Margins for the Form Fields/Form (the Font Name and Size will apply to all form fields, if you have not already specified a Font for an individual field). The text on the submit button, the color or image of the button, and the alignment with in the cell of the button can be changed. You can also change the labels of the previous and next buttons used in the form.

Step 6: Enter the Confirmation Text

In the Form Builder you are able to create confirmation text that will appear once the form has been successfully submitted or redirect to another page. To edit the text or redirect, click on the Confirmation Text button.

Confirmation Text Button

From here, you can use the HTML Editor to edit and style your confirmation message to match the look of your website or send the user to a different page.

Confirmation Text

Or redirect the visitor by placing the URL of the website into the redirect box.

Confirmation Redirect

Only fill out either the HTML editor or the Post Redirect field because only one will show.

Click Save and Close to save the changes made to the confirmation text.

Step 7: Preview Your Form

You can view the form by clicking the Preview button.

Preview Button

This will open your form in a new window. The form is not functional, so you will not be able to submit the form and see the confirmation message in the preview window.

Step 8: Add Form Actions

The Form Builder also gives you the opportunity to specify some actions to take once the form has been posted to CRM. These actions include adding the Contact/Lead to a marketing list, creating a task for the Contact/Lead, sending an Email Notification, sending an auto response to the person who filled out the form, and creating a Campaign Response. Click here to learn more about each of these options.

Step 9: Publish Your Form

Once you are ready to publish your form, click the Embed button.

Embed Button

This will open a window that contains URL to the form, the Iframe code, and the Widget code for you to insert into your website. To learn more about the ways you can Embed your form click here.

Posted Form records will now start to come into your CRM containing the information submitted in the form.


Create Individual Form Fields

$
0
0

IMPORTANT: Your CNAMEs and Domain records also need to be set up before creating your forms.

Whether you are creating your forms in Microsoft CRM using the Form Capture records or the Form Builder, you will start by creating Form Fields. If you have an existing web form, look at the forms on your web site and list all the fields that are used on these forms. If you are creating a new form using the Form Builder, make a list of the fields you want to include in your form. In CRM you will create a single Form Field record for each field.

For example, if you use ‘First Name’ on multiple forms, you will need to create this as a Form Field only once in Microsoft CRM.

Keep in mind that you’ll always want to have an email field on the form so that if someone is already in your CRM and they fill out the form, the information will be mapped to that person’s record. Whether the form is mapped to an existing person or not depends on the email field and if the email that they provide matches an email on an existing record.

NOTE: In order to map custom fields that you’ve added to your Contact and Lead entities, you must first publish your metadata on the ClickDimensions Settings page.

Navigate to Settings > ClickDimensions > Form Fields.

Form Fields in the Menu

In the Form Fields grid choose New to create a new Form Field record.

New Form Field

The new Form Field record will appear.

Form Field Record

On the Form Field record enter the following fields:

Name: This is a reference name for the form field in CRM

Form Field Id: If you are planning on using the Form Builder, enter any value here, such as “txtFirstName”.If you plan on integrating your forms with Form Capture record, enter the input id values used in your existing web form. To learn how to do this read the 2nd Step and the Important section of this article.

Field Type: Choose a value from the drop down list.

Type Menu

Tip: If you are creating an email field, make sure to choose the type Email not text. If you choose text for the type for an email field, ClickDimensions will not be able to know the field contains an email address and will not connect the Posted Form record with a Lead or Contact record.

Mappings: The mappings section is different for each Type you choose.

Type: Email

Type Email

Email

Type: Text

Type Text

Text

Type: Text Area

Type Text Area

Text Area

Type: Integer

Type Integer

Integer

Type: URL

Type URL

URL

Type: Decimal

Type Decimal

Decimal

Type: Date

Type Date

Date     Date Pop Up

Type: DateTime

Type DateTime

DateTime     DateTime Pop Up

Type: Money

Type Money

Money

Type: List (Drop Down)

Country list form field

The question “Would you like to map the posted values to picklist field or text field?” refers to the field in the contact or lead record you want to map to. What type of field is it in the record? Once you’ve checked one or the other, the Lead Text Map and Contact Text Map values will change accordingly. In those drop downs are the choices like those in above types. The Publish Custom Fields button will sync ClickDimensions and CRM, which informs ClickDimensions of any custom fields that you have created in CRM. Doing this will cause the custom fields to appear as options in the Lead and Contact Map lists.

Note: If you choose Picklist Field you will have two more fields to fill out, Lead Picklist Value and Contact Picklist Value. These are shown in the next type, Checkbox, below.

Add each of the choices from your list to the box by clicking the green plus button. The Label field is how the item will be listed in the menu. The Value field is what will be placed in the lead or contact’s record if they choose that item.

country list form field

When you are finished creating all of your choices, press the Save button in the Items box.

List

Type: Checkbox

Newsletter checkbox form field

This works the same as the List except you can only and must have two choices in box. Here, Picklist Field is chosen. Now Lead Picklist Value and Contact Picklist Value are available. These drop downs show what you can map your items to in the lead and contact records. In this example, the details for the True option are shown. When someone checks the box, you want the picklist field to be Yes in their record, and if they don’t check it, it will be No in their record.

CheckBox

Type: Hidden

Type Hidden

When you’re done, chose Save and Close. Next, if you’re creating a new Form click here to find out how, and if you’re integrating an existing form click here.

Introduction to Forms

$
0
0

What are Forms Used for?

Forms allow your visitors to submit information such as their name, location, and email address, which you can then store in your CRM. Such information can be used in a great variety of ways and can help you, for example, see in which areas your product has garnered the most interest, add customers to your email lists, or even identify new visitors. Forms can be embedded in landing pages or directly on your website, and submitted forms can be tied to the Lead or Contact that supplied the information.

What are Form Builder and Form Capture and when do I use each?

Form Builder and Form Capture are the two different ways you can make a form in ClickDimensions. It is important to choose which type of form you would like to make before getting started, as the set up is different for each.

Form Builder allows you to create a form from scratch with our easy drag and drop editor. Any submitted information will be stored in your CRM automatically.

Form Capture uses an existing HTML form on your website to store submitted information in your CRM.

IMPORTANT: You must set up your CNAMEs for forms to work properly. For more information on this process, please click here.

How to Create a Form

 

Form Code Editor

$
0
0

Once you’ve created your form with the Form Builder, you can customize it even more with the Form Code Editor. This editor will allow you to add JavaScript and also to change or add CSS to the form.

[tab name="CRM 2013"]


With in the form builder click on Form Coder.

Code Editor Button
You will then see this window where you can read the HTML of the form, view and edit the CSS, add JavaScript, and then view the preview of what your form will look like with your changes and additions.
Code Editor Blank

 

You can always reset the CSS and/or the JavaScript back to what it was to begin with. The changes will be applied to the form once you press “Save”.

[/tab]
[tab name="CRM 2011"]


With in the form builder click on Form Coder.

2011 - Code Editor Button
You will then see this window where you can read the HTML of the form, view and edit the CSS, add JavaScript, and then view the preview of what your form will look like with your changes and additions.
2011 - Code Editor Blank

You can always reset the CSS and/or the JavaScript back to what it was to begin with. The changes will be applied to the form once you press “Save”.

[/tab]
[end_tabset]

Programmatic Form Capture

$
0
0

NOTE: Programmatic form capture is an open-source community-supported project. This information is provided without warranty and is subject to change. ClickDimensions does not provide technical support for custom code that you develop. If you have questions about these code samples or how to get your programmatic form captures to work, post them on our Q&A forum.

ClickDimensions Form Capture is a service that allows form post data to be synchronized into Microsoft CRM. Once a Form Capture is configured, under the ClickDimensions Settings area, an Action URL is provided by ClickDimensions which represents the location to which the specific form will be submitted. There are 2 options to post data to the Form Capture location:

  • Replace the action attribute in existing HTML Form. This is the method previously outlined in this guide. For example, consider the following form:
    <form action= “http://analytics.clickdimensions.com/forms/h/aQmmV6psLk6yLb12C6j” method=”post” name=”frmWebCapture” id=”frmWebCapture”>
    <input id=”txtEmail” size=”25″ name=”txtEmail” />
    <input type=”submit” value=”go” id=”emaillistbtn” name=”Submit”>
    </form>

    The “action” attribute represents the location of the form capture. The txtEmail is the Email field which will be posted once the user clicks the submit button.

Important: the ClickDimensions tracking script must be present inside the page that contains the form. It must be after the closing </form> tag, and before the closing </body> tag.

  • Programmatically post the data using server side code. In order to implement this scenario, you must provide special parameters to the posted data which the Form Capture expects. These are:

    a. Visitor Key (parameter name: cd_visitorkey): Again, the form page must include the ClickDimensions tracking script for this to work. The script creates a cookie which contains a unique Visitor Key that is associated with the visitor who submits the form. There are 2 version of the key format:v[number]_[UUID]
    or
    UUIDFor example:v1294610734264_71186AF1FE674FE78A5CEEF96E0FB1A2
    or
    71186AF1FE674FE78A5CEEF96E0FB1A2The cookie name which holds this value is cuvid. In order to retrieve the cookie value you can use JavaScript as described here: http://www.w3schools.com/JS/js_cookies.asp 

    b. Referrer Header: the referrer value determines the domain from which the form was posted. Because ClickDimensions validates domain origin for all analytics requests, it is important to include the web site domain.Here is an example of posted data which was captured by Fiddler:POST http://analytics.clickdimensions.com/forms/h/aZ7R5w1EbG0CIwwRohiwAW HTTP/1.1Accept: application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap, application/x-shockwave-flash, */*Referer: http://mysite.com/ Accept-Language: en-US,he-IL; q=0.5User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; MDDC; .NET4.0C; .NET4.0E; MS-RTC LM 8; InfoPath.3) Content-Type: application/x-www-form-urlencoded Accept-Encoding: gzip, deflateHost: analytics.clickdimensions.com Content-Length: 105 Connection: Keep-AlivePragma: no-cache Cookie: cuvid=v2294610734264_71186AF55E674FE78A5CEEF96E0FB1A2; cusid=1295380830094; cuvon=1295380830115; txtEmail=john@domain.com&Submit=go&cd_visitorkey= v2294610734264_71186AF55E674FE78A5CEEF96E0FB1A2

    The above data has been POSTed to the ClickDimensions Form Capture URL.

    Please note the cd_visitorkey value which is concatenated to the posted fields’ data (in this case it is a simple email address). The referrer value points to http://mysite.com because the form was posted from the mysite.com web site.

    It may also be helpful to refer to the MSDN article titled “How to: Send Data Using the WebRequest Class” at http://msdn.microsoft.com/en-us/library/debx8sh9.aspx. The article contains an example of how to post form data programmatically.

Download the Code Sample:

A full example in C# for sending posted data to form capture can be found here:

zip http://clickdimensions.com/download/ClickDimensions.FormCapture.zip

 

Update: The below Java sample was shared by a ClickDimensions customer:

We successfully post to form captures with server side java code. Below is the central code. We’re not using the static success and error redirect urls defined in the Clickdimensions form captures, so I’ve just set them to ‘http://success‘ and ‘http://error‘. The method is checking response to decide if the post has succeeded or not.

private boolean createCRMContent(HttpServletRequest request) throws Exception {

 final String referer = request.getHeader("referer");
 final String visitorKey = getCookieValue(request.getCookies(), "cuvid", "-1");
 String postData = "cd_visitorkey=" + visitorKey;
 Enumeration<String> paramNames = request.getParameterNames();

 while (paramNames.hasMoreElements()) {
 String paramName = (String)paramNames.nextElement();
 String paramValue = request.getParameter(paramName);
 postData += "&" + paramName + "=" + URLEncoder.encode(paramValue, "UTF-8");
 }

 HttpURLConnection connection = null;

 try {

 // Create connection
 URL url = new URL("http://analytics.clickdimensions.com/forms/h/...");
 connection = (HttpURLConnection) url.openConnection();
 connection.setDoOutput(true);
 connection.setDoInput(true);
 connection.setInstanceFollowRedirects(false);
 connection.setRequestMethod("POST");
 connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
 connection.setRequestProperty("charset", "utf-8");
 connection.setRequestProperty("Referer", referer);
 connection.setRequestProperty("Content-Length", "" + Integer.toString(postData.getBytes().length));
 connection.setUseCaches(false);

 // Send request
 DataOutputStream wr = new DataOutputStream(connection.getOutputStream());
 wr.writeBytes(postData);
 wr.flush();
 wr.close();

 // Get response
 InputStream is = connection.getInputStream();
 BufferedReader rd = new BufferedReader(new InputStreamReader(is));
 String line;
 StringBuffer response = new StringBuffer(); 
 while((line = rd.readLine()) != null) {
 response.append(line);
 response.append('\r');
 }
 rd.close();

 return response.toString().toLowerCase().contains("http://success&quot ;

 } catch (Exception e) {

 throw e;

 } finally {

 if(connection != null) {
 connection.disconnect(); 
 }

 }

}

public static String getCookieValue(Cookie[] cookies, String cookieName, String defaultValue) {
 for(int i=0; i < cookies.length; i++) {
 Cookie cookie = cookies;
 if (cookieName.equals(cookie.getName()))
 return(cookie.getValue());
 }
 return(defaultValue);
}

Mapping Form Fields to Lookup Fields

$
0
0

NOTE: This feature is currently only available to customers on our US data center. As the new release rolls out to the other regions the EU and AU will also have access to this feature. See the full release notes here for updates. However, the first example is already available to all data centers.

You have the ability to map form fields used in your ClickDimensions web forms to CRM lookup fields. This includes the out-of-the-box lookup fields as well as custom lookup fields.  You will need to create a text-type Form Field and select the lookup field you would like to map to from the mappings drop down. Below, we will look at real world scenarios in which mapping to lookup fields would be helpful.

Please Note: The text submitted in the Lookup Field, must match the record exactly (case insensitive). For example, if the Account record’s name field is “ClickDimensions”, and the Posted Field value is also “ClickDimensions”, the Parent Account will automatically be set to ClickDimensions.

Example 1: Company Name/Parent Account

First let’s take a look at the Customer/Parent Account Field on the Contact record. This was added in November 2016 and is available to all customers.

Most sites have some form of a Contact Us form and within that form many have a field for Company Name. After setting this up, you will not have to manually set the parent account for each contact, this can now automatically be set if the account already exists in CRM.

In the example below, we have a standard text-type Form Field accessed from within the Form Builder by clicking the New Field button (you may also create fields by going to Settings > Form Fields).

Form Field

From here, click on the MAPPING tab and select the Company Name or Parent Account field from the Contact map field.

Form Field Mapping

Now when a customer submits a form, the company name will automatically be associated with the Parent Account/Company name field on the CRM record as long as an Account record by the same name exists in CRM.

form to contact

What if an Account by the same name doesn’t already exist? It will still create a Posted Form with the value that the visitor submitted so that you can see and determine whether a new Account record should be created or not.

Example 2: Country

Have a sales team that is organized by customer location? You can automatically send the right sales person a submitted form based on the location entered by the customer. Some companies have transitioned from using option set fields and moved towards using lookup fields in these cases. If you have a lookup field created for Country, start by creating a text-type Form Field and then select your Company Lookup Field in the related mapping drop down.

Example 3: Product

Do you have more than one product or service that you sell? Do you use the CRM Product entity? If you have this set up as a lookup field on the contact or lead records in CRM you can use the map to lookup feature for this as well. In a quote request type form you can ask what product they want a quote for, and that can automatically set the product lookup field to the right product on their contact or lead record.

There are many other possibilities here as well!

 

Don’t see the field you want in the mapping drop down?

If you created a brand new CRM field, you will need to make sure you publish your customizations.  In addition to that, you will want to make sure that you publish the Metadata, so that these custom fields are visible in the mapping drop down.

Profile Management Data Sync Entity

$
0
0

ClickDimensions provides a feature called Profile Management which is used to prepopulate forms with a Lead or Contact’s preexisting data. This is a useful feature, but if you are sending a very large Email Send, it is possible that some recipients may receive your email and click a link to a form before all of the recipients’ data has been queued for prepopulation. To account for this, we have introduced an entity called Profile Management Data Sync. A Profile Management Data Sync record can be used to specify one or more marketing lists of recipients and sync data from their records before the Email Send is sent out. This ensures that no matter how many recipients you send to, profile management forms will always be prepopulated for them when they receive your email. The use of this entity is not required in order to user our Profile Management functionality, it is only intended to expedite the syncing process for customers who send to a larger number of recipients at once.

NOTE: This feature is only available for CRM 2013+ environments.

NOTE: Only the default System Administrator and ClickDimensions Service security roles include the necessary permissions to create a Profile Management Data Sync record. If you do not have one of these roles, you will need to ask your administrator to assist you.

To create a new Profile Management Data Sync record, begin by navigating to Marketing > Profile Management Data Sync, then click New.

PMDS navigation

To begin, name the new record and provide an email address to which a notification will be sent when the data sync is complete. Save the record, then you will be able to add marketing lists and specify which Lead and Contact data should be synced for prepopulation.

PMDS record name and notify email

The rest of the fields in this section will all be populated automatically after initiating the data sync. The data found in these fields is as follows:

  • Data Sync Started: the time at which the data sync began
  • Data Sync Completed: the time at which the data sync was finished
  • Data Sync status: this field will update when the record is refreshed. It indicates the current status of the data sync, such as In Progress and Completed.
  • Contact Records Synced: The number of Contact records whose data was synced. This should correspond to the number of Contacts in the marketing lists associated with the Profile Management Data Sync record.
  • Lead Records Synced: The number of Lead records whose data was synced. This should correspond to the number of Leads in the marketing lists associated with the Profile Management Data Sync record.
  • Errors: will provide a count of how many errors, if any, were encountered when attempting to sync Lead and Contact data.

Next, click the + button above the Marketing Lists iFrame to open a lookup menu which will allow you to specify which marketing lists should have their recipients’ data synced.

Under Fields to Sync, a list of all of the available fields on the Lead and Contact entities in your CRM will be available. Scroll through these lists and select any fields whose data should be synced.

PMDS fields to sync

Once all of the desired fields have been selected, click the Start Sync button at the top of the record.

start sync button

You will receive an email when the sync has completed. Any time after that, feel free to send your email.


Feature Added:8.5
Feature Updated: 8.5
ClickDimensions Version Needed: 8.5
Viewing all 14 articles
Browse latest View live