Creating Custom Lead Forms for Salesforce

Product(s)
Video Cloud
Role(s)
Studio User
Topic(s)
Audience/Marketing Automation

In this topic you will learn how to use a Salesforce form to capture lead data inside of a Brightcove Player.

The Audience module provides the ability to create custom lead forms which allow you to capture viewer information as videos are played inside of Brightcove players. The lead data is sent to, and processed by, Salesforce.

To create a custom lead form, the following steps must be performed.

  1. Create a form in Salesforce.
  2. Copy and edit the form HTML.
  3. Create a custom lead form in the Audience module.
  4. Assign the lead form to a player.
  5. Validate the form data in Salesforce.

Note: For information on standard lead forms which capture viewer information and save the data in Video Cloud, see Creating an Audience Lead Form.

Creating a form in Salesforce

The Web-to-Lead feature in Salesforce can be used to generate lead information from website visitors. These forms can also be displayed inside of Brightcove players. The steps below will create a simple form to capture first name, last name, email address, company, city and state/province. For complete details on the Web-to-Lead feature, see the Salesforce documentation.

  1. Sign in to your Salesforce account.
  2. From Setup, enter Web-to-Lead in the Quick Find box and then click Web-to-Lead.
  3. Click Create Web-to-Lead Form.
  4. Select fields to include on your Web-to-Lead form. Use the Add and Remove arrows to move fields between the Available Fields list and the Selected Fields list, and use the Up and Down arrows to change the order of the fields on your form.
  5. Enter a Return URL. For this example, the Return URL will be set to http://www.brightcove.com. This value will be ignored when the form is used as a custom lead form inside of the Audience module.
  6. Click Generate. The form HTML will be displayed.

Copying and editing the form HTML

To use the form inside of the Audience module, you will need to copy the form HTML. Also, you may want to do some basic styling to the form. In the steps below, we will copy the form HTML to an HTML editor and then make some styling changes to the form.

By default, when the form is displayed inside of a Brightcove player, the form will display on a transparent background over the player. Use CSS to set the background color.

  1. Copy the HTML to the clipboard.
  2. Click Finished.
  3. Paste the form HTML into your HTML editor of choice. You may want to use the code formatting feature of your editor to format the code so that it is easier to read.
  4. Using your HTML editor, add the following CSS to change the background color to grey.
    <style>
    body {
    background-color: rgba(204,204,204,0.9);
    margin: 0;
    padding: 20px;
    height: 100%;
    }
    </style>
  5. (Optional) To identify which leads are generated by Audience, the following code can be added inside the <form> tag:
    <input type="hidden" name="lead_source" value="Video Cloud Audience">
  6. Copy the HTML to the clipboard.

Creating a custom lead form in the Audience module

Once the form HTML has been generated in Salesforce, create a custom lead form in the Audience module and associate the lead form with an Audience-enabled player.

  1. Open the Audience module.
  2. Click Lead Forms in the left navigation. If any lead forms have been created, they will be displayed.
  3. Click Create Lead Form.
  4. Give the lead form a descriptive Name.
  5. Select a Form Language.
  6. Select the Form Timing. The form timing determines when the lead form will be displayed.
    edit lead form (1)
  7. Set the form type to Custom Lead Form.
  8. Paste in the Form HTML from Salesforce.
  9. (Optional) Paste in the Confirmation HTML. The confirmation view will be display for 5 seconds and then the video will resume playing. If no confirmation HTML is included, the video will resume playing after the form submission.
    edit lead form (2)
  10. (Optional) Click Preview Form to open a preview of the form.
  11. Click Save to save the lead form.

Assigning a lead form to a player

Once the lead form has been created, it needs to be assigned to a player. Follow these steps to assign a lead form to a player.

  1. Click Audience Players in the left navigation.
  2. Locate your player and use the Lead Form dropdown list to select the lead form.

The setup is now complete and you are ready to capture lead information. When a video is published using an Audience-enabled player, the lead form will appear according to the form timing settings.

Validating the form data in Salesforce

Leads captured using the custom lead form will be added as leads in your Salesforce account.