During NetSuite implementations, clients frequently ask me if there is a way to integrate an external Web form (a form stored on the company’s external website). The easiest way to this is to create an ‘Online Customer Form’ in NetSuite and then embed it on an external website via iFrame. While this approach is simple, iFrame is not the most elegant solution. In addition, this approach will require some styling of NetSuite’s Online Customer Form. This can be especially cumbersome if the client already has a nicely styled ‘Contact Us’ form on their company site.

In this blog, I will present an alternative to embedding the NetSuite’s Online form via iFrame. I find that this solution is simple and easy to configure and it will allow you to keep your existing ‘Contact Us’ page. Please note that a small tweak to your external ‘Contact Us’ form will allow you to create a Lead or a Customer in NetSuite when the form is submitted.

Step 1: Creating an Online Customer Form in NetSuite

We will start by creating an Online Customer Form in NetSuite with the fields matching your external ‘Contact Us’ form. I will add all the typical fields a company would normally add to their ‘Contact Us’ form, including a custom field (Industry Type).

To create ‘Online Customer Form’ navigate to the following page in your NetSuite instance:

Setup >> Marketing >> Online Customer Form >> New

On the selection page, choose ‘Default Form Template’ for a form type.

On the form creation page ‘Select Fields’ tab, add your field to match your external ‘Contact Us’ page setup (see the example below).

You will need to configure the ‘Set Up Workflow’ tab as it will determine how the entity (Lead / Customer) records will be created in the system.

The most important fields in the setup are:

  1. Redirect to URL: It will determine where the user will land after your external ‘Contact Us’ form is submitted.
  2. Set Lead Status: This drop-down list allows you to select the stage and status of the Entity (Lead / Customer) when they get added to the system.
  3. Set Lead Source: Here you will select the Marketing Campaign or Lead Source depending on your setup in NetSuite.
      • As you probably know, ‘Leadsource’ is a field available on almost every transaction and the entity record, allowing you to track sales against a specific marketing campaign.
      • Depending on whether the Marketing feature is available in your NetSuite account, you will be able to setup either:
        1. Leadsource with Marketing Campaign Feature turned oo:
          Navigate to Lists >> Marketing >> Marketing Campaign >> New
          or
        2. Leadsource with Marketing Campaign Feature is turned off
          Navigate to Setup >> Sales >> Setup Tasks >> CRM Lists >> New >> Lead Source

Save your form.

Step 2: Verify the external tab of your Online Customer Form

Copy the form ‘Publishable Form URL’ similar to what is highlighted in the image below. This is the URL that you will use in the next step.

Step 3: Modify your existing Contact us form / page.

The following HTML snippet is an example of an ordinary HTML page (form). You will add the highlighted snippet to your own HTML code.

<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>
<html>
<head>
<META http-equiv=”Content-Type” content=”text/html; charset=utf-8″>
<title>External Contact Us Page Example</title>

<style type=”text/css”>
</style>

</head>

<body>
<div class=”form_section”>
<h2>Send us your comments!</h2>
<form id=”myform” action=”https://forms.na1.netsuite.com/app/site/crm/externalleadpage.nl?compid=TSTDRV1184964&formid=25&h=57bc2a41b72dc0e0b5ed” method=”post”>
<label>First name</label><input name=”firstname” type=”text”><br>
<label>Last name</label><input name=”lastname” type=”text”><br>
<label>Email</label><input name=”email” type=”email”><br>
<label>Company name</label><input name=”companyname” type=”text”><br>
<label>Industry Type</label>
<select name=”custentity_industry_type”>
<option selected=”” value=””></option>
<option value=”4″>Computers, Peripherals, and Software</option>
<option value=”6″>Drugs, Proprietaries, and Sundries</option>
<option value=”8″>Electronic Parts and Equipment</option>
<option value=”11″>Furniture</option>
<option value=”10″>Hardware</option>
<option value=”5″>Industrial Machinery and Equipment</option>
<option value=”3″>Medical and Hospital Equipment</option>
<option value=”9″>Office Equipment</option>
<option value=”2″>Ophthalmic Goods</option>
<option value=”14″>Outdoor</option>
<option value=”12″>Photographic Equipment and Supplies</option>
<option value=”13″>Professional Equipment</option>
<option value=”7″>Sporting and Recreation Goods</option>
<option value=”1″>Wine and Distilled Beverages</option>
</select>
<div class=”comments”><label>Your comments</label><textarea name=”comments”></textarea></div><br>
<input type=”submit” value=”submit”>
</form>
</body>
</html>

It is important to place the External Publishable URL acquired in Step 2, right after the ‘action’ attribute. Please refer to the highlighted section above.

The simple form that I used as an example looks like this:

NetSuite Form

 

You will of course want to add styling to your form to make it look more visually appealing. Your form will look much nicer!

Important!

When adjusting your page, it’s important to use NetSuite’s Internal ID.

For example, the Internal ID of the First Name field in NetSuite is firstname.

We will then use:

<input name=”firstname” type=”text”> when we setup our form.

As previously mentioned, ‘Industry type’ is a custom field that we setup, it is also a list. To map the field to the form, I will have to write it in the following fashion:

<select name=”custentity_industry_type”>

Also note, that the option values need to match the value #’s setup in NetSuite’s Custom Lists:

<option value=”4″> Computers </option>

Step 4: Report on the ‘Contact Us’ form submissions

This setup will not be too useful if we cannot find a fast and efficient way to list the Leads or Customers that came to us through our External ‘Contact Us’ form.

To generate the list of such Leads, perform the following steps:

  1. Go to Setup >> Marketing >> Online Customer Forms.
  2. Click Customize View.
  3. Click on the button [More Options]

  1. In the Criteria Tab, set up the following:
    1. Name = is [Name of your Online form]

  1. In the Results Tab, set up the following:
    1. Date of Visit
    2. Shopper’s Field: Name (This is a company Name)
    3. # Form Submits (if relevant)

The final result looks something like this:

Netsuite Report

Have fun customizing and feel free to contact us should you have any questions!

Thanks to Felix Guinet and Guillaume Bouchard Lafond for making this article possible.

Written by Ilija Budimir, Sr. NetSuite Consultant

FMT Consultants
760.930.6400
ibudimir@fmtconsultants.com

Posted by: