Formatting URLs for NetSuite Marketing Campaigns

In a previous blog post, we explained how to use a Custom Record Type and Online Forms to track multiple Click Thrus for Marketing Campaigns.

Among the setup steps, you had to copy the Publishable Form URL and use it in your Marketing Campaign Email. Today, I’m going to explain how to add parameters to the Publishable Form URL and format it properly for use in your Marketing Campaigns.

Step #1 :  Retrieve the Publishable URL of your Form.  
In my example, I created a custom record type called "Campaign Statistic" for which I created (2) Custom Online Forms:

On the form, navigate to the "External" tab to retrieve the Publishable Form URL :

My link is :

Step #2 :  Add parameters to your URL, so you can automatically fill fields :

To pre-fill fields of your form,  you have to add parameters to the Publishable Form URL.

The format is :  YOUR_URL&customfield1_internalid=value

Note that you can have several custom fields, just follow the same format.

For example, I have a custom field called "Contact First Name" on my Custom Record Type,  with the internalid custrecord_contactfirstname. To pre-fill a specific value when calling the form, just add the following parameter:

Let’s add a few more pre-filled values :

If you paste this URL in a browser,  it works well - your form will be called and fields will be filled automatically.

However, you will have to reformat this URL if you want to use it in a NetSuite Marketing Campaign Template.

Step #3 :   Escape your URL.

In order for your URL to be clickable in a NetSuite Marketing Campaign Email,  we need to remove "reserved" characters,  that will conflict with NetSuite URL formatting tool. This process is called "escaping your URL".

Basically, you have to replace the following characters of your URL by their Character Escaped Code:

URL Character
Replace by:

The URL then becomes: 12%26h%3D7b1708398e0f0492f5e1%26custrecord_contactfirstname%3DFelix%26custrecord_contactlastnamename%3DGuinet%26custrecord_campaignid%3D162

Warning :   Don’t escape // and : characters of your URL.

Step #4 : Insert Netsuite TAGS for a dynamic URL.

As shown in our previous blog, it is often very useful to use dynamic values rather than static ones.

For example,  rather than hard coding First Name to Felix and Last Name to Guinet,  it’s better to use  <NLFIRSTNAME> and <NLLASTNAME> in your url,  so that Netsuite will replace these tags with the recipients respective values.

As these tags are interpreted before NetSuite actually renders the final URL in your email, tags must not be escaped.

The final URL to use in your NetSuite Marketing Campaign Email would then be : 12%26h%3D7b1708398e0f0492f5e1%26custrecord_contactfirstname%3D<NLFIRSTNAME>%26custrecord_contactlastnamename%3D<NLLASTNAME>%26custrecord_campaignid%3D162

No comments:

Post a Comment