SuiteCommerce Site Builder Guide

SuiteCommerce Site Builder Guide
September 27, 2017
2017.2
Copyright © 2005, 2017, Oracle and/or its affiliates. All rights reserved.
This software and related documentation are provided under a license agreement containing
restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly
permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate,
broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any
form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless
required by law for interoperability, is prohibited.
The information contained herein is subject to change without notice and is not warranted to be errorfree. If you find any errors, please report them to us in writing.
If this is software or related documentation that is delivered to the U.S. Government or anyone
licensing it on behalf of the U.S. Government, then the following notice is applicable:
U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software,
any programs installed on the hardware, and/or documentation, delivered to U.S. Government end
users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation
and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification,
and adaptation of the programs, including any operating system, integrated software, any programs
installed on the hardware, and/or documentation, shall be subject to license terms and license
restrictions applicable to the programs. No other rights are granted to the U.S. Government.
This software or hardware is developed for general use in a variety of information management
applications. It is not developed or intended for use in any inherently dangerous applications, including
applications that may create a risk of personal injury. If you use this software or hardware in dangerous
applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and
other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any
damages caused by use of this software or hardware in dangerous applications.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be
trademarks of their respective owners.
Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC
trademarks are used under license and are trademarks or registered trademarks of SPARC
International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or
registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.
This software or hardware and documentation may provide access to or information about content,
products, and services from third parties. Oracle Corporation and its affiliates are not responsible
for and expressly disclaim all warranties of any kind with respect to third-party content, products,
and services unless otherwise set forth in an applicable agreement between you and Oracle. Oracle
Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to
your access to or use of third-party content, products, or services, except as set forth in an applicable
agreement between you and Oracle.
If this document is in public or private pre-General Availability status:
This documentation is in pre-General Availability status and is intended for demonstration and
preliminary use only. It may not be specific to the hardware on which you are using the software.
Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any
kind with respect to this documentation and will not be responsible for any loss, costs, or damages
incurred due to the use of this documentation.
If this document is in private pre-General Availability status:
The information contained in this document is for informational sharing purposes only and should be
considered in your capacity as a customer advisory board member or pursuant to your pre-General
Availability trial agreement only. It is not a commitment to deliver any material, code, or functionality,
and should not be relied upon in making purchasing decisions. The development, release, and timing
of any features or functionality described in this document remains at the sole discretion of Oracle.
This document in any form, software or printed matter, contains proprietary information that is the
exclusive property of Oracle. Your access to and use of this confidential material is subject to the terms
and conditions of your Oracle Master Agreement, Oracle License and Services Agreement, Oracle
PartnerNetwork Agreement, Oracle distribution agreement, or other license agreement which has
been executed by you and Oracle and with which you agree to comply. This document and information
contained herein may not be disclosed, copied, reproduced, or distributed to anyone outside Oracle
without prior written consent of Oracle. This document is not part of your license agreement nor can it
be incorporated into any contractual agreement with Oracle or its subsidiaries or affiliates.
For information about Oracle's commitment to accessibility, visit the Oracle Accessibility Program
website at http://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc
Oracle customers that have purchased support have access to electronic support through My Oracle
Support. For information, visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=info or visit http://
www.oracle.com/pls/topic/lookup?ctx=acc&id=trs if you are hearing impaired.
Sample Code
Oracle may provide sample code in SuiteAnswers, the Help Center, User Guides, or elsewhere through
help links. All such sample code is provided "as is” and “as available”, for use only with an authorized
NetSuite Service account, and is made available as a SuiteCloud Technology subject to the SuiteCloud
Terms of Service at www.netsuite.com/tos.
Oracle may modify or remove sample code at any time without notice.
No Excessive Use of the Service
As the Service is a multi-tenant service offering on shared databases, Customer may not use the
Service in excess of limits or thresholds that Oracle considers commercially reasonable for the Service.
If Oracle reasonably concludes that a Customer’s use is excessive and/or will cause immediate or
ongoing performance issues for one or more of Oracle’s other customers, Oracle may slow down or
throttle Customer’s excess use until such time that Customer’s use stays within reasonable limits. If
Customer’s particular usage pattern requires a higher limit or threshold, then the Customer should
procure a subscription to the Service that accommodates a higher limit and/or threshold that more
effectively aligns with the Customer’s actual usage pattern.
Beta Features
Oracle may make available to Customer certain features that are labeled “beta” that are not yet
generally available. To use such features, Customer acknowledges and agrees that such beta features
are subject to the terms and conditions accepted by Customer upon activation of the feature, or in the
absence of such terms, subject to the limitations for the feature described in the User Guide and as
follows: The beta feature is a prototype or beta version only and is not error or bug free and Customer
agrees that it will use the beta feature carefully and will not use it in any way which might result in
any loss, corruption or unauthorized access of or to its or any third party’s property or information.
Customer must promptly report to Oracle any defects, errors or other problems in beta features
to support@netsuite.com or other designated contact for the specific beta feature. Oracle cannot
guarantee the continued availability of such beta features and may substantially modify or cease
providing such beta features without entitling Customer to any refund, credit, or other compensation.
Oracle makes no representations or warranties regarding functionality or use of beta features and
Oracle shall have no liability for any lost data, incomplete data, re-run time, inaccurate input, work
delay, lost profits or adverse effect on the performance of the Service resulting from the use of beta
features. Oracle’s standard service levels, warranties and related commitments regarding the Service
shall not apply to beta features and they may not be fully supported by Oracle’s customer support.
These limitations and exclusions shall apply until the date that Oracle at its sole option makes a beta
feature generally available to its customers and partners as part of the Service without a “beta” label.
Table of Contents
Site Builder Overview ............................................................................................................. 1
Site Builder Websites ......................................................................................................... 1
Workflow for Setting Up a Site Builder Website or Store .......................................................... 4
Enabling Web Store Features .............................................................................................. 5
Setting Up Your Site Builder Site .............................................................................................. 7
Setting up a Site Builder Site with the Web Site Assistant ........................................................ 8
Using the Site Builder Web Site Content Manager .................................................................. 9
Previewing Your Site Builder Website .................................................................................. 11
Customizing Registration for Your Site Builder Web Store ...................................................... 11
Secure Login Access to Your NetSuite Account ................................................................. 11
Displaying Login Fields on Your Web Page ....................................................................... 12
Customizing Login and Logout ....................................................................................... 14
Registration-Free Shopping ........................................................................................... 15
Restricting Access to Your Website ................................................................................. 15
Customizing the Website Registration Form ..................................................................... 16
Setting Up Your Site Builder Home Page ............................................................................. 17
Selecting a Site Builder Home Page ................................................................................ 17
Changing the Image and Text on Your Home Page Tab ...................................................... 18
Applying a Layout or Template on Your Site Builder Home Page ......................................... 18
Creating Multiple Websites ................................................................................................ 19
Publishing Content With Multiple Websites ...................................................................... 20
Multiple Website Online Pricing ..................................................................................... 21
Creating Hosting Root Folders for Multiple Websites ......................................................... 22
Site Builder and OneWorld ................................................................................................ 23
Setting Up Site Builder for Multiple Subsidiaries ............................................................... 23
Navigating Directly to a Subsidiary Website in Site Builder ................................................. 25
Subsidiary Management with Multiple Site Builder Sites .................................................... 25
Managing Website Customers in OneWorld with Site Builder ............................................. 26
Selecting a Credit Card Gateway for a Subsidiary Website .................................................. 26
Displaying Items in Site Builder with OneWorld ................................................................ 27
Setting up Multiple Currencies in a Site Builder Web Store ..................................................... 27
Setting Web Store Backorder and Out-of-Stock Preferences ................................................... 28
Customizing the Shopping Cart in Site Builder ..................................................................... 29
Customizing Checkout in Site Builder ................................................................................. 30
Best Practices for Website Performance .............................................................................. 30
Site Builder Items, Forms, & Images ....................................................................................... 32
Displaying Items and Information ...................................................................................... 32
Adding Items to Web Store Categories ............................................................................ 36
Featuring Items ........................................................................................................... 36
Customizing Items in Your Site .......................................................................................... 37
Showing Items Without Prices ....................................................................................... 37
Using Transaction Column Fields in Your Website ............................................................. 38
Using Matrix Items to Offer Item Options in Your Site ....................................................... 38
Related Items .................................................................................................................. 39
Creating Related Item Groups ........................................................................................ 40
Associating Individual Related Items ............................................................................... 40
Displaying Related Items in the Shopping Cart ................................................................. 41
Information Items ............................................................................................................ 41
Attaching Images to Information Items ........................................................................... 43
Entering Information Item Descriptions .......................................................................... 44
Using HTML in Description Fields ................................................................................... 44
Publishing Forms ............................................................................................................. 45
Email Forms ................................................................................................................ 46
Search Forms .............................................................................................................. 47
Case and Customer Forms ............................................................................................ 49
File Download with Online Forms ................................................................................... 51
Images ........................................................................................................................... 51
Using Images in your Web Store .................................................................................... 52
Resizing Images ........................................................................................................... 53
Deleting Images ........................................................................................................... 54
Site Builder Tabs & Categories ............................................................................................... 56
Creating Website Tabs ...................................................................................................... 56
Presentation Tabs ........................................................................................................ 56
Hosted Tabs ................................................................................................................ 58
Creating Site Categories .................................................................................................... 59
Arranging Web Store Categories .................................................................................... 62
Using the Specials Category .......................................................................................... 62
Publishing an Employee Directory .................................................................................. 63
Publishing Information to an Internal Site ........................................................................... 64
Website Hosting with Site Builder .......................................................................................... 66
Hosting HTML Websites with NetSuite Site Builder ............................................................... 66
Audience Permissions for Hosted Sites ............................................................................... 68
Creating an HTML Intranet Site .......................................................................................... 69
Displaying an HTML Site in a NetSuite Tab .......................................................................... 69
Website Staging Environment ............................................................................................ 70
Example for Building a Combination Site ............................................................................ 70
External Catalog Site (WSDK) Overview ............................................................................... 73
Enabling the External Catalog Site Feature ...................................................................... 73
Setting Up an External Catalog Site ................................................................................ 74
Best Practice for Creating an External Catalog Site (WSDK) ................................................. 76
Site Builder Customization .................................................................................................... 77
Basic Customization ......................................................................................................... 78
Creating and Editing Website Layouts ............................................................................. 78
Changing Website Color Themes .................................................................................... 81
Adding a ‘Tell A Friend' Link .......................................................................................... 81
Advanced Site Customization ............................................................................................ 82
Customizing Site Themes .............................................................................................. 82
Creating and Editing Site Themes ................................................................................... 83
Item and Category Templates ........................................................................................ 88
Displaying Price Levels and Sale Prices ........................................................................... 96
Adding a Style Sheet to Your Site ................................................................................... 97
Using Web Site Text Groups .......................................................................................... 98
Website URL Parameters ................................................................................................. 102
URL Parameters for Displaying Shopping Pages ............................................................. 104
URL Parameters for Adding Items to the Cart ................................................................ 105
URL Parameters for Passing Marketing Information ........................................................ 108
URL Parameters for Setting Values in Your OneWorld Web Store ....................................... 109
URL Parameters for Setting the Currency on your Website ............................................... 110
Web Site Tags .................................................................................................................... 111
Creating Attribute Tags ................................................................................................... 111
Using Attribute Tags in Site Templates .......................................................................... 113
Using Web Site Tags in Hosted Files .............................................................................. 114
Creating Attribute Tags for Custom Records and Custom Fields ........................................ 114
Creating Attribute Tags for Standard Records ................................................................. 115
Declare Attribute Tags for Tags Within Tags ....................................................................... 127
Defining Custom Web Site Tags ........................................................................................ 128
Using Tag Substitution on Tabs and Categories .............................................................. 129
Using the Server-Side Include Tag ..................................................................................... 131
Tags for Use in HTML Pages and Site Templates ................................................................. 131
Tags for Information Unavailable on Records ..................................................................... 139
Website Search with Site Builder .......................................................................................... 142
Helping Customers Find Items on Your Site ....................................................................... 142
Setting Up Alternate Search Keywords .............................................................................. 143
Publishing Saved Search Results on Your Website ............................................................... 143
Applying Layout Templates to Search Results ..................................................................... 144
Site Builder Search Engine Optimization (SEO) ....................................................................... 146
Adding Page Titles in Site Builder ..................................................................................... 146
Adding META Tags in Site Builder ..................................................................................... 147
Adding Alt Text to Website Images in Site Builder ............................................................... 147
Using Canonical URLs in NetSuite Websites ....................................................................... 147
Descriptive URLs in Site Builder ....................................................................................... 148
Setting Up Descriptive URLs ........................................................................................ 149
Best Practice for Using Descriptive URLs ....................................................................... 151
Keyword Marketing With Search Engines ........................................................................... 151
Setting Up Website Product Feeds .................................................................................... 152
Editing Product Feed Results ....................................................................................... 153
Using Product Feeds with Multiple Websites and OneWorld ............................................. 154
Yahoo! Shopping ........................................................................................................ 155
NexTag ...................................................................................................................... 156
Shopzilla ................................................................................................................... 158
Shopping.com ............................................................................................................ 160
Google Base .............................................................................................................. 162
Using the Sitemap Generator in Site Builder ...................................................................... 163
Generating a Site Map in Site Builder ............................................................................ 163
Displaying an HTML Site Map on Your Website ............................................................... 165
Notifying Search Engines ............................................................................................. 166
Assigning Site Map Priority and Excluding URLs from the Site Map .................................... 166
Site Builder Website Reports and Analytics ............................................................................ 168
Page Hit Reports ............................................................................................................ 168
Hosted Page Hits by Customer Report .......................................................................... 168
Page Hits by Customer Report ..................................................................................... 168
Hosted Page Hits Detail Report .................................................................................... 169
Hosted Page Hits Report ............................................................................................. 169
Page Hits Report ........................................................................................................ 169
Page Hits by Category Report ...................................................................................... 170
Page Hits Detail Report ............................................................................................... 170
Web Sales Reports ......................................................................................................... 170
Item Orders Report .................................................................................................... 170
Item Orders by Category Report .................................................................................. 171
Item Orders Detail Report ........................................................................................... 171
Item Page Views and Sales Summary Report .................................................................. 171
Keyword and Referrer Reports ......................................................................................... 171
Keywords Detail Report ............................................................................................... 171
Keywords Summary Report ......................................................................................... 172
Referrer Detail Report ................................................................................................. 173
Referrer Summary Report ........................................................................................... 173
Web Activity Reports ....................................................................................................... 174
Visitor Activity Summary Report ................................................................................... 174
New Visitor Report ..................................................................................................... 174
Lead Conversion Report .............................................................................................. 175
Visitor Activity Detail Report ........................................................................................ 175
Shopping Activity Analysis Report ................................................................................. 176
Shopping Activity Analysis by Category Report ............................................................... 176
Shopping Cart Abandonment Report ............................................................................
Customer Web Activity ................................................................................................
Internal Search Reports ..................................................................................................
Internal Search Summary Report .................................................................................
Internal Search Detail Report .......................................................................................
Using Tracking Pixels for Analytics ....................................................................................
Working with Google Analytics .....................................................................................
Web Analytics and Online Forms ..................................................................................
Scriptable Cart ...................................................................................................................
SuiteScript for Scriptable Cart ..........................................................................................
Creating Custom Functions for Scriptable Cart ...............................................................
Working with Field Changed Client Events .....................................................................
Creating Customer-Facing Messages from Scriptable Cart ....................................................
Page-Level Messages ..................................................................................................
Cart Line Messages ....................................................................................................
Custom Error Messages for ValidateLine Events .................................................................
Deploying and Running Scriptable Cart .............................................................................
Testing and Debugging Scriptable Cart ..............................................................................
Testing Scriptable Cart ................................................................................................
Resolving Permission Errors in Scriptable Cart ...............................................................
Debugging Your Shopping Cart Scripts Using Firebug ......................................................
Debugging Your Scriptable Cart with SuiteScript .............................................................
Scriptable Cart FAQ ........................................................................................................
Sample Scripts for Scriptable Cart ....................................................................................
Using a Third-Party Tax Calculator ................................................................................
Creating Buy-One-Get-One-Free Coupons ......................................................................
Dynamic Discounts .....................................................................................................
Offering Gift Wrap on the Web Store ............................................................................
Setting Quantity Limits for Customers ...........................................................................
Creating Time-Based Promotions .................................................................................
Setting Default Location for Web Orders .......................................................................
Accepting Charitable Donations ...................................................................................
176
177
177
177
178
178
178
181
182
182
184
186
187
188
192
193
194
195
195
195
196
197
198
200
201
202
207
212
218
227
231
234
Site Builder Overview
1
Site Builder Overview
Site Builder is the legacy ecommerce solution delivered by NetSuite. It includes access to the SSP
application platform, as well as free access to SuiteApps you can install to add functionality to your
ecommerce site and checkout. Note that there are various types of SuiteCommerce Site Builder
solutions to meet your particular business needs. To start creating a Site Builder website, read Setting
Up Your Site Builder Site.
To learn more about Site Builder websites, such as different configurations, and required features, read
the following topics:
■ Site Builder Websites
■ Workflow for Setting Up a Site Builder Website or Store
■ Enabling Web Store Features
Site Builder Websites
Whether you chose basic customization, or advanced customization, you can use point-and-click Site
Builder tools to accomplish setup tasks. You can track product inventory and sales-related transactions
(including returns) in your NetSuite account.
■ Use the Web Site Assistant to set your website’s domain name, as well as some basic design
elements such as color theme and logo. For more information, see Setting up a Site Builder Site with
the Web Site Assistant.
■ Use the Content Manager to add and edit the content in your Site Builder site. For more
information, see Using the Site Builder Web Site Content Manager.
When you create your web store, there are several ways to construct the site to address both the needs
of your business and the needs of your customers. Building a web store with Site Builder requires little
if any knowledge of HTML.
Products
Designing your NetSuite web store begins by customizing product information for online shopping. You
can customize descriptions and choose images that appear online.
Some of the item record fields you can configure are:
■ names
■ descriptions
■ online price
■ images that appear with items
■ meta tags that describe each item
■ item page titles
■ categories items appear in
■ related items
You can also create records for publishing general information, such as contact information, or
instructions for making purchases on your web store. NetSuite information items offer you flexibility in
SuiteCommerce Site Builder Guide
Site Builder Websites
communicating with your customers by enabling you to also create e-mail forms, enter text messages
and create custom search forms in your site. For more information, see Site Builder Items, Forms, &
Images.
Organize Your Web Store
After you have configured item records in NetSuite to display products on your site, you need to set
up the organizational structure of your site. Do this by creating tabs (top-level categories) to organize
your site. You can group similar items together by the categories you create. Similar categories can be
grouped together and displayed on a tab. Customers click the name of a tab to view the categories and
items it organizes. NetSuite provides you with default tabs, and you can create your own.
For example, a web store manager creates the following tabs to organize products on the site—
Printers, Accessories, Monitors, Computers. Within each tab, categories are created to organize the
items displayed on the site. On the Printers tab, the web store manager creates categories for the
different types of printers, such as Laser, InkJet, and All-In-One.
For more information, see Site Builder Tabs & Categories.
Website Appearance
From one page in NetSuite, you can configure the look and feel of your web store. You also set
preferences for how customers experience your web store and how your store works with your
NetSuite account.
NetSuite offers you several basic site themes on the Setup Web Site page that you can use to configure
your site’s appearance. You can also set the logo for your site, your site’s color theme, the text
displayed in email messages sent from your site, search preferences and more. For more information,
see Site Builder Customization.
Note: The Advanced Site Customization feature is required to customize the basic site themes
that come with Netsuite.
Backend Integration
On the Set Up Web Site page, you also control how your site integrates with your back office.
The following represent some of the choices you can make when integrating your site:
■ Your default sales order type
■ Customer registration requirements
■ Shipping information requirements
■ Automated order confirmation e-mail customizations
Note: CDN caching is not available for Site Builder websites.
Advanced Customization Site Builder Setup
The Advanced Site Customization feature lets you extend basic NetSuite Site Themes, create your own
site themes, and use NetSuite’s Web Site Tags. You can use HTML to extend the site themes and layouts
SuiteCommerce Site Builder Guide
2
Site Builder Websites
included in Site Builder. The following tools included in the Advanced Site Customization feature, give
you flexibility of design and maintenance. For more information, see Advanced Site Customization.
Site Builder Templates and Themes
Site themes control the look and feel of your site, including the layout of tabs, sidebars, and the
headers and footers of pages in your Site Builder web store.
You can customize the basic NetSuite site themes and templates, and you can create your own.
Advanced knowledge of HTML is helpful when you create custom item/category templates. For more
information, see Customizing Site Themes.
Item Drilldown Template
When you use the Advanced Site Customization feature, you can customize the template that displays
detailed item record information on your site. The item detail page is displayed when a shopper clicks
on an item on your website to see more information. Similar to creating templates for site themes, you
can insert Web Site Tags into your custom HTML to pull information from the item record and display it
on your web store. For more information, see Item and Category Templates.
For example, a web store manager can create two item drilldown templates. One generic template
that is used for most items, and displays the stock availability. The second is used for bundle items,
such as computer packages, and does not include stock availability. Item templates can be specified on
individual item records.
Web Site Tags
Use NetSuite Web site tags to apply an advanced level of customization to your website. Web
developers who are proficient with HTML are able to use web tags most effectively. For more
information, see Web Site Tags.
HTML Hosted in NetSuite
Hosting your HTML files in NetSuite enables you to integrate your existing HTML website pages with
your NetSuite account to manage online sales, product inventory, and marketing. The Web Site Hosting
feature lets you display HTML content that you create integrated with information from item records
in your NetSuite account. You can also use the NetSuite shopping cart, and track information about
visitors to your site. For more information, see Website Hosting with Site Builder.
You can use NetSuite Web Site Tags in your custom HTML to control sections of your website pages
and to create links to NetSuite-generated pages, such as tabs and categories. You can also use Web Site
Tags to pull information from your NetSuite account, such as customer names, links to files in the file
cabinet, and information item forms. For more information, see Tags for Use in HTML Pages and Site
Templates.
When your website is published to customers, NetSuite Web Site Tags are automatically replaced with
content and hyperlinks. When customers place orders in your store, the information is transferred to
your NetSuite account.
For example, you may already have a web store that you want to integrate with your NetSuite account.
Instead of designing a whole new website, you can add NetSuite Web Site Tags to the HTML content,
and then upload your HTML files to the NetSuite file cabinet. Immediately, the existing site is integrated
with NetSuite.
SuiteCommerce Site Builder Guide
3
Site Builder Websites
External Catalog Site (Web Site Developer's Kit, WSDK)
You can use a hosting service other than NetSuite to organize and publish your site, then integrate that
site with the NetSuite shopping cart.
If you are currently hosting your web store with a third party, you can use the Site Builder External
Catalog Site feature. This feature activates the Web Site Developer’s Kit (WSDK) which enables you
to copy NetSuite-generated scripts and paste them into your website HTML. These scripts send and
receive product information from your NetSuite account.
For example, a company that recently purchased NetSuite already has a web store but wants to
integrate the store with NetSuite’s ERP features. The company uses the External Catalog Site feature to
accomplish this. For more information, see External Catalog Site (WSDK) Overview.
Workflow for Setting Up a Site Builder Website or
Store
To create a Site Builder website, refer to the steps in the following diagram and table. For more
information about creating different types of Site Builder websites, read the following topics:
■ Hosting HTML Websites with NetSuite Site Builder
■ Setting Up an External Catalog Site
■ Site Builder Customization
Note: Unless otherwise noted, all navigation steps in this guide are provided for employees
using the E- Commerce Management Center, such as the Store Manager.
Task
For More Information
1. Enable Web Site features.
For more information, see Enabling
Web Store Features.
SuiteCommerce Site Builder Guide
4
Workflow for Setting Up a Site Builder Website or Store
Task
For More Information
Note: An Administrator must complete this step.
2. Set up domain names.
Setting Up Domains
Option:
Use the Web Site Assistant to setup domains and basic site
preferences.
Setting up a Site Builder Site with
the Web Site Assistant
3. Set preferences at Setup > Site Builder > Set Up Web Site.
Web Site Preferences
4. Create or import item records.
Displaying Items and Information
Option: Use the Content Manager to add tabs, categories and
items.
Using the Site Builder Web Site
Content Manager
5. Upload and size images.
Tip: Make sure image files are marked Available Without login.
Images
6. Create Categories to organize items.
Creating Site Categories
7. Create Tabs to Organize Categories.
Creating Website Tabs
8. Create and upload HTML templates.
If integrating with NetSuite checkout, use Web Site Tags.
Hosting HTML Websites with
NetSuite Site Builder
Web Site Tags
9. Create Layouts.
Creating and Editing Website
Layouts
Option: Advanced Site Customization
Create or edit site themes and item/category templates.
Site Builder Customization
Option: Create a Custom Color Theme
Changing Website Color Themes
10. Create Related Items Groups.
Related Items
11. Set accounting and tax preferences for Web store orders at
Setup > Accounting > Preferences > Accounting Preferences and
Setup > Accounting > Taxes > Set Up Taxes.
The following preferences apply to
web stores:
Note: An Administrator or someone with accounting
permissions must complete this step.
■ Accounting Preferences –
Customers Can Pay Online
■ Set Up Taxes – Charge Sales Tax
on Store Orders
12. Set up payment methods (including PayPal), and mark them
as Display in Web Site.
Setting Up Payment Options for
Your Web Store
PayPal Integration and Express
Checkout
13. Set up shipping items.
Setting Up Shipping for Your Site.
14. Preview your site at Setup > Site Builder > Preview Web Site,
and make changes as necessary.
Previewing Your Site Builder
Website
15. Submit your site URL to search engines, and begin search
engine optimization.
Site Builder Search Engine
Optimization (SEO)
Enabling Web Store Features
The features you can turn on in your account depend on the Site Builder product you subscribe to. For
information products you can purchase, contact your NetSuite account manager.
SuiteCommerce Site Builder Guide
5
Enabling Web Store Features
Type of Web Store
Requires
Advanced HTML
Knowledge
Uses Advanced Site
Customization Tools
Uses Custom
HTML to
Generate Web
Store Pages
Features to Enable
NetSuite Standard
Site
No
Yes
No
Web Site, Web
Store, Advanced
Site Customization
NetSuite-Hosted
HTML Web Store
Yes
Yes
Yes
Web Site, Host
HTML Files, Web
Store, Advanced
Site Customization
External Catalog Site
(WSDK)
Yes
No
Yes
Web Site, Web
Store, External
Catalog Site (WSDK)
Combination Web
Store
Yes
Yes
Yes
Web Site, Web
Store, Advanced
Site Customization,
Host HTML Files
If you use the Multiple Web Sites, you can create several different types of sites. For example, you can
create one hosted site for general information about your company and one combination site available
only to wholesalers who can log in and order items. For more information on setting up multiple sites,
see Creating Multiple Websites.
Note: Only administrators can enable features in your account.
To enable web store features:
1. Go to Setup > Company > Enable Features.
2. Click the Web Presence subtab.
3. Check the box next to each feature you want to use.
4. Click Save.
SuiteCommerce Site Builder Guide
6
Setting Up Your Site Builder Site
Setting Up Your Site Builder Site
After you set preferences, you can start building your Site Builder website. The setup tasks listed below
only apply to Site Builder sites:
Note: CDN services are not supported for Site Builder websites.
1. Use the Web Site Assistant to complete basic setup steps.
You can use the Web Site Assistant to guide you through the various steps required to set up
your Site Builder website. For more information, see Setting up a Site Builder Site with the Web
Site Assistant.
2. Use the Content Manager to set up tabs and categories.
Read Using the Site Builder Web Site Content Manager to learn about adding content to your
Site Builder Website.
3. Set up your shopping domain.
Site Builder sites that use custom domain names on shopping pages are required to set up a
Primary Web Site URL. For more information, see the help topic Setting Up Domains.
4. Preview your website.
To learn how to view your site, read Previewing Your Site Builder Website.
5. Set up the page where customers can register on your site.
You can customize the login and registration paged for your Site Builder web store. For more
information, see Customizing Registration for Your Site Builder Web Store.
6. Set your website home page.
Select the landing page (or home page) of your Site Builder website. For more information, see
Setting Up Your Site Builder Home Page.
7. To customize the shopping cart and checkout, see Customizing the Shopping Cart in Site Builder
and Customizing Checkout in Site Builder.
The following are optional setup tasks for Site Builder, depending on the features and preferences you
have enabled in your account:
■ Learn how to set up multiple website operated out of the same NetSuite account. For more
information, see Creating Multiple Websites.
■ Learn about setting up your Site Builder website in NetSuite OneWorld. For more information, see
Site Builder and OneWorld.
■ Allow online customers to submit orders in different currencies, read Setting up Multiple Currencies
in a Site Builder Web Store.
■ To set up product back-ordered functionality for your e-commerce site, read Setting Web Store
Backorder and Out-of-Stock Preferences.
SuiteCommerce Site Builder Guide
7
Setting up a Site Builder Site with the Web Site Assistant
Note: To support seamless access between your externally hosted site and the NetSuite web
store, you can implement NetSuite's inbound single sign-on feature. See the help topic Inbound
Single Sign-on Access to Web Store.
Setting up a Site Builder Site with the Web Site
Assistant
Using the Web Site Setup Assistant, you can set up your domain name to customize your site URL,
select design and color themes for your site, and upload a logo to display in your site. You can then
quickly name the tabs, or additional pages, in your website.
Note: Web Site Assistant is not available when your setup includes multiple sites or your single
site is not SiteBuilder.
Setting up a site with the Web Site Setup Assistant:
1. Go to Setup > Site Builder > Web Site Assistant.
2. On the first step, Web Address, you customize your site's URL.
■ Use a NetSuite Web Address – If you have not purchased a domain name from a domain
name registrar, you can use a URL provided by NetSuite that you customize. In the Use a
NetSuite Web Address section, enter the name of your site with no spaces.
For example, the Wolfe Electronics site might add the name of their site to use the NetSuite
web address, / wolfeelectronics.
■ Use a Web Address You Already Own – If you have purchased a domain name for your site
from a domain name registrar, you can enter your domain name here.
When you set your domain name using the Web Site Setup Assistant, it is automatically
saved on the Set Up Domains page at Setup > Site Builder > Domains. Your domain is also
automatically selected as the Primary Site URL at Setup > Site Builder > Set Up Web Site.
For more information on using your domain name, see the help topic Domain Names.
When you click Next after each step, your settings are saved.
3. On the second step, Appearance & Logo, you can set up how your site appears to visitors. These
preferences automatically set the corresponding fields at Setup > Site Builder > Set Up Web Site..
■ Web Site Theme – Themes provide an overall look and feel for your site, with various menu
designs and text and image placement. You can select and preview each theme to choose the
one you want to use for your site.
If you use the Advanced Site Customization feature, you can customize each of these themes
or create your own at Setup > Site Builder > Themes. Custom themes can then be selected in
this field or at Setup >Site Builder > Set Up Web Site.
■ Web Site Color Theme – You can select a color theme to change the colors in the site theme
you select and coordinate with the colors in your logo.
You can also create custom color themes at Web Site > Appearance > Color Themes. Custom
color themes can then be selected in this field or at Setup > Site Builder > Set Up Web Site..
■ Web Site Font – Select the font for displaying text in your site.
■ Description Font Size – Enter the font size you want to use for item and category descriptions
in your Web site.
SuiteCommerce Site Builder Guide
8
Setting up a Site Builder Site with the Web Site Assistant
■ Title Font Size – Enter the font size you want to use for item and category titles in your
website.
■ Web Site Logo – Select the logo image from your file cabinet that you want to use in your site.
If your logo is not already stored in the file cabinet, click the New icon to open a new window
where you can upload your image.
4. On the third step, you set up the website Home Page.
■ Label – Enter the name as it should display on the tab or link for this page.
■ Image/Flash ® File – Select the image or Adobe Flash file you want to feature on your Home
page. If you have not already uploaded this file to your file cabinet, click Add New to upload it
in a new window.
Greeting – The text you enter here appears in a shaded box in bold type, like a headline for
this page of your website.
■ Message – The text you enter here appears in a boxed section under the greeting in regular
type.
5. On the fourth step, Tabs, you create additional tabs or pages.
■ Label – Enter the name as it should display on the tab or link for this page.
■ Greeting – The text you enter here appears in a shaded box in bold type, like a headline for
this page of your website.
■ Message – The text you enter here appears in a boxed section under the greeting in regular
type.
On this step, you can click the name of tab previously created to edit the label, greeting or
message. You can also click Save & Create Another to create multiple tabs.
6. When you are finished creating tabs for your site, click Finish.
You can now fill in the pages using the links on the Finished page. If you do not yet have items in your
account, you can import items in bulk using the Item Import Assistant.
You can then use the Web Site Content Manager to publish the items along with other information to
the tabs you have created. For more information on the Content Manager, see Using the Site Builder
Web Site Content Manager.
Using the Site Builder Web Site Content Manager
From a single page in NetSuite, the Content Manager lets you create tabs, categories, item records, and
if you use the Multiple Web sites feature, you can also organize these elements across multiple Site
Builder websites.
Note: Access to hosted content is not available from the Content Manager. For more
information, see Website Hosting with Site Builder.
Use the Content Manager to edit and organize the following elements in a Site Builder site:
■ Tabs
■ Categories
■ Items
■ Information Items (text and images)
■ Forms
SuiteCommerce Site Builder Guide
9
Using the Site Builder Web Site Content Manager
Task
Description
1.
Enter a keyword and click the search icon to find a tab, category, item or form.
2.
To create a new record using the Content Manager, click on the type of content your
want to add. When you click Save, the new content is added to the left pane.
3.
The right pane displays a list of the records that you viewed most recently.
4.
Click + or – to expand or collapse sections. Click the name of a tab, category or item to
open it on the right.
5.
Click UNCATEGORIZED ITEMS to view a list of items that are set to display online, but not
yet published in a category.
You can customize the form you use to edit and create items in the Web Site Content Manager. This is
useful for viewing only the fields you need while working in the Content Manager. Someone with the
Administrator role can complete this task.
To customize the item form for the Web Site Content Manager:
1. Go to Customization > Forms > Entry Forms.
2. Click Customize next to either Standard Manager Inventory Part Form or Standard NonInventory Part Form.
3. Enter a name for your custom form.
4. Use the Subtabs, Fields, and Lists subtabs to determine what can be edited, viewed, or
mandatory for item records in the Content Manager. You can also choose to rename fields, lists
or subtabs.
For example, on the Subtabs subtab, you might decide not to show in the Inventory subtab and
on the Fields subtab, you might decide to make the Search Keywords field mandatory.
5. Leave the Use for Manager box checked to make this form the default form in the Content
Manager. To make this form available as a choice in the Content Manager but not the default,
clear this box.
6. Leave the Web Site Content Manager Only box checked to make this form only available for
item records being accessed in the Content Manager. Clear this box to make the form available
in the Custom Form field on item records accessed from the main items list, as well as in the
Content Manager.
Do not check the Form is Preferred box. Checking this box makes it the preferred form for all
item records, including the regular items list.
SuiteCommerce Site Builder Guide
10
Using the Site Builder Web Site Content Manager
11
7. Click Save.
For more information about using item records, publishing forms and images, see Site Builder Items,
Forms, & Images.
For more information about organizing the catalog of products for your Site Builder site, see Site
Builder Tabs & Categories.
Previewing Your Site Builder Website
Previewing your website lets you verify your site is working properly and set up to your specifications.
To preview your website:
1. Go to Setup > Site Builder > Preview Web Site.
2. Click Preview Site.
3. Your site opens in a new window.
You can click tabs, follow links and check to be sure it's just the way you want.
Customizing Registration for Your Site Builder
Web Store
■ Secure Login Access to Your NetSuite Account
■ Displaying Login Fields on Your Web Page
■ Customizing Login and Logout
■ Registration-Free Shopping
■ Restricting Access to Your Website
■ Customizing the Website Registration Form
Secure Login Access to Your NetSuite Account
For some companies, it is very important to be able to maintain company branding on all pages of their
websites. It is also important to keep NetSuite security policies in mind when building your website.
Warning: The security team at NetSuite does not allow the practice of presenting login fields
to your NetSuite account in an iFrame on your web page.
Displaying the NetSuite login fields in an iFrame on your site could be interpreted by the end user as a
break in the chain of trust. The NetSuite login fields must be presented on the same secure domain as
the page displayed after a visitor logs in. The URL for a secure page always starts with https://.
If the secure login pages that the NetSuite application provides in the web store or customer center
do not suit your company's needs, please read Displaying Login Fields on Your Web Page. Follow
the procedure in this topic to safely display NetSuite login fields on your own HTML page hosted on
SuiteCommerce Site Builder Guide
Customizing Registration for Your Site Builder Web Store
12
NetSuite's secure server. This practice has been approved by the security team at NetSuite to provide
login access to your NetSuite account on your website.
Displaying Login Fields on Your Web Page
You can operate a website hosted by NetSuite and still allow your users to log in to your NetSuite
account. You can also create a custom login page that displays your company's branding on the page
used to log in to your NetSuite account.
To display your company’s branding on the NetSuite account login page, you must create a custom
login page that is hosted in the NetSuite File Cabinet, then display a link to it on a different page on
your website.
Your custom login page, and any images displayed on it, must be uploaded to the images folder in the
file cabinet at Documents > Files > Images. Also, you must use the secure URL displayed on the file
record in any tags you use to display content on your login page.
Tip: If you are coming from an external system that has its own authentication module,
consider using inbound single sign-on to access your NetSuite account for a seamless user login
experience. For more information, see Inbound Single Sign-on.
Important: In 2016.2, NetSuite has begun the gradual process of segregating Customer
Center roles from non-Customer Center roles. This segregation of roles means that a separate
login page for Customer Center roles is required. You can use the login pages NetSuite provides
for this purpose, or you can create your own custom login pages. See FAQ: Customer Center Roles
Segregation for more information.
The security team at NetSuite does not allow the practice of presenting login fields to your NetSuite
account in an iFrame on your web page. The following procedure has been approved by the security
team at NetSuite to provide login access to your NetSuite account.
The following procedure describes how to create custom login pages. If you are creating a custom
login page for Customer Center roles, you must know your account ID to complete this procedure. The
variable in the following code example is <ACCOUNT_ID>).
To locate your account ID, go to Setup > Company > Company Information. The account ID field is
located near the bottom of the right column.
To create a custom login page to your NetSuite account:
1. Create a custom login page in HTML, using the code below to display the NetSuite account login
fields. Save the HTML file to your hard drive.
■ If you are creating a custom login page for non-Customer Center roles, you could, for
example, name the file NSlogin.html. You do not have to modify the code shown below if
you are creating a non-Customer Center login page.
■ If you are creating a login page for Customer Center roles, you could name the file, for
example, NSprivatelogin.html. You must modify two lines in the sample. In each line you
modify, replace the variable <ACCOUNT_ID> with your account ID.
□ Modify the first line (the post action link) as shown:
<form method="post" action="/app/login/secure/privatelogin.nl?
c=<ACCOUNT_ID>
□ Modify the href line for the Forgot your password link as shown:
SuiteCommerce Site Builder Guide
Customizing Registration for Your Site Builder Web Store
13
<href="/app/login/preparepwdreset.nl?private=t&c=<ACCOUNT_ID>">
Note: The code only represents the basic required fields for login to your NetSuite
account. You can add content to this file, but you must use a secure URL to refer to any
additional files.
<!--The post action link below is for a non-Customer Center login page-->
<form method="post" action="/app/login/nllogin.nl">
<!--For a Customer Center login page, modify the post action link as specified in step 1.-->
<table border="0" cellspacing="0" cellpadding="3">
<tr>
<td>
Email address:<input name="email" size="30">
</td>
</tr>
<tr>
<td>
Password:<input name="password" size="30" type="password">
</td>
</tr>
<tr>
<td>
<!--The href link below is for a non-Customer Center login page-->
<a href="/app/login/preparepwdreset.nl">Forgot your password?</a>
<!--For Customer Center login page, modify the href link as specified in step 1.-->
</td>
</tr>
<tr>
<td>
<input type="submit" name="submitter" value="Login" >
</td>
</tr>
</table>
</form>
2. Go to the Images folder in the NetSuite File Cabinet (Documents > Files > Images).
3. Click Add File, and then select the appropriate HTML file for the custom login page that you
created in step 1. Ensure that the “Available without login” box is selected.
4. Click Open. The HTML file for your custom login page is uploaded to the file cabinet. You can also
add any additional files you want to use for content on your custom login page to this folder.
Ensure that the “Available without login” box is selected for these files.
5. Determine the secure URL for your custom login page. You will use the secure URL later to
display the link to your custom login page.
a.
Go to the Images folder in the NetSuite File Cabinet (Documents > Files > Images).
b.
Click Edit next to the HTML file for your custom login page.
c.
Copy the NetSuite URL that starts with https://system.... You will use this URL to create
a link to your login page.
6. Reference your custom login page from your website. You can now link to your custom login
page from any external source by adding an href that uses the secure URL you copied in step
5.c.
For example:
SuiteCommerce Site Builder Guide
Customizing Registration for Your Site Builder Web Store
14
<a href="https://system.netsuite.com/....>Login Here</a>
Do not copy the example! Use the URL you copied in step 5.c. in your href.
Important: The HTML file for your custom login page you created in step 1 must be
hosted in the NetSuite File Cabinet. The external source hosting the link does not have to
be in the NetSuite File Cabinet.
When visitors click the link to your custom login page, they can enter their email and password on the
page you created that displays your company's branding.
Customizing Login and Logout
You can display your company branding on a custom login page that you create for your employees,
customers and partners. For more information about creating a secure hosted login page to NetSuite,
see Displaying Login Fields on Your Web Page. Also, you can further establish your company branding
when members of your organization log out by specifying a custom logout landing page.
Customizing Login
When someone attempts to login with the wrong password or email, you can display an error on your
hosted login page. This lets you maintain consistent company branding on the login page, instead of
redirecting to a generic NetSuite branded error page.
To display an error on your custom hosted login page:
1. Add an error redirect hidden field to the login form in your hosted HTML page, for example:
<form method="post" input type="hidden" name="errorredirect" value="/myloginpage.html"...
2. Add JavaScript, in the header of your login page, configured to read and display the error
message.
3. Upload your custom HTML page to the File Cabinet.
4. Publish the secure URL of the hosted page to the people who use that page for login. The secure
URL begins with https://. You can find the secure URL for your hosted page by clicking Edit next
to the file record in the file cabinet
Now, when someone attempts to log in on your hosted page and fails, an error indicating the problem
displays on your login page.
Customizing Logout
You can connect your company website's look and feel with the NetSuite application by specifying a
landing page when employees, customers or partners log out.
To specify a landing page for logout:
1. Go to Setup > Company > General Preferences.
2. Click the Centers subtab to select the appropriate center.
SuiteCommerce Site Builder Guide
Customizing Registration for Your Site Builder Web Store
15
3. Enter the URL for the Sign Out Landing Page.
When employees, customers or partners click the Sign Out link in the upper left of the NetSuite page,
they are redirected to the custom HTML page you specified above.
Registration-Free Shopping
You can allow customers to shop and purchase items in your web store without having to create a login
and password.
When a customer purchases items without creating a login and password, a customer record is created
using the information provided during checkout. Each time the customer returns and purchases items,
a new customer record is created. If you do not use Auto-generated numbers, a number is added to
the end of the customer name for each additional customer record created.
You can use the Duplicate Detection feature to merge duplicate records that may result from
registration-free shopping.
To allow registration-free shopping:
1. Go to Setup > Site Builder > Set Up Web Site. If you use the Multiple Web Sites feature, click Edit
next to a website.
2. Click the Shopping subtab.
3. In the Customer Registration Is field, select optional.
4. Click Save.
Customers can now shop in your store without entering registration information. A new customer
record is created each time a shopper submits an order in your web store. Any duplicate customer
records appear in the list of customers with a number appended to the name. For example, if Jane
Smith already exists as a customer in the system, the next customer who places an order with the
same name displays in NetSuite as Jane Smith 2.
You can manage duplicate records by enabling the feature, Merge Duplicates from Setup > Enable
Features > CRM. After that feature is enabled, you can periodically run the duplicate merge operation
from the Search menu.
Note: Customers who choose not to register will not have a My Account tab and therefore
cannot download items, check order status or make payments from your site. They will need to
enter personal information every time they purchase from your store.
Restricting Access to Your Website
You can restrict access to your website in two ways:
■ Password-protect your site so that only visitors you have given access to in your account can view
the site.
■ Restrict checkout to existing customers only, so that visitors can view your site but cannot purchase
anything unless you have given them customer center access.
SuiteCommerce Site Builder Guide
Customizing Registration for Your Site Builder Web Store
16
Note: These preferences are only available with the Advanced Site Customization feature
available with Site Builder.
To password protect your site:
1. Go to Setup > Site Builder > Set Up Web Site..
2. If you use the Multiple Web Sites feature, click Edit next to a website.
3. On the Shopping subtab, in the Registration Page section, check the Password Protect Entire
Site box.
4. Click Save.
Visitors must first log in to view the home page of your site, and then they can navigate all the pages of
your website.
To restrict checkout:
1. Go to Setup > Site Builder > Set Up Web Site..
2. If you use the Multiple Web Sites feature, click Edit next to a website.
3. Click the Shopping subtab.
4. In the Customer registration is field, select existing customers only.
5. Click Save.
Now, visitors can view your website, but they cannot purchase items unless you have given them
customer center access in your account.
Customizing the Website Registration Form
You can use custom entity fields in your website to collect additional information from your customers
during registration. When shoppers register, the information they enter shows up in the customer
record created in NetSuite. Employees with the Store Manager role cannot set up custom entity fields.
These steps are provided for those with Administrator roles.
To use entity fields in your site:
1. Go to Customization > Lists, Records, & Fields > Entity Fields > New..
2. In the Label field, enter a name for the custom field.
3. In the ID field, enter an ID for this field with no spaces.
This ID is used in attribute tags if you want to call information saved in this field for display in
your site. For more information, see Creating Attribute Tags for Custom Records and Custom
Fields.
4. Select a kind of custom field in the Type field.
5. If you selected List/Record in the Type field, select the type of list or record that can be selected
in this field.
6. Make sure the Store Value box is checked to store the information gathered in this field in your
account. You should only clear this box if this field is meant for display only.
7. Check the Show In List box to show information from this field on entity lists.
SuiteCommerce Site Builder Guide
Customizing Registration for Your Site Builder Web Store
17
8. If you selected List/Record in the Type field, you can check the Record is Parent box to indicate
that the record type selected is a parent record. This field is used to create a parent-child
relationship between two record types.
9. On the Applies to subtab, check the Customer:Project and Web Site boxes. Checking these
two boxes indicates for your custom field to appear in both your site registration form and in
customer records.
10. On the Display subtab, set the display location and enter help for this field.
11. On the Validation & Defaulting subtab, decide if you want to make this field mandatory for
customers or to check spelling in the field.
12. On the Sourcing & Filtering subtab, decide what should be available for selection in this field.
Selections available for sourcing depend on the type of custom field you are creating.
13. Click Save.
This custom entity field appears in the registration of your site. When a customer registers in your site,
these custom entity fields automatically record your customer's information on their customer record.
Setting Up Your Site Builder Home Page
The Home tab is included in the standard set of tabs NetSuite provides for your Site Builder website.
However, you can choose any tab or hosted HTML file as your website home page. If you prefer to
create your own tab, see Creating Website Tabs.
Your website's home page can present vital information about your web store to visitors by displaying a
Flash® file, a logo image, or by including a greeting or message targeted at online customers. For more
information, see Changing the Image and Text on Your Home Page Tab.
You can also increase the visibility of certain items by featuring them on your home page. For more
information, see Featuring Items.
Note that the Home page tab does not support pagination. If you want to display a long list of items,
you can set the row limit on a layout to display the full list. For more information, see Applying a Layout
or Template on Your Site Builder Home Page. Alternatively, you could use a different presentation tab
as the home page for your site. All other presentation tabs support pagination for item lists by default.
Read the topics below to set up your website home page:
■ Selecting a Site Builder Home Page
■ Changing the Image and Text on Your Home Page Tab
■ Applying a Layout or Template on Your Site Builder Home Page
Selecting a Site Builder Home Page
You can select a website tab or an HTML page hosted in the file cabinet as your website's home page.
To select your website's home tab or page:
1. Go to Setup > Site Builder > Set Up Web Site.
2. If you use the Multiple Web Sites feature, click Edit next to a website.
3. In the Web Site Home Page Type field, select one of the following:
■ Web Site Tab – This is a tab you have created in NetSuite at Lists > Web Site > Tabs.Lists > Site
Builder > Tabs
SuiteCommerce Site Builder Guide
Setting Up Your Site Builder Home Page
18
■ Hosted Web Page – This is an HTML file you have uploaded to the Web Site Hosting Files
folder in the NetSuite file cabinet.
4. In the Web Site Home Page field choose the tab or HTML file you want to use as the landing
page for your website.
5. In the Default Hosting Root field, you can select the root folder where your hosted files exist in
the file cabinet.
6. Click Save.
Changing the Image and Text on Your Home Page Tab
You can add a Flash file or an image to the home page of your web store in addition to a greeting or
message for online visitors. Note that only the standard home tab provided by NetSuite includes a field
for displaying a Flash file.
To change the image and text on the home tab:
1. Upload your own Flash or image file to the Images folder of the file cabinet.
2. Go to Lists > Web Site > TabsLists > Site Builder > Tabs. Click Edit next to your Home page.
3. In the Category List Layout field, select Standard Featured Items Layout, or one of the basic
site templates labeled WELCOME (category layout).
Note that the layout you select determines whether or not your Flash file runs properly. If you
use the Advanced Site Customization feature, you can further customize the basic templates in
NetSuite. For more information, see Creating Item/Category Templates.
4. Select your picture in the Image / Flash® File field.
5. Enter text for display on the home page in the Greeting field and the Message field. You can
enter basic HTML in these fields.
6. Click Save.
Applying a Layout or Template on Your Site Builder Home
Page
You can apply a layout or template to your website tab to customize the look and feel of your home
page. For general information about website layouts, see Creating and Editing Website Layouts.
To apply a layout or template to your home page tab:
1. Go to Lists > Web Site > TabsLists > Site Builder > Tabs.
If you use the Multiple Web Site feature, select the site in the Web Site list.
2. Click Edit next to your home page tab.
3. In the Category List Layout field, select one of the layouts named WELCOME (category layout).
4. In the Items List Layout field, select one of the layouts named WELCOME (item layout).
Note: The basic standard WELCOME layouts are formatted specifically for the home
page tab that NetSuite provides.
5. Click Save.
SuiteCommerce Site Builder Guide
Setting Up Your Site Builder Home Page
19
If you use the Advanced Site Customization feature, you can customize the HTML in the standard basic
Item/Category Templates and then select one of your custom templates for use on the home page tab.
For more information, see Customizing Site Themes.
Creating Multiple Websites
When you use the Multiple Web Sites feature, you can create more than one website in your NetSuite
account, each with its own branding, look, and feel. Each site can have a separate URL, separate items,
and separate shopping carts. In addition, each site can have a different source. For example, one site
can be an HTML site you host from NetSuite, one can be a NetSuite-generated site with some of your
items, and one site can be an external catalog site that links to a NetSuite shopping cart.
The following is shared between multiple websites and cannot be changed on a per-site basis:
■ Customer Center orders, items, and cases
These will all show together if the customer has one customer record and login for all of your
websites. To avoid this, you may want to keep duplicate records for customers if they registered for
different sites with unique logins and therefore have more than one customer record.
■ Web site reports and analytics
■ Custom text on the Customize Web Site Text page
■ Item names and descriptions
■ Category names, descriptions, and images
■ Shipping items/methods
■ Image resizing on the Resize Images page
Before you can set up multiple websites first make sure the Multiple Web Sites feature is enabled in
your account at Setup > Company > Setup Tasks > Enable Features > Web Presence.
When you use the Multiple Web Sites feature, the Set Up Web Site page where you would otherwise set
up a single website becomes a list for your multiple sites. You can use this page to create a new site, or
edit preferences on an existing site.
To set up multiple websites:
1. Go to Setup > Site Builder > Setup Tasks > Set Up Web Site > New.
2. In the Display Name field, enter a display name as the published name to your site.
3. In the Internal Name field, enter a name for your site that will show in lists and fields in your
NetSuite account. Having a different internal name can be useful if you need to note in the name
what the site is used for or if you want to publish two sites with the same name that are different
internally.
4. Before setting other preferences, click Save. This saves your site in your account and lets you
select the new site name when setting up your URL on the domains page.
5. Set up your domain name for this site at Setup > Site Builder > Setup Tasks > Domains. Make
sure to select your new site name in the Web Site column.
For more information on settling up domains, see the help topic Domain Names.
6. Return to Setup > Site Builder > Setup Tasks > Set Up Web Site. Click Edit next to the site name.
7. You can now set preferences specific to this site, such as theme, logo, and language.
For more information on setting preferences for a site, see the list of related topics at the bottom
of this page.
SuiteCommerce Site Builder Guide
Creating Multiple Websites
20
8. Click Save when you have finished setting preferences.
You can now add content to this site. For more information, see Publishing Content With Multiple
Websites. See also, Creating Hosting Root Folders for Multiple Websites.
For instructions on publishing an item on the home page of your website, see Featuring Items.
Publishing Content With Multiple Websites
When you use the Multiple Web Sites add-on and feature, you can choose which website you want to
publish a tab, a category or an item to. When visitors view a page of a site, they can only access the
tabs assigned to that site.
Categories are only assigned to one tab and therefore only to one site. However, you can publish items
to more than one site in the categories and tabs you choose. You can also reuse tab and category
names across sites if needed. Because you must select a site before selecting a category, you are
prevented from selecting the wrong category or tab when you reuse a name.
To publish content to a NetSuite site:
1. To create tabs for your site, go to Web Site > Publishing > Tabs > New to create tabs for your site..
2. If you are creating a hosted tab for a combination site, click New Hosted Tab.
If you are creating a tab with items or information from your NetSuite account, click New
Presentation Tab.
3. On the tab record, in the Site field, select the site where the tab should show, and fill in other
information for the tab. For more information on creating tabs, see Creating Website Tabs. A tab
can only show in one site. If you need a tab with the same name in two sites, you can create a
second tab with the same name and select the other site name.
4. Repeat these steps for each tab you need in each site.
You can now add categories to organize the tab.
5. Go to Web Site > Publishing > Categories > New..
6. On the category record, in the Site field, select the site where this category should show.
Selecting a site filters the list of categories you can select in the Subcategory of field. It does not
publish a category or saved search only.
7. In the Subcategory of field, select the tab or category where this category should be placed. Only
tabs and categories set to show in the site you chose can be selected.
Important: If you are editing the location of a category or a published saved search,
remember to change the category in this field. Changing the site in the Site field only
does not change the location.
8. At the bottom of the Basic subtab, select and add each item that should show in this category
on this site. You can add information items for posting text, you can select items to sell, or select
files from the file cabinet to share. To select more than one item, click Add Multiple. Items are
not shown online until they are added to a published category.
Categories are published when they meet the following criteria:
■ The Display in Web Site box is checked or an audience is selected on the Audience subtab.
■ The parent category is a tab that is displayed in the website or includes the same audience.
9. Fill in other information for this category. For more information, see Creating Site Categories.
SuiteCommerce Site Builder Guide
Creating Multiple Websites
21
Your tabs, categories, and items are now added your site. When you create or edit items in the future,
you can add them or remove them from a site on the Store subtab of the item record.
Previewing Sites With the Multiple Web Sites Feature
When you do not have the Multiple Web Sites feature enabled, you preview a website at Setup > Site
Builder > Preview Web Site.
With the Multiple Web Sites feature enabled, you can still use the Preview Web Sites page, or use the
Preview link from the Web Sites list at Setup > Site Builder > Set Up Web Site.
Multiple Website Online Pricing
You can create multiple online price levels, enter different online prices for your items, and then
choose which online price should display for items on your web store.
If you use the Multiple Web Sites feature, you can display the same item on different sites with different
price levels on each site. For example, you may want to display items with discount or wholesale pricing
on one of your websites, while another site displays the retail price.
To apply a price level to items in your web store, first create the price level. Then, enter the price for
this price level on the item record, and finally, apply the price level to your web store.
To create the price level you want to apply to items in your website:
1. Go to Setup > Accounting > Accounting Lists > New.
2. Select Price Level.
3. Click New.
4. In the Price Level field, enter a name for your new price level. For example, you might include
the website name in the price level name.
5. You can enter a positive or negative percentage in the Markup/Discount % field to mark up or
discount prices that may already exist for this price level.
If you want to update all items with prices at this price level, check the Update Existing Prices
box to apply the markup or discount.
6. Check the Online Price Level box.
7. Click Save.
To enter a value for the new price level on an item record:
1. Go to Lists > Accounting > Items.
2. Click Edit next to an item.
On the Pricing subtab, you will see a field for your new price level.
3. Enter a price for the new price level.
4. Click Save.
To choose which price level to apply to the website:
1. Go to Setup > Site Builder > Setup Web Site.
SuiteCommerce Site Builder Guide
Creating Multiple Websites
22
If you use the Multiple Web Sites feature, click Edit next to the site you want to modify.
2. Click the Setup subtab.
3. In the Multi-Site Settings section, set the Price Level field.
4. Click Save.
Now items displayed on the site show prices from the price level you defined on the item records.
If you do not enter a price for the new price level field on an item record, that item displays the default
online price. Customers who have a price level defined on their customer record continue to see
their price level when they log in on any of your websites. For more information, see Site Builder and
OneWorld.
Multiple Web Site Pricing and the Customer Center
When a shopper enters a sales order from the My Account tab on your web store, items on the sales
order form display the price level for the site.
When a shopper logs into the Customer Center from www.netsuite.com, they see the price level for
the last web store they visited. If your customer has not visited any of your websites, they see the price
level assigned to your primary website.
Creating Hosting Root Folders for Multiple Websites
To organize files more efficiently, you can create a hosting root folder for each of your websites. After
you associate a domain with a hosting root, each file in the root folder generates a unique URL that
includes the domain.
To create an additional website hosting folder:
1. Go to Setup > Site Builder > Web Site Hosting Files.
2. Click New Folder.
a.
Name the folder for the hosting root or website you are creating.
b.
Accept the default value in the Sub-Folder of field. The default setting is Web Site Hosting
Files.
c.
Click Save.
3. Upload files to the folder you created in Step 2. You can also create a sub folder for image files in
this hosting root.
4. To associate the website domain name with your new hosting root folder, go to Setup > Site
Builder > Domains.
SuiteCommerce Site Builder Guide
Creating Multiple Websites
a.
Enter a domain name for your website.
b.
Select a hosting root for your website. All the website hosting folders show in the list
under HTML Hosting Root.
c.
Click Save.
23
If you associate a hosting root folder with a domain, the domain is included in the URL generated for
each file in that folder. Click Edit next to any file in the hosting root folder to see a list of the URLs you
can use to point to that file on any page of your site.
Site Builder and OneWorld
When you use Site Builder in a NetSuite OneWorld account, you can associate multiple subsidiaries
with a website. Although there is one website, site visitors can choose the subsidiary information they
want to view by making a selection from a list displayed on the site. After selecting a subsidiary, the site
shows only the following types of information specifically associated with that subsidiary:
■ Language options
■ Currency options
■ Minimum order amount
■ Tax rates
■ Shipping items
■ Credit card options
■ Items and information items
For example, when parent company Wolfe Electronics creates a Site Builder website, the main site's
home page has a field where visitors can select Wolfe Electric US or Wolfe Integrated Circuitry UK. If
the visitor selects Wolfe Electric US, then items and shipping options available in the United States are
displayed. The currency on the website is set to the US dollar, and the customer is charged US sales
tax.
Setting Up Site Builder for Multiple Subsidiaries
You can set up your site to display items and information specific to each of your subsidiaries, by
marking them online on the Set Up Web Site page. When subsidiaries are marked online, the Select a
Region list displays on your site. A visitor to your site can select a subsidiary from the list and see items,
language, tax information, shipping and payment options associated with that subsidiary.
The following steps are for accounts not using the Multiple Web Sites feature. For more information
about setting up multiple websites with subsidiaries, see Subsidiary Management with Multiple Site
Builder Sites.
SuiteCommerce Site Builder Guide
Site Builder and OneWorld
24
To select subsidiaries for the region select list displayed online:
1. Go to Setup > Site Builder > Set Up Web Site.
2. On the Setup subtab, scroll down to the list of subsidiaries.
3. In the Online column, check the box next to the subsidiary that should be available on your
website.
4. In the Default column, select one subsidiary to act as the main site.
Your default site is the site unregistered visitors or customers who have not logged in see first.
Search engines can only spider your default subsidiary site.
5. In the Display Name column, you can create an external name for each subsidiary to show on
the site. This is the name site visitors select when choosing which subsidiary to view.
6. Click Save.
After completing the setup steps, the Select a Region list is added your site. Visitors to your website
can choose a subsidiary from the list. If you use the Advanced Site Customization feature, you can
change the name of the list at Setup > Site Builder > Customize Text.
Displaying Subsidiary Languages and Currencies on your
Website
Choosing a subsidiary in the website changes the site to display the default language of that subsidiary.
Only an account administrator can add languages on a company's General Preferences page. However,
employees with the default Store Manager role can mark languages available online on the Setup Web
Site page. To select the languages available for your account, see the help topic Setting Up a Site for
Multiple Languages.
To set the languages available for your website:
1. Go to Setup > Site Builder > Set Up Web Site.
2. If you use the Multiple Web Sites feature, click Edit next to a website.
3. Click the Appearance subtab.
4. Scroll down to the bottom of the page, and click the Languages subtab.
5. In the Online column, check the box next to the language that should be available on your
website. You can choose multiple languages.
6. Click Save.
Choosing a subsidiary in the website changes the site to display the default currency associated with
that subsidiary.
To set the currencies available on your website:
1. Go to Setup > Site Builder > Set Up Web Site.
2. If you use the Multiple Web Sites feature, click Edit next to a website.
SuiteCommerce Site Builder Guide
Site Builder and OneWorld
25
3. Click the Shopping subtab.
4. Scroll down to the bottom of the page.
5. In the Default column, select one currency to act as the main currency.
Your default currency is displayed on your site before visitors choose a subsidiary.
6. In the Online column, check the box next to the currencies that should be available on your
website.
7. Click Save.
Navigating Directly to a Subsidiary Website in Site Builder
You can provide customers with a URL to view a certain subsidiary on your website without having to
select the subsidiary from the list on your site. To create a URL that goes directly to a subsidiary, add
&subsidiary={nkey of subsidiary} to the end of your website's URL.
For example, the URL for your site displaying a subsidiary with nkey 5 might look like this, if you use a
custom domain for your website: http://shop.mystore.com?subsidiary=5.
To find the nkey of the subsidiary, you can:
■ Open the subsidiary record in your account and find the number following id= in the URL of the
page, or
■ Turn on the Show Internal IDs preference at Home > Set Preferences > General, and find the ID in
the list of subsidiaries at Setup > Company > Subsidiaries.
Subsidiary Management with Multiple Site Builder Sites
When you use the Multiple Web Sites feature in a NetSuite OneWorld account, you can create
completely separate websites for each subsidiary. This lets you create an entirely different look and feel
for each site, including different colors and logos.
To do this, see the steps for creating multiple sites, Creating Multiple Websites. On each site record, set
one subsidiary as online and default. Each site then uses the appearance and shopping preferences
set on the Set Up Web Site page for that site and displays the items and options for the subsidiary
selected.
To set up multiple Site Builder sites with multiple subsidiaries:
1. Go to Setup > Site Builder > Set Up Web Site.
2. Click Edit next to a website.
3. On the Setup subtab, scroll down to the list of subsidiaries.
4. In the Online column, check the box next to the subsidiary (or subsidiaries) that should be
available on the website.
5. In the Default column, select one subsidiary to act as the main site.
Your default site is the site unregistered visitors or customers who have not logged in see first.
6. In the Display Name column, you can create an external name for each subsidiary to show on
the site. This is the name site visitors select when choosing which subsidiary to view.
7. Click Save.
8. Repeat the steps above for each website for which you want to display subsidiaries online.
SuiteCommerce Site Builder Guide
Site Builder and OneWorld
Managing Website Customers in OneWorld with Site
Builder
Visitors to your website can use a list displayed on your Site Builder site to select the subsidiary
information they want to view. After the visitor selects a subsidiary, that subsidiary is assigned to the
customer record created when he or she submits an order. If the visitor does not submit an order, but
signs up on your website, then the subsidiary is assigned to the lead record created in NetSuite.
Customers returning to your website are automatically directed to the subsidiary on the customer
record, and the list of subsidiaries is not displayed in the site. An administrator can only reset the
subsidiary on the customer record in NetSuite if no transactions have occurred.
Setting the Default Customer Role
New customers registering on your website are assigned a default customer role that you specify. In a
OneWorld account, the corresponding subsidiary must be defined on the default customer role. If the
subsidiary is not defined on the default customer role, then information such as shipping options may
not be available to the customer.
To define a subsidiary on the default customer role:
1. Go to Setup > Company > General Preferences.
2. Find the Default Role for New Customers field. Remember the role selected here.
3. Go to Setup > Users/Roles > Manage Roles.
4. On the list of roles, find the role that is selected as the default role for new customers from Step
2. Click the link to view the values in the Subsidiaries list. All subsidiaries that have web stores
should be selected. You can click Customize to update the role.
Note: To complete this task, you need an administrator role, or permission to modify
users and roles.
Selecting a Credit Card Gateway for a Subsidiary Website
To associate payments from online orders with the right subsidiary, you must select the credit card
gateway on the Set Up Web Site page. For Site Builder, you can associate multiple subsidiaries and
gateways with one website. For SuiteCommerce Advanced, you must select one subsidiary and one
gateway for each website. The following steps can be applied to both Site builder and SCA. Only an
administrator can set up new credit card processors in NetSuite. However, employees with the default
Store Manager role can associate the credit card processor with a subsidiary website.
To select a payment processing profile for a website associated with a subsidiary:
1. Go to Setup > Site Builder > Setup Tasks > Set Up Web Site (Administrator).
2. If you use the Multiple Web Sites feature, click Edit next to a website.
3. In the Payment Processing Profiles column, select a Payment Processing Profile for each
subsidiary marked online.
Note: For SuiteCommerce Advanced (SCA), you can have only one subsidiary for each
website. For more information, read SCA and OneWorld.
4. Click Save.
SuiteCommerce Site Builder Guide
26
Site Builder and OneWorld
27
Displaying Items in Site Builder with OneWorld
When a shopper visits your web store and selects a subsidiary from the list, only items published to
that subsidiary are displayed on the site.
Note that on the web store, NetSuite automatically displays prices for items based on currency
conversion. You must assign an Online price that is equal to the base price if you want to bypass the
currency conversion per price level.
To publish items to a subsidiary in Site Builder:
1. Go to Lists > Accounting > Items.
2. Click Edit next to an item.
3. In the Subsidiary field, select the subsidiary you want to associate with the item.
Note: To make the item available in multiple subsidiaries, press and hold the CTRL
button as you select the subsidiaries in the list.
4. Check the Display in Web Site box.
5. On the Pricing subtab, enter a price for each currency available online.
Note: Pricing values are not automatically converted for display in the web store. If you
do not enter a price for a currency that is available online, when a shopper selects that
currency and region combination on the website, the item is flagged as “Free.”
6. On the Web Site Categories subtab, select a Site Category for displaying the item online. Click
Add.
For more information about the fields on the Web Store subtab, see Setting Up Items for the
Web Site.
7. Click Save.
For more general information about working with items in NetSuite OneWorld, see Setting Up Inventory
in OneWorld.
For more information about displaying items in your website, see Displaying Items and Information.
Setting up Multiple Currencies in a Site Builder
Web Store
You can display and sell website items in any currency you set up in NetSuite. First, your customers
choose their currencies on your website. Then, all prices are automatically updated to display your
customers' preferences.
You can use this feature on a Site Builder website. Also, you must have the Multi-Currency feature
turned on. To do this, go to Setup > Enable Features > Company. Check the Multi-Currency box, and
click Save.
Then, navigate to Setup > Site Builder > Set Up Web Site. On the Appearance subtab, check the box
next to Show Web Site Currency, and click Save.
Checking this box will display a currency selector in your web store. The first time customers visit your
site, they can select a currency. This will convert all prices in your store to the currency they select. This
includes prices in the shopping cart, checkout sequence, and in the Customer Center.
SuiteCommerce Site Builder Guide
Setting up Multiple Currencies in a Site Builder Web Store
28
Note: After a customer selects a currency and completes a transaction, that customer must
use the same currency on all subsequent transactions.
To set currencies for display on multiple websites:
If you use the Multiple Web Sites feature, you can set different currencies to display on different web
Sites.
1. Go to Setup > Site Builder > Setup Web Site.
2. Click Edit next to the site you want to work with.
3. Click the Shopping subtab, and scroll to the bottom of the page.
4. In the Online column, mark the currencies you want to display on the website.
5. In the Default column, mark the currency which is the default for this site. This currency will
automatically display in the Currency portlet on the web store, if the shopper does not select a
different currency.
6. You can set a Minimum Order Amount for any of the currencies displayed on your site.
Shoppers are not allowed to complete checkout unless the total price of the items in their cart is
equal to or greater than the minimum order amount set here.
Setting Web Store Backorder and Out-of-Stock
Preferences
The instructions below explain how to specify preferences for back orders and selling out-of-stock
items in your Site Builder web store.
To set up back order preferences for the site:
1. Go to Setup > Site Builder > Set Up Web Site.
2. If you use the Multiple Web Sites feature, click Edit next to a website.
3. Click the Shopping subtab.
4. In the Webstore Out Of Stock Items field, select how to handle items that are out of stock in
your web store:
■ Allow back orders but display out-of-stock message – Customers can purchase an out-ofstock item. A message appears beside the item in your store informing customers this item
is out of stock. However, this item can be purchased and processed through your shopping
cart.
■ Allow back orders with no out-of-stock message – Customers can purchase an out-of-stock
item. No message is posted saying this item is out of stock.
■ Disallow back orders but display out-of-stock message – Customers cannot purchase an
out-of-stock item. A message appears beside your item in your store informing customers
this item is out of stock. The Add to Shopping Cart link is removed from beside this item.
■ Remove out-of-stock items from store – Customers cannot purchase out-of-stock items
because they are automatically removed from your store until their supply is replenished.
Note: If you choose this setting and turn on the Multi-Location Inventory feature,
items do not show in your web store until after they have been distributed.
5. Click Save.
SuiteCommerce Site Builder Guide
Setting Web Store Backorder and Out-of-Stock Preferences
29
Note: The Disallow back orders but display out-of-stock message or Remove out-of-stock
items from store option does not prevent you from adding the out of stock items to the
shopping cart using the additemtocart.nl request handler or the addItem(item) and
addItems(items) order methods. However, when you try to place the order with such out
of stock items in your shopping cart, an error message is displayed and you will not be able to
place the order successfully.
You can also set the out-of-stock messages and the out-of-stock behavior for each item individually.
Use the following instructions to modify settings on the item record.
To set up out of stock behavior on the item record:
1. Go to Lists > Accounting > Items.
2. Edit the item record.
3. Click the Web Store subtab.
4. In the Out of Stock Message field, enter an out-of-stock message you want to display when this
item is out of stock.
5. In the Out of Stock Behavior field, select an option for back-ordering items that are out of stock
in your web store.
6. Click Save.
The settings on the item record override the preference on the Set Up Web Site page.
Note: If you use the Advanced Inventory Management feature, you can use a NetSuite Web
Site Tag to display the lead time for when you expect the item will be in stock. For example: This
item will be back in stock in <%=getAttribute('item',id,'storeleadtime')%> days.
Customizing the Shopping Cart in Site Builder
Whether you have a hosted HTML site, a NetSuite-generated site, or an External Catalog site, NetSuite
automatically displays the shopping cart in your site when you choose Web Store as the Web Site Scope
preference at Setup > Site Builder > Set Up Web Site.
To customize the shopping cart, choose the columns you want to show in the cart, you can also modify
the width, and the order in which the columns display. Note that all the columns displayed in the
shopping cart also display in the order fulfillment email notification sent to the customer. You can also
use the extended cart.
Note: If you are using the Multiple Web Sites feature, you will not see a Cart subtab on the Set
Up Web Site page until after you click Save on the Web Site Setup page for the first time.
To customize the shopping cart:
1. Go to Setup > Site Builder > Set Up Web Site.
2. If you use the Multiple Web Sites feature, click Edit next to a website.
3. Click the Cart subtab.
4. Check the box in the Show column next to each column you want to display in your site.
5. Using the handles on the left side of each column name, click and drag the column to the correct
position. The top of the list represents the left-most side of the shopping cart.
6. In the Width column, enter the percentage of space each column should take, totaling to 100%
among shown columns.
SuiteCommerce Site Builder Guide
Customizing the Shopping Cart in Site Builder
30
7. Click Save.
Customizing Checkout in Site Builder
You can use custom transaction body fields in your web store to collect additional information from
your customers during checkout.
When shoppers check out, the information they enter shows up on the sales order created in NetSuite.
Employees with the Store Manager role cannot set up custom transaction body fields. These steps are
provided for those with Administrator roles.
To use transaction body fields in your store:
1. Go to Customization > Lists, Records, & Fields > Transaction Body Fields > New..
2. In the Label field, enter a name for the custom field. This is the name of the field as it will show
to customers.
3. In the ID field, enter an ID for this field with no spaces. This ID is used in attribute tags if you
want to call information saved in this field for display in your site. For more information, see
Creating Attribute Tags for Custom Records and Custom Fields.
4. Select an option in the Type field.
5. If you selected List/Record in the Type field, select the type of list or record that can be selected
in this field.
6. Make sure the Store Value box is checked to store the information gathered in this field in your
account. You should only clear this box if this field is meant for display only.
7. Check the Show In List box to show information from this field on sales transactions lists.
8. If you selected List/Record in the Type field, you can check the Record is Parent box to indicate
that the record type selected is a parent record. This field is used to create a parent-child
relationship between two record types.
9. On the Applies to subtab, check the Sale and Web Store boxes. Checking these two boxes
indicates for your custom field to appear in both your store and on sales orders.
10. To print this custom field on standard forms, check the Print on Standard Forms box.
11. On the Display subtab, set display location and enter help for this field
12. Click the Validation & Defaulting subtab, and then check the Mandatory box to make this a
required field. This subtab also includes other options such as Maximum Length, and Default
Value.
13. On the Sourcing & Filtering subtab, decide what options customers should be able to select
online. Selections available for sourcing depend on the type of custom field you are creating.
14. Click Save.
This custom body field appears in the checkout of your store. When you approve a sales order from
your store, these custom body fields automatically record your customer's information on the sales
order.
Best Practices for Website Performance
This topic describes ways in which you can improve performance on your website and create pages
that load quickly.
■ Limit the number of items displayed on a page to 25 items or fewer.
SuiteCommerce Site Builder Guide
Best Practices for Website Performance
31
You can do this by restricting the number of rows and columns on the page layout. NetSuite
imposes a limit of 50 items per page, but pages with 25 or fewer items load faster.
For more information about creating layouts for your website pages, see Creating and Editing
Website Layouts.
■ Avoid hosted pages that display more than 25 items.
Because hosted pages use Web Site Tags to display items, NetSuite is unable to limit the number of
items on hosted pages. You can create performance problems by making hosted HTML pages that
display hundreds of items.
■ Display no more than 250 items in your web store categories.
NetSuite generates a warning when you add more than 1000 items to a category. Items beyond the
1000th are displayed on pages in your web store, but performance on your site will be degraded. If
you have categories with thousands of items, consider breaking those up into smaller categories.
■ Avoid using an excessive number of tabs.
Having more than 20-50 tabs on your site, even if published to different people, can cause
performance problems. Avoid the practice of creating a tab published to each one of your users.
■ Whenever possible, use categories and tabs to organize items on your website instead of
published saved searches.
Public saved search pages do not perform as well as pages with lists of items that you define,
especially searches with complex search criteria. For that reason, published search results pages are
cached for up to 4 hours so the underlying search does not run more than one time every 4 hours
despite potentially heavy page demand.
■ Reuse JavaScript if you create custom site theme templates for your website. Rework scripts in
cell templates to share code.
■ Simplify your JavaScript code.
For example, note that the code sample below is reused elsewhere in the website, so only one copy
is needed.
<script language="JavaScript" type="text/javascript">
function checkForSpecialDisplay(itemName, itemID, itemBlockString)
{
if ( (( itemName== "" ) && ( itemID== "")) || ( itemName.indexOf('Error') == 1 ) )
{
// undesirable item leave span off - do nothing
}
else {
// show span
document.getElementById(itemBlockString).style.display = "";
}
}
</script>
This is the code sample that will be repeated for each item on page.
<script language="JavaScript" type="text/javascript">
checkForSpecialDisplay(<%=getCurrentAttribute('item','storeDisplayName')%>, <%=getCurre
ntAttribute('infoitem', 'itemid')%>, item-block<%=getCurrentAttribute('item', 'internalid')%>);
</script>
SuiteCommerce Site Builder Guide
Site Builder Items, Forms, & Images
32
Site Builder Items, Forms, & Images
After you set up your site domain and set preferences for how your site should operate, you can begin
adding content for display on your site. NetSuite offers a few options for adding website content:
■ Add items, information, forms, categories, and tabs in one central location using the Web Site
Content Manager. See Using the Site Builder Web Site Content Manager.
■ Import items using the Import Assistant at Setup > Import/Export > Import CSV Records. Then add
information, forms, categories, and tabs using the Web Site Content Manager.
■ Enter all records individually. For more information, read the following topics:
□ Setting Up Items for the Web Site
□ Creating Website Tabs
□ Creating Site Categories
Read the following topics for more information about displaying content on your website, and about
types of item records and forms specifically for use on the web store:
■ Displaying Items and Information
■ Customizing Items in Your Site
■ Related Items
■ Information Items
■ Publishing Forms
■ Images
Displaying Items and Information
NetSuite offers a number of optional methods for creating item records for the products you want to
sell on your NetSuite web store:
■ Import items in CSV format at Setup > Import/Export > Import CSV Records. An administrator can
perform imports.
■ Enter item records at Lists > Accounting > Items. For more information, see Creating Item Records .
■ Enter item records using the Web Site Content Manager at Lists > Site Builder > Content
ManagerLists > Web Site > Content Manager. For more information, see Using the Site Builder Web
Site Content Manager.
If you use the Web Site feature only, items you display in your site are not for sale. If you use the Web
Site feature with the Web Store feature, items you display are offered for sale in your store, using the
preferences on the Store subtab of item records.
You can create an information item to display contact numbers, directions, and business hours on your
site. See Information Items.
Setting Up Items for the Web Site
When you set up items to display on your Web site, visitors to your site, can click a link to an item, see
the item display page, and potentially submit an order for the item. To display an Item in your Web
store, you must complete the following tasks on the item record:
■ On the Pricing subtab, enter a price for the item.
■ On the Web Store subtab:
□ Select a Site Category to display the item.
SuiteCommerce Site Builder Guide
Displaying Items and Information
33
□ Check the Display in Web Store box.
After you complete the tasks above, the item displays on your Web site or Web store. Use the Web
Store subtab on item records to set other aspects of the item page display.
1. Go to Lists > Accounting > Items.
2. On the item record, click the Web Store subtab.
Web Store Display
1. In the Page Title field, enter the text you want to appear in the upper-left corner of an Internet
browser when customers view this item in your Web store. This should be a descriptive title for
the item page. It can help achieve better results with search engine ranking.
2. In the Web Store Display Name field, enter the name to show in the Web site for this item.
3. In the Web Store Description field, enter a brief description of this item to show under the web
store display name.
4. In the Detailed Description field, enter details about the item to show when a site visitor clicks
the display name for the item.
5. The description fields can have letters, numbers, and basic punctuation. You can also enter
basic HTML codes like lists, bold characters and underlines. You can enter 999 characters in the
Store Description field and 1,300 in the Detailed Description field.
6. In the Featured Description field, if this item is displayed on the home page of your Web site,
enter a featured description for this item. This description appears below the item's store
display name on the Home page of your store or site.
7. You can enter up to 999 characters including basic HTML code.
8. Enter and format text using the formatting options, or click the HTML Source Code link to enter
HTML.
9. In the Item Drilldown Template field, select an HTML template to set the look and feel of the
item page when displayed in your site.
10.
If you do not select a template here, the item template used by default is the one you select on
the Appearance subtab at Setup > Web Site > Setup Tasks > Set Up Web Site.
11.
If you use the Advanced Site Customization feature, you can create and edit HTML item
templates at Setup > Web Site > Setup Tasks > Item/Category Templates . For more information,
see Item and Category Templates.
12.
Use the fields listed below to choose an image to show with an item on your site. You must
upload images to your NetSuite File Cabinet before you can select them on item records.
13.
For more information, see Using Images in your Web Store.
■ Item Display Image - Select an image to show on the item display page.
■ Item Display Thumbnail - Select an image to show with the item before a customer clicks
the item for more information.
14.
After you have selected the appropriate settings for all necessary fields on the record, click
Save.
Note: The fields described below offer optional settings for items you publish on your
Web site.
Specials Display
■ If you want to put this item on special, check the On Special box. The item then appears in the
Specials category in your store or site. For more information, see Using the Specials Category.
SuiteCommerce Site Builder Guide
Displaying Items and Information
34
■ If you checked the On Special box, enter a specials description for this item. This description
appears under the item's store display name in the Specials category of your store or site.
You can enter letters, numbers and basic HTML code. To eliminate the need for HTML code, clear
the View as HTML box, and then enter and formatted text.
Stock and Pricing Behavior
The fields listed below specify the out of stock message for a particular item. The settings here override
the default behavior you set on the Web Site Setup page. For more information, see Setting Web Store
Backorder and Out-of-Stock Preferences.
■ Out Of Stock Message - Enter a message to override NetSuite's default out of stock message. This
field is only displayed if you use the Advanced Site Customization feature.
■ Out of Stock Behavior - Choose what you want to happen when a Web store shopper orders an
item that is out of stock. The Default option applies the behavior you selected on the Shopping
subtab of the Set Up Web Site page. Go to at Setup > Web Site > Setup Tasks > Set Up Web Site.
Use the fields listed below if you allow customers to set the price for an item. For example, customers
may be allowed to set the price they want to pay for tickets to a fund raising event.
■ Variable Amount - Check this box to allow the customer to set the price for the item.
■ Show Default Amount - Check this box if customers are allowed to set the price for the item, but
you want to show a certain price as the default amount.
■ Maximum Variable Amount - Enter the maximum amount that can be paid or donated for this
item.
Use the fields listed below, if you do not want to display the price of a particular item on your Web site.
For global settings you can use, see Showing Items Without Prices.
■ Don't Show Price - Check this box to hide the price of an item online.
■ No Price Message - Enter the message that should show on the Web site instead of the price. For
example, you might enter “Call for Price.”
Search Engine Optimization (SEO) and Product Feeds
Use the fields listed below to help customers find items in your site.
■ Meta Tag HTML - Enter HTML for the head section of this item page, including Meta Tag keywords.
This can help achieve better ranking with search engines. For more information, see Adding META
Tags.
■ URL Component - Enter a descriptive name for this item to appear in the URL for the item page. For
more information, see Descriptive URLs in Site Builder.
■ Search Keywords - Enter alternate words that customers might use to search for this item in your
Web site. These can include, abbreviations, misspellings, and acronyms. For more information, see
Setting Up Alternate Search Keywords.
■ Exclude From Sitemap – Check this box to exclude a tab, category or item page from the site map.
For more information, see Using the Sitemap Generator in Site Builder.
■ Sitemap Priority – Use the Sitemap Priority list to indicate the relative importance of your Web site
URLs.
You can select a priority ranging from 0.0 to 1.0 on item, category, and tab records.
NetSuite assigns the default priority Auto to all new and existing tab, category and item records
in your account. The priority is calculated based on the position of the item or category in the
hierarchy of your Web site.
SuiteCommerce Site Builder Guide
Displaying Items and Information
35
For example, your Web site tabs automatically generate a default priority value of 1.0 because
they are top level pages. A category published to a tab gets a priority of 0.5. An item published to a
category on a tab gets a priority of 0.3.
Use the fields listed below if you want to include an item in a product feed for upload to a shopping
comparison Web site. For more information, see Setting Up Web Site Product Feeds .Setting Up
Website Product Feeds
These are optional fields that are only displayed for the following item record types: Kit/Package, Noninventory Item for Sale, Non-inventory Item for Resale, Assembly (lot and serialized), Inventory (lot and
serialized).
■ Product Feed - Select the sites for which you are creating a product feed that includes this item.
Press CTRL to select more than one site at a time.
■ Shopping.com Category - Enter the name of the shopping.com category where the item should be
displayed.
■ Shopzilla Category ID - Enter the category ID provided by Shopzilla for the item.
■ NexTag Category - Enter the Nextag category name where the item should be displayed.
Web Site Categories
On the Web Site categories subtab, use the Site Category list to select and add each category or tab
where you want to publish this item in your Web store. For more information see Tabs & Categories.
If this item appears in multiple categories, use the Preferred Category column to designate a category
for the canonical URL that points to this item on your Web site. The canonical URL is favored by Google
for indexing your site and it eliminates exposure of duplicate content to any search engine indexing
your Web site.
Publishing Items and Information to Tabs and Categories
After you have set up item records and information item records, you must publish tabs and categories
on your web store. Items and information are displayed in site in categories. Each category you create
must be placed on a tab. Your website comes with two tabs—Catalog and Information. However, you
can edit the names of these tabs and create new tabs to display in your website.
1. Create a presentation tab. For more information, see Creating Website Tabs.
To publish information to the default Catalog or Information tabs, you can skip step one and go
directly to creating categories.
2. Create categories to publish on that tab. For more information, see.Creating Site Categories.
3. Publish items to web store categories. For more information, see Adding Items to Web Store
Categories.
Alternatively, you can create and edit tabs and categories using the Site Content Manager. For more
information, see Using the Site Builder Web Site Content Manager.
You can now continue to create tabs and categories to publish information to your website. You can
also create more specific subcategories to place in the categories you have already published.
For example, you can create a tab named Return Policies and a category for that tab, Cash Refunds.
Then, create a category named Returns with a Receipt, and select Cash Refunds in the Subcategory
of field. Returns with a Receipt is now a subcategory of Cash Refunds. You can then create other
subcategories, such as Returns without a Receipt, each with specific information.
SuiteCommerce Site Builder Guide
Displaying Items and Information
36
In addition to publishing tabs and categories to your website, you can publish them in the following
places:
■ Intranet Only – If you have the Intranet feature enabled, clear the Display in Web Site box when
creating a tab or category to display the information to only those people you select on the
Audience subtab. Audience members you select must log in to your account to see the tab or
category. If you select a particular role, that person must be logged in with that role to see the tab or
category.
■ Both Web Site and Intranet – Select the Display in Web Site check box and choose individuals or
groups on the Audience subtab. The tab or category then shows both internally to those you select
on the Audience subtab and to everyone who visits your website.
Adding Items to Web Store Categories
You can get your website up and running quickly by making your items available online from your
Items list.
Note: Only items that have a price are displayed in the website.
If you are creating a site from your current inventory, making multiple items available online at the
same time is the fastest way to create your website. You can do this by editing items in the list.
To mark your items available online from the Items list page:
1. An Administrator can make sure the Inline Editing feature is enabled at Setup > Company >
Enable Features. Click the Company subtab.
2. After the feature is enabled, a Store Manager or anyone who has access to the list of items can
go to Web Site > Publishing > ItemsLists > Site Builder > Items.
3. Select Web Store in the View field, and select the type of item you want to display in the Type
field.
4. Click Edit..
5. In the Display in Web Site column, mark the items you want to appear online.
After you set items to show online, the items are automatically grouped in the Uncategorized Items list.
These items will not appear in your site before they are placed in categories.
To place these items into categories, you can either go to Setup > Site Builder > Web Site Management
> View Uncategorized Items (Administrator). You can also expand the Uncategorized Items section on
the bottom left of the page at Lists > Web Site > Content Manager ( Administrator )Lists > Site Builder >
Content Manager.
From the Uncategorized Items list, open the record for an item you want to place in your site. On the
Store subtab of the item record, select a category, enter descriptions, choose images for the item and
click Save. Repeat this process for each item you want to publish in your site.
Note: You can publish up to 1,000 items per category. Items in excess of 1,000 are still
returned in search results, however, and can still be purchased from search results lists. A
warning displays on category records containing more than 1,000 items.
Featuring Items
A featured item is prominently displayed on the landing page of your NetSuite website or store. When
your customers visit your site, they see the featured item below the greeting and message on your
Home page.
SuiteCommerce Site Builder Guide
Displaying Items and Information
37
The workflow is the same if you want to display an item on the home page of one site or multiple
websites. You can add the item to the home page of the website of your choice. Alternatively, on an
item record, you can select the site and the home page where you want to publish the item.
To create a featured item from the Home tab:
1. Go to Web Site > Publishing > TabsLists > Site Builder > Tabs.
2. Click Edit next to your Home tab.
3. Under Content, on the Items subtab, select the item for display.
4. Click Save.
To create a featured item from the item record:
1. Go to Web Site > Publishing > ItemsLists > Site Builder > Items.
2. Click the name of the item you want to feature.
3. Click Edit.
4. Click the Store subtab.
5. Enter text in the Featured Description field. Create a brief narrative that appears on the Home
page.
You can also enter basic HTML code for bulleted lists, bold characters and underlines.
6. In the Site Category field, select the Home tab. If you use the Multiple Web Sites feature, choose
the Site where you want to feature the item.
7. Click Save.
Now, this item is featured on your Home page under your welcome greeting and message.
To rearrange the items featured on your Home page, go to Web Site > Publishing > TabsLists > Site
Builder> Tabs. Click Edit next to your Home or Welcome page. Under Content, on the Items subtab,
click an item to select it, and use the Move Up or Move Down buttons to change its position.
Customizing Items in Your Site
You can customize the look, feel, and organization of items in your site in several ways, including:
■ Showing Items Without Prices
■ Using Transaction Column Fields in Your Website
■ Using Matrix Items to Offer Item Options in Your Site
■ Uploading Images
■ Item and Category Templates
Showing Items Without Prices
If you would like to display your items in a website but do not want to sell your items online, you can
choose to show only your information and items without a shopping cart or checkout, and your items
can show without pricing.
To set up your site for only information and items:
1. Go to Setup > Site Builder > Set Up Web Site.
SuiteCommerce Site Builder Guide
Customizing Items in Your Site
38
2. On the Setup subtab, in the Multi Site Settings section, find the Web Site Scope field and select
Information and Catalog.
3. Click Save.
You can also operate a full web store but have certain items show without a price. You can enter a
custom message to show in place of the price for these items.
To hide the price for an item:
1. Go to Web Site > Publishing > ItemsLists > Site Builder > Items.
2. Click Edit next to the item that should not show a price.
3. On the Store subtab of the item record, check the Don't Show Price box.
4. In the No Price Message field, enter a brief message that should show in place of the price, such
as Call for Price or Negotiable.
5. Click Save.
After a price has been removed for an item, the Add to Cart Button should no longer show for that
item, and the customer can contact you for more information.
Using Transaction Column Fields in Your Website
You can use custom transaction column fields in your web store to provide shoppers more information
about the items you sell.
When shoppers purchase items that have custom fields, the options they select show up on the sales
order created in NetSuite. You can also use these fields to collect information from customers that is
specific to your business.
To create a transaction column field for your website:
1. Go to Setup > Customization > Lists, Records, & Fields > Transaction Column Fields > New
( Administrator ).
2. On the Applies to subtab, check the Sale Item and Store Item boxes. Checking these two boxes
enables your custom field to appear in both your store and on sales orders.
3. Learn about other settings on the custom field. See Custom Transaction Body Fields.
This custom column field appears with your item in your store. When you approve a sales order from
your store, these custom column fields automatically record your customer's selection.
Using Matrix Items to Offer Item Options in Your Site
You can use matrix items in your website to offer various options for products you sell, such as size and
color. You can set up matrix items by using the Matrix Item Assistant, or you can set up matrix items
individually. For more information, see the help topic Matrix Items.
Only the parent matrix item appears on lists in your website. If the subitems are priced differently
within the matrix, the item price appears as a range. The subitem is selected and added to the
shopping cart using the transaction item options. The item cannot be added to the shopping cart until
each option has been selected.
SuiteCommerce Site Builder Guide
Customizing Items in Your Site
39
Note: For NetSuite billing purposes, each matrix subitem is counted as one individual website
item. For example, if you sell an item matrix in your website that includes 25 subitems, each
subitem counts as one for a total of 25 website items.
The website shopping cart shows the matrix subitem with the correct price for the options selected.
The Item column displays the subitem name. The Options column shows the option combination the
customer selected.
Note: Employees with the Store Manager role cannot create matrix item options. These steps are
provided for those with the Administrator role.
A new matrix item may or may not display on your site based on the preferences set for the display of
out of stock items. You may need to create an inventory adjustment (Transactions > Inventory > Adjust
Inventory), or set the preference for Out of Stock Behavior on the item record or on the Web Site Setup
page (Setup > Setup Web Site > Shopping > Web Store Out of Stock Items). See also, Why is a matrix
item not appearing in my web store?
Related Items
You can use related items in your web store to cross-sell products that complement each other.
For example, an electronics web store created a related items group containing cables, extension cords
and surge protectors. When a customer views a monitor on the site, the list of related items displays,
and she can navigate to the additional products she needs.
There are two ways you can use related items in NetSuite:
■ Related Item Groups – You first create groups of related items. Then, you add these groups to items
you sell in your website. For more information, see Creating Related Item Groups.
■ Related Items – You can also associate individual items to items you sell on your website. For more
information, see Associating Individual Related Items.
Displaying Related Items on your Web Site
In NetSuite, you can use the Set Up Web Site page, to set your preferences for displaying related
items, and upsell items on item detail pages. For more information, see the help topic Web Site Upsell
Preferences.
You can also create an HTML template to customize the display of lists of Related Items and Upsell
items on your website. Go to Setup > Site Builder > Set Up Web Site, on the Appearance subtab, select
the HTML template you want to use in the Default Related Items Layout, and Default Upsell Items
Layout fields.
SuiteCommerce Site Builder Guide
Related Items
40
For more information see the help topic Web Site's Appearance Preferences. See also, Item and
Category Templates.
Creating Related Item Groups
A related items group is a set of items you can choose to recommend with other items in your website.
For example, Wolfe Electronics creates a related items group that contains items like cables, extension
cords and surge protectors. Wolfe chooses to includes this related item group with monitors it sells in
its website. When customers view Wolfe's monitors, they can navigate to the other products they need.
To create a related item group:
1. Go to Setup > Site Builder > Setup Tasks > Related Items Categories > New.
2. In the Category field, enter a name for this related item group.
You will select this Category name when adding related item groups to items later in Step 10.
3. (Optional) In the Brief Description field, enter a short message describing this group.
4. On the Basic subtab, select an item from the list. Each item's brief description appears in the
Item Description field.
5. Click Add.
6. Repeat steps 4 and 5 to add other items to this group.
7. When you have finished, click Save.
8. Go to Web Site > Publishing > ItemsLists > Site Builder > Items.
9. Click Edit next to the item with which you want to associate the related items group.
a.
Click the Related Items subtab
b.
In the Related Item column, select the related item group from the list of categories.
c.
Click Add.
10. Click Save.
Your related items group now appears with the item you are selling in your website. To display the
related items group in the shopping cart, you must edit the tab to select the related item groups that
should display in the shopping cart.
Note: If you use multiple websites, note that items only display on websites specified on the
item record. For example, if you include item A and item B in the same related items group, then
you must publish both items to the same websites, if you want the two items to always appear
together.
Associating Individual Related Items
If you do not want to associate an entire group of items with an item, you can select individual related
items on an item record.
To associate related items to an item you sell online:
1. Go to Go to Web Site > Publishing > ItemsLists > Site Builder > Items.
2. Click Edit next to the item you want to add a related item to.
3. Click the Web Store subtab.
4. Find the Related Items sublist.
SuiteCommerce Site Builder Guide
Related Items
41
5. In the Related Item column, choose an item to associate with the item you are selling.
6. Click Add.
Click Add Multiple to add several items quickly.
7. When you have finished, click Save.
Now your related items appear beneath the item you are selling in your website.
Displaying Related Items in the Shopping Cart
You can display a list of Related Items on the shopping cart page of your website. Use the Related Items
subtab on the Shopping Cart tab in NetSuite to select a list of items that you want to show.
To show related items in the shopping cart:
1. Click Edit next to Shopping Cart.
2. On the Related Items subtab, select an item to display as a suggested item to purchase in the
shopping cart.
The Advanced Site Customization feature is required for Related Items to display in the shopping
cart.
Click Add Multiple to add several items quickly.
3. Click Save.
Note: The related items you choose to display in the shopping cart do not change based on
what the customer has added to the shopping cart.
Information Items
An information item is a way of communicating with your customers. Information items can include
news articles about your company, pictures, graphics, and more.
SuiteCommerce Site Builder Guide
Information Items
42
For example, Christy's Catering wishes to inform customers about an award they have won. Christy
creates an information item about this story for customers to read on its website. Christy even includes
a picture of the head chef receiving the award.
Information items appear on tabs in your website. You can group similar information items in
categories.
You can create two different types of information items:
Type of Information Item
Description
Examples
Text and Images
Displays text and a graphic or
picture for your customers to view
online.
Use this type to post directions and
a picture of your physical location
to customers.
Formatted Text
Displays only text on the item detail
page.
Use this to include press releases
on your website.
Creating Information Items
Both types of information items use the same form for entering data. Text and Image Information
Items enable you to include information and images together. Formatted Text Information Items do
not display images on the item detail page.
To create an information item:
1. Go to Web Site > Publishing > Information Items > New..
2. Click Text and Image.
3. At the top of the page, enter a name in the Name field.
4. On the Basic subtab, enter brief and detailed item descriptions.
These description fields can have letters, numbers, and basic punctuation. You can also enter
basic HTML codes, like bulleted lists, bold characters and underlines, in the text fields.
5. Check the Featured Item box and enter a featured description, if you want the item to display on
the home page of your primary website.
6. In the Item Drilldown Template field, select an HTML template to set the look and feel of the
item page when displayed in your site.
If you do not select a template here, the item template used by default is the one you select on
the Appearance subtab at Setup > Site Builder > Set Up Web Site.
For more information, see Item and Category Templates.
7. Use the fields listed below to help customers find items in your site.
■ Page Title – Enter a descriptive title for the item page. For more information, see Adding Page
Titles.
■ Meta Tag HTML – Enter HTML for the head section of this item page, including Meta Tag
keywords. For more information, see Adding META Tags.
■ Search Keywords – Enter alternate words that customers might use to search for this item
in your website. These can include, abbreviations, misspellings, and acronyms. For more
information, see Setting Up Alternate Search Keywords.
■ URL Component – Enter a descriptive name for this item to appear in the URL for the item
page. For more information, see Descriptive URLs in Site Builder.
8. Use the following fields to select your preferences if you use a site map:
■ Exclude from Sitemap – Check this box to exclude this item page from your site map.
SuiteCommerce Site Builder Guide
Information Items
43
■ Sitemap Priority – Select an option for displaying the priority of this page in your site map.
For more information, see Using the Sitemap Generator in Site Builder.
9. Select one or more Categories in which this item should appear.
10. Click the Media subtab to choose images for display with the information item:
■ Text and Image Information Items allow you to select an Item Thumbnail image for display
on the item list page, and an Item Picture image for display on the item detail page.
■ Formatted Text Information Items allow you to select only a Thumbnail image for display on
the item list page.
For more information about uploading and using images on your web store, see Images
11. If you use the Multi-Language feature, you can add translations for this item on the Translations
subtab.
12. Click Save.
Your site automatically updates.
Attaching Images to Information Items
Images are graphics that help describe the information you communicate to customers. They can
also be a visually pleasing element of your page. Use images to expand customers' knowledge of your
company.
Images must be in JPG, JPEG or GIF files that should be less than 10KB. Flash animations are in SWF
files and should be no more than 30KB. You can use the same images as much as you like. You can also
attach ZIP files and NetSuite unzips them for you.
To attach images to information items, you must first upload or link to the images of your choice. To
attach new images, go to Web Site > Files > ImagesLists > Site Builder> Images.
To attach an image to an information item:
1. Go to Web Site > Publishing > Information ItemsLists > Site Builder> Information Items.
2. When the Information Items list appears, click Edit next to the item you want to attach an image
to.
3. Click the Media subtab.
4. On the Media subtab, select an image from the list in the Item Thumbnail and Item Picture
fields.
When customers click a thumbnail, they view the item picture.
Note: You can set default sizes for thumbnail, drilldown, dense list and dense list
drilldown images at Setup > Other Setup > Image Resizing. This enables you to select the
same image in both thumbnail and image fields and have the images automatically show
in the correct size.
If there are no images listed, to attach images, go to Web Site > Files > ImagesLists > Site Builder
> Images.
Images must be marked Available Externally on the file record to display in your site. Files
uploaded to the Images folder are available externally by default.
5. If you want to view an image, click Preview.
6. Click Save.
Your image appears with your information item in your website.
SuiteCommerce Site Builder Guide
Information Items
44
Entering Information Item Descriptions
The information item name appears as a link on tab and category pages in your website. Below the
name is the brief description.
When customers click the link, the item detail page is displayed. The item detail page consists of the
information item name, brief description, and detailed description.
To enter a description for an information item:
1. Go to Web Site > Publishing > Information ItemsLists > Site Builder > Information Items.
2. When the Information Items list appears, click Edit next to the item for which you want to write a
description.
3. If you are creating a new item, click New and enter the name of the item.
4. In the Brief Description and Detailed Description fields, enter what you want your customers to
see in your site.
The description fields can have letters, numbers, and basic punctuation. You can also enter basic
HTML codes like bulleted lists, bold characters and underlines.
5. At the bottom of the Basic subtab, choose a Category in which to display the information item.
If you have the Multiple Web Sites feature enabled, choose a Site.
6. Click Save.
Immediately after you enter descriptions, shoppers can view the information in your website.
Using HTML in Description Fields
Enter basic HTML in your site descriptions to better customize the look and feel of your website and
personalize how you communicate with your shoppers.
You can enter the following HTML codes in the description fields of tabs, categories, information
items and on the Store and Specials sections of item records. Do not enter HTML into name fields. For
example, an item's store display name does not accept HTML code.
HTML
Action
Example
Links
Enter <a href="http://where you want to link"> before the
word you want to make a link. Enter the word you want to
make a link, and then enter </a> to close the link.
The word links to
your choice.
Bold
Enter <b>word</b>.
The word appears
bold.
Italics
Enter <i>word</i>.
The word appears in
italic.
Unordered Lists
Enter <ul><li>word</li> then <li>word</li>. Continue with
this format until your list is complete, and then enter </
ul>.
Browse our collection
of:
■ hats
■ shirts
■ shoes
Ordered Lists
Enter <ol><li>first</li> then <li>second</li>. Continue with
this format until your list is complete, and then enter </
ol>.
SuiteCommerce Site Builder Guide
Follow these steps to
log in:
1. Click the My
Account tab.
Information Items
HTML
Action
45
Example
2. Enter your login
information.
Line Breaks
Enter <br> where you want to make a line break.
This text starts a new
line
after the word "line."
Tables
Enter <table width="the width you want" border="the
border you want" cellspacing="the spacing you want">.
Then, for every row and column you want, enter
<tr><td></td></tr>. To close your table, enter </table>.
The HTML code for the following example appears like
this:
Cell 1
Cell 2
Cell 3
Cell 4
<table border="5" cellspacing="2">
<tr>
<td>Cell 1</td>
<td>Cell 2</td>
</tr>
<tr>
<td>Cell 3</td>
<td>Cell 4</td>
</tr>
</table>
Paragraph Breaks
Enter <p>first paragraph</p>. For a new paragraph, enter
<p>second paragraph</p>.
This is the first
paragraph.
This is the second
paragraph.
Horizontal Rules
Enter <hr align="where you want it to align" width="the
width you choose">.
The HTML code for the following example appears like
this:
<hr align="center" width="20%">
Images
Enter <img src="http://the source of your image">.
Fonts
Enter <font face="enter the font you like"> and then enter
the text you want to appear in this font followed by </
font>.
The HTML code for the following example appears like
this:
<font face="Courier New, Courier, mono">This is Courier
font.</font>
This is Courier font.
Alignment
Enter <p align="how you want to align"> the text you want
to align</p>.
This is centered.
When you finish entering HTML in description fields and click Save, your changes update in your
website. Make sure your HTML looks the way you want. To preview your site, go to Setup > Site Builder
> Preview Web Site.
Publishing Forms
You can publish forms in your website that site visitors can use or submit information with, such as
customized search forms or email forms that allow customers to send you feedback.
SuiteCommerce Site Builder Guide
Publishing Forms
46
Note: If you want to create and edit any of the forms listed below, your role must have Publish
Forms permission, and Store Content Item permission.
Form Type
Description
Usage
Email Forms
A standard form your customers
use to send e-mail messages to your
company.
Use this to enable customers to e-mail
you questions about items you sell.
Search Forms
Enables customers to search using a
customized form you design.
Use this type to tweak your site's search
form to query only specific fields and to
return a narrowly tailored list of results.
Case and Customer
Forms
Online forms published as
information items allow customers
to fill out information directly in your
site.
Use this to have leads interested in
an upcoming service fill out contact
information, creating a new lead record.
Note: You can only publish
customer forms that use the
standard template through the
Publish Forms page.
File Download with
Online Forms
Online form that, when filled out,
allows a free download of a file from
your File Cabinet.
Use this to capture lead information
and create a lead record from site
visitors who want to download a free
website template.
Email Forms
Email Forms let you create clean, easy-to-use forms that your customers use to send you email. The
email form displayed on your website includes an entry field for the sender’s email address, and a field
for a message. You can define the subject line. This email form cannot be customized. You cannot add
more fields to the form.
To enter an Email Form:
1. Go to Web Site > Publishing > Publish Forms > New.
SuiteCommerce Site Builder Guide
Publishing Forms
47
2. Click Email Form.
3. At the top of the page, enter a name in the Email Form field.
4. On the Basic subtab, enter a brief and detailed description.
These description fields can have letters, numbers, and basic punctuation. You can also enter
basic HTML codes, like bulleted lists, bold characters and underlines, in the text fields.
5. In the Email To field, enter the email address you want this email to be sent to.
6. Enter a Subject for the email.
7. Select a Layout Mode from the list.
8. The Featured Description appears below the store display name on the Home page of your site.
Enter a description here, if you plan to publish the email form to the Home page of your site.
9. Click the Media subtab.
10. Select an Item Thumbnail image.
For more information, see Using Images in your Web Store.
11. If you use the Multi-Language feature, see the help topic Multi-Language Names and
Descriptions for more information on using the Translations subtab.
12. At the bottom of the page, select the Site Category where you want to publish the email form. If
you use the Multiple Web Sites feature, select a Site.
13. Click Save.
The email form is automatically available in your site.
Search Forms
A search form enables you to create a custom search that appears in your website, or intranet site.
Customers can select their own search criteria, and the search results show in a list on the site.
For example, Wolfe Electronics publishes an item search to the Catalog page of its website. When
customers shop on their site, they can search for items by name or price.
To publish a search form on your website, you must first create a saved search for use with the search
form. Then create the search form on the Publish Form page in NetSuite.
After you have created the search form, you can apply a custom layout template to present the items
in the search results with a look and feel consistent with the rest of your site. For more information, see
Applying Layout Templates to Search Results.
You can also use the search form as the default search in your website. Go to Setup > Site Builder > Set
Up Web Site. On the Search subtab, select the name of the search form for either Search Link Form,
Search Portlet Form, or both. Click Save. For more information, see the help topic Web Site Search
Preferences.
SuiteCommerce Site Builder Guide
Publishing Forms
48
Note: You can create a search form and display it as a portlet on your NetSuite-generated web
pages. To display a search form on hosted pages use Web Site Tags. For more information, see
Tags for Use in HTML Pages and Site Templates.
To create a saved search for use with a search form:
1. Go to Lists > Search > Saved Searches > New.
2. Select a type of record for the search.
For example, if this search is for items available on your website, choose Item.
3. Enter a name for this search in the Search Title field. This title is not seen by your customers.
4. Check the Public box to make the search available to use on a Search Form.
5. On the Criteria subtab, select criteria to Filter the items displayed in the search results.
For example, if this search is for items available on your website, choose the filter, Display in
Web Site, then select Yes. Only items that are marked to display online are included in the search
results.
6. On the Results subtab, select the columns you want to show in the search results.
In the example above, Wolfe Electronics shows Name, Description, and Online Price.
Important: In the Custom Label column, you can change the names of the columns in
the search results.
7. Click Add.
8. On the Available Filters subtab, choose the criteria your customers can select when using the
search form on your site.
Note: When creating a saved search to publish as a search portlet on your website, keep
the number of available filters at a minimum to prevent slow performance.
For example, customers on the Wolfe Electronics website can search by Name and Online
Customer Price.
9. Click Add.
10. Click Save.
Next, create a search form to publish to a tab or category in your website.
To create the search form:
1. Go to Lists > Web Site > Publish Forms > New.
2. Click Search Form.
3. In the Name field, enter a title for this search form. Customers can see this title.
For example, if this is a custom search that will appear with your Specials category, you could
enter Search Our Specials.
4. In the Saved Search field, select the search this form is based on.
5. Check the Disallow Drilldown box if you do not want customers to click on the link to each item
in the search results to see the item page.
6. Check the Display in Web Site box, so that the search form appears on your site.
7. The fields on the Basic subtab are optional.
SuiteCommerce Site Builder Guide
Publishing Forms
49
■ Enter any descriptions you want to appear with this search form in the Brief Form
Description and Detailed Form Description fields.
■ The Featured Description appears below the store display name on the Home page of your
site. Enter a description here, if you plan to publish the form to the Home page of your site.
■ In the Search Keywords field, enter alternative search keywords that customers might use to
find this search form using your web store's internal search.
■ Check the Exclude form Sitemap box to exclude the search form from the Sitemap.
■ Sitemap Priority is used for the Sitemap Generator. NetSuite uses the value you set here
when you generate the Sitemap.
8. At the bottom of the page, in the Site Category column, choose one or more categories where
you want this search form to appear.
If you use the Multiple Web Sites feature, choose the Site.
9. On the Media subtab, choose a thumbnail image to appear with this search form in lists.
For more information, see Using Images in your Web Store.
10. If you use the Multi-Language feature, see the help topic Multi-Language Names and
Descriptions for more information on using the Translations subtab.
11. Click Save.
Your search form is now available in the categories you chose in Step 8 above.
Case and Customer Forms
When you publish an online form, customers can complete the form directly on your website. First
create the case or customer form, and then follow the steps below to publish the form on your
website.
See also, Embedding an Online Form in your Web Site Page.
When you create an online form for publishing on your website, you must check the Enable Online box.
Note that the Title on the online form record does not display on your site, but visitors on your site
will see the text you enter in the Message field. You create the name for the form that is visible on the
website, when you create the published form.
To create online case forms, go to Setup > Support > Online Case Forms > New. For more information
on creating online case forms, see the help topic Online Case Forms.
To create online customer forms, go to Setup > Other Setup > Online Customer Forms > New. For more
information on creating online customer forms, see Online Customer Forms.
To publish an online case or customer form:
1. Go to Web Site > Publishing > Publish Forms > NewLists > Site Builder > Publish Forms > New.
2. Select the type of online form you want to publish:
■ For case records, click Case Form.
■ For online customer forms, click Customer Form.
3. Enter a value in the Name field to create the link displayed on your site.
When site visitors click this name, they are directed to the page where they can fill out your
online form.
4. In the Case Form field or the Customer Form field, select the online form you want to publish.
5. Check the Display in Web Site box to make this form available to anyone who visits your site.
SuiteCommerce Site Builder Guide
Publishing Forms
50
6. At the bottom of the page, select the Site Category where you want the form to display.
1.
If you use the Multiple Site feature, you must first select a Site, and then select the tab or
category where you want this form published
2.
Click Add.
7. On the Basic subtab, the fields listed below are optional:
■ You can enter a Brief Description and Detailed Description of this form. The brief
description displays under the name of the published form in lists on your site. The detailed
description displays on the page that displays the form.
■ You can enter text in the Featured Description field which shows when a published form is
featured on your home page.
Note: Published forms can only be featured on your home page if you use a
NetSuite presentation tab as your home page. Items are not automatically featured on
custom HTML pages that you host through NetSuite.
For more information, see Featuring Items.
■ In the Search Keywords field, you can enter alternate words or misspellings that site visitors
might use when searching your website to find this form.
8. (Optional) On the Media subtab, select a thumbnail image to show next to the published form
name in lists.
For more information, see Using Images in your Web Store.
9. If you use the Multi-Language feature, see Multi-Language Names and Descriptions for more
information on using the Translations subtab.
10. Click Save.
Embedding an Online Form in your Web Site Page
When a visitor to your website clicks on a link to an online form, a redirect occurs to the page where
the visitor completes the form. You may want to embed an online form on your website, to keep
visitors on one page.
For example, the Professional Office Supply store has an external catalog website. The merchant wants
site visitors to fill out an online customer form on the home page, but wants to keep them on that
home page.
You can use an iFrame to embed an online form in your NetSuite web store page, or your own custom
HTML page. This lets you display an online customer form in a scrollable box embedded in your web
page. Use the sample code below, replacing the URL in the src attribute with the Publishable Form URL
displayed on the External subtab of your online form record.
<iframe
src ="https://forms.netsuite.com/app/site/crm/externalleadpage.nl?compid=NCC133237&formid=6&h=2
b495d8e81474994631c"
width="100%">
</iframe>
To embed an online form in a NetSuite tab, edit the tab, and then add the iFrame in the Message field.
For a category, add the iFrame in the Detailed Description field.
To embed an online form in a custom HTML page that is part of an external catalog site or an HTML
page you host in the NetSuite file cabinet, edit your file, and then add the iFrame to your custom HTML.
SuiteCommerce Site Builder Guide
Publishing Forms
51
File Download with Online Forms
When you use the Sell Downloadable Files feature, you can offer your website visitors free file
downloads when they submit contact information using an online customer form.
Before you set up this information item, you need to create the online customer form customers will fill
out to receive the download. For more information, see Online Customer Forms.
You then need to upload the file that will be available for download. To do so, go to Documents > Files >
File Cabinet. Choose the folder where you store downloadable items, and click Add File.
To set up an online form with a free download:
1. Go to Web Site > Publishing > Publish Forms > New.
2. Click File Download with Online Form.
3. In the Name field, enter a title for this form.
This is the name of the link customers click to fill in and submit their information before
downloading. For example, if this is a free music download when customers sign up for your
newsletter, you might name it “Free Download!”
4. In the Customer Form field, select the online customer form that customers must fill out before
downloading the file.
5. In the Downloadable File field, select the file from the File Cabinet that customers can download
for free after filling out the online customer form.
Note: This file must be marked Available Without Login in the File Cabinet for
customers to download the items.
6. Select the Display in Web Site box.
7. On the Basic subtab, enter any descriptions you want to appear with this item.
8. At the bottom of the page, in the Site Category column, choose the category where you want to
link to the form and download.
9. Click Add.
10. Repeat this process for each category where you want to display the link.
11. On the Media subtab, choose a thumbnail image to appear with this customer form.
For more information, see Using Images in your Web Store.
12. If you use the Multi-Language feature, see Multi-Language Names and Descriptions for more
information on using the Translations subtab.
13. Click Save.
The download automatically begins after site visitors submit their information. They may need to
disable popups in their browser to continue downloading. A lead record is created or updated for the
site visitor based on the settings in your online form.
Note: If you host your website through NetSuite and want to publish a form, use the following
tag within an href attribute: <%=getOnlineFormUrl(itemID)%>. The item ID can be found in the
form record's URL.
Images
Images are an integral part of making a website look and feel complete and conveying a company style.
In NetSuite, any time you upload an image to a record, it is stored in your file cabinet, found on your
Documents tab.
SuiteCommerce Site Builder Guide
Images
52
For the purposes of your website, you can upload your item images, company logos, graphic art, and
other images to the Images folder of your file cabinet for easy access when associating the images with
records in your account. You can upload a compressed file of all of your images using the Advanced
Add button on the file cabinet.
Uploading Images
You upload images for use in your website to your NetSuite file cabinet. After files are uploaded to your
file cabinet, you can reference them in your store as many times as you like.
After you have uploaded your images, you can use them in your web store. Images must be in JPG,
JPEG or GIF files that should be less than 10 KB. Flash® animations are SWF files that should be no
more than 30 KB. SWF files can be used only on the Welcome tab of your site.
Note: Save time uploading your images by adding them to a ZIP file on your computer. Then,
upload the ZIP file to your file cabinet. NetSuite will automatically unzip the file.
To upload an image:
1. Go to Web Site > Files > Images.Lists > Site Builder > Images..
2. Click the Add File button.
To upload multiple files in a ZIP folder, click Advanced Add. When you add multiple files, you can
choose to have them all marked as Available Without Login. A file must be marked as Available
Without Login to display in your site.
Files uploaded to the Images folder and the Web Site Hosting Files folder are marked as
Available Without Login by default.
3. Enter or select the location of your media item, and click Open.
4. Repeat these steps to upload other images.
After you have attached images, you can set them to display in your website with items and categories.
After you upload an image, you can go to Setup > Other Setup > Image Resizing > Image Resizing to set
a maximum height or width for images when they are used in different places in your site. For more
information, see Resizing Images.
You can also enter alt-text for images displayed in your website. This can help to improve searchengine rankings.
To enter alt-text for images, click Edit next to the image you want to add alt-text for. Enter the text you
want to appear on mouse-over in the Alt Tag Caption field and click Save.
Using Images in your Web Store
You must first upload images to your NetSuite File Cabinet. Then you can choose which images appear
on your site.
To upload your images, go to Web Site > Files > ImagesLists > Site Builder > Images.
To attach an image to an item or category:
1. Go to Web Site > Publishing > CategoriesLists > Site Builder > Categories.
For example, click Items to attach an image to an inventory part you display in your website.
2. When the page appears, click Edit next to the category or item you want to attach an image to.
SuiteCommerce Site Builder Guide
Images
53
3. If you are attaching an image to an item, click the Web Store subtab.
If you are attaching an image to a category, click the Media subtab.
4. Select a Thumbnail and an Image.
You can attach thumbnails and full-size images to items, categories, and information items of
type Text and Image.
Note: . This lets you select the same image in both thumbnail and image fields and have
the images automatically show in the correct size.
Note: You can set default sizes for thumbnail, drilldown, dense list and dense list drilldown
images at Setup > Other Setup > Image Resizing. This lets you select the same image in both
thumbnail and image fields and have the images automatically show in the correct size.
An image must be marked as Available Without Login on the file record in the File Cabinet to
display in your site. All files uploaded to the Images folder and the Web Site Hosting Files folder
are marked as Available Without Login by default.
5. If you want to view the image, click the Open icon.
6. Click Save.
When you attach an image and assign it to a category or item, it automatically appears in your web
store.
To attach an image to a category, go to Web Site > Publishing > CategoriesLists > Site Builder >
Categories.
To attach an image to an item you sell, go to Web Site > Publishing > ItemsLists > Site Builder > Items.
To attach an image to an information item, go to Web Site > Publishing > Information ItemsLists > Site
Builder > Information Items.
Resizing Images
When you set up image resizing, you can upload one image per item or record and set size limits for
thumbnail and drilldown images. This prevents you from uploading the same image in multiple sizes.
The resize process maintains the aspect ratio of the image and the image is scaled, so that the height
and width are never greater than the dimensions you specify on the Image Resizing Setup page. For
example: if you start with an image that is 800 x 500, and resize it to thumbnail size, which is 80 x 80,
the image retains its rectangular shape.
Warning: Images with an original length or width greater than 5 megapixels cannot be resized
and will not display in your site. Please resize larger images before uploading them to the File
Cabinet.
To set default sizes for your images:
1. Go to Other Setup > Image Resizing.
2. Check the Enabled box if you want to use automatic image resizing for the following
circumstances:
■ Dense List Drilldown Image – Applies to images displayed when you drill down on an item
displayed in a dense list.
Dense Lists display basic information about items in a table format. The fields displayed in
a Dense List layout are description, price, options, quantity, and the add to cart button. You
SuiteCommerce Site Builder Guide
Images
54
choose dense or graphical lists when you create or edit Layouts at Web Site > Appearance >
Layouts.
■ Dense List Image – Applies to images displayed with items in dense lists.
■ Employee Image – Applies to employee images when you publish an employee directory with
images.
■ Web Site Drilldown Image – Applies to images displayed when a thumbnail image is clicked
or when customers view the item detail page in the website.
■ Web Site Category Thumbnail Image – Applies to category images for categories or
subcategories in a list.
■ Web Site Featured Item Thumbnail Image – Applies to featured item images on the Home
page tab.
■ Web Site Related Item Thumbnail Image – Applies to item images in lists of related items.
■ Web Site Thumbnail Image – Applies to images displayed in graphical lists in your website.
3. In the Maximum Height Column, enter the maximum height for each type of image in pixels.
4. In the Maximum Width Column, you can accept the size given to keep the image in scale or enter
the maximum width in pixels that each image can be.
You can size your images from 10-999 pixels.
5. Click Save.
You can upload images to your file cabinet and select them on item, information item and category
records. The images will display in your web store according to your settings on the Image Resizing
Setup page.
Resizing Images and Advanced Site Customization
If you use the Advanced Site Customization Feature, you can use the attributes listed below in the
HTML of your custom themes and templates to display resized images.
Item Attributes
Notes
storedisplaythumbnailhtml
Returns the item/category thumbnail image. The default
image size is 80 by 80 pixels.
storedisplayimagehtml
Returns the item/category image. The default image size is
240 by 240 pixels.
categorythumbnailhtml
Returns the category image. The default image size is 80 by 80
pixels
relateditemthumbnailhtml
Returns item display image. The default image size is 80 by 80
pixels.
featureditemthumbnailhtml
Returns item display image. The default image size is 120 by
120 pixels.
Deleting Images
You can delete images you no longer use.
To delete an image:
1. Go to Web Site > Files > ImagesLists > Site Builder > Images.
SuiteCommerce Site Builder Guide
Images
2. On the Images page, click the name of the image you want to delete.
3. Click Edit.
4. Click Delete.
A warning appears asking if you are sure you want to delete this image.
5. Click OK. The image is deleted.
After you click OK, you return to the Images list. The deleted image no longer appears.
SuiteCommerce Site Builder Guide
55
Site Builder Tabs & Categories
56
Site Builder Tabs & Categories
Tabs are the most basic building blocks of your NetSuite website. They are the pages of your web store.
They also group together categories containing similar items and information. You use categories to
organize and present items and information on website tabs.
For example, customers click the Printers tab on the Wolfe Electronics web store to view categories
that contain different types of printers. In this example, categories include Inkjet, All-In-One, and Laser.
When a customer clicks on one of the categories, they can see a list of items to choose from.
These are your options for publishing tabs and categories:
■ Web Site Only – If you have the Web Site feature enabled, check the Display in Web Site box when
creating a tab or category to display the information to anyone who visits your website.
■ Intranet Only - If you have the Intranet feature enabled, clear the Display in Web Site box to display
tabs and categories in your NetSuite account but not in your web store. Make a selection on the
Audience subtab to determine who can see the tab or category after they log in to NetSuite.
■ Both Web Site and intranet – Check the Display in Web Site box and select individuals or groups
on the Audience subtab. This displays a tab or category both internally to those you select on the
Audience subtab and to everyone who visits your website.
The topics listed below describe how to create and work with tabs and categories in your website:
■ Creating Website Tabs describes how to create website tabs in NetSuite and how to create hosted
tabs.
■ Creating Site Categories describes how to create categories.
■ Arranging Web Store Categories describes how to organize categories on tab records.
■ Publishing Information to an Internal Site describes how to create an intranet site for your NetSuite
account.
Creating Website Tabs
In NetSuite, tabs define the different pages on your website. You use tabs to organize items and
information on your site.
You can create two different types of tabs for display in your website:
■ Presentation Tabs – where you display categories and items to your customers.
■ Hosted Tabs – where you can display an HTML page that you create, or link to another website.
The Home tab is different from other presentation tabs in that you can display content in three
columns on the home tab. For more information, see Setting Up Your Site Builder Home Page.
If you want to link to another website, you can use a hosted tab. You can also use a hosted tab to
display an HTML page that you create, but to do this you must use the Host HTML Files feature.
NetSuite also lets you build a website of HTML files that you create. For more information, see Hosting
HTML Websites with NetSuite Site Builder.
Presentation Tabs
You can create presentation tabs in NetSuite for display on your website or intranet site. Presentation
tabs are pages on your website. If you use the Advanced Site Customization feature, you can select
a custom template for displaying content on your site. For more information, see Item and Category
Templates.
SuiteCommerce Site Builder Guide
Creating Website Tabs
57
After you create presentation tabs for your website, use the Setup Web Site page to change the order
in which they display. For more information, see Organizing Presentation Tabs.
The following steps only describe how to enter data in the required fields to display a presentation tab
on your website. To learn more about the different ways in which you can customize presentation tabs,
and apply search engine optimization (SEO) tools, read Customizing Presentation Tabs.
To create a presentation tab for display on your website:
1. Go to Web Site > Publishing > Tabs > NewLists > Site Builder > Tabs > New.
2. Click New Presentation Tab.
You can also create a tab while using the Web Site Content Manager at Lists > Web Site > Content
ManagerLists > Site Builder > Content Manager. For more information about the Content
Manager, see Using the Site Builder Web Site Content Manager.
3. In the Label field, enter a name for this tab. Your customers click what you enter here to view the
items on that tab.
You can enter up to 30 characters of letters and numbers. You cannot enter HTML in this field.
4. If you use the Multiple Web Sites feature, choose the website where you would like the tab to
display in the Site field.
5. Check the Display in Web Site box.
6. Click Save. Your tab now automatically appears in your website.
You can add information using the subtabs on the presentation tab record.
■ The Audience subtab lets you publish the tab to everyone that visits your web store, or to a select
group of customers.
For information about publishing a presentation tab in your NetSuite account, and not in your web
store, see Publishing Information to an Internal Site.
■ If you use Advanced Site Customization, the Tag Substitution subtab will appear after you save a
new tab. See Defining Custom Web Site Tags for information on using custom tags to substitute
values on a presentation tab.
■ After saving your new tab, the Content subtab appears. Here you can add items for display on the
tab, or see the categories attached to the tab. For more information about categories, see Creating
Site Categories.
■ If you use the Multi-Language feature, the Translation subtab will appear after saving your new tab.
Here, you can enter translated text for specific fields on your tab. For more information see, Setting
Up a Site for Multiple Languages.
Customizing Presentation Tabs
You can use the fields listed below on the tab record to customize the look and feel of the pages on
your website. You are not required to fill in these fields when you first create a presentation tab record.
If you use the Advanced Site customization feature, you can create a custom HTML template and then
select that template in any of the List Layout fields on the tab record. For more information, see Item
and Category Templates.
■ Category List Layout – Select a layout for the list of categories displayed on this tab. For more
information, see Creating and Editing Website Layouts.
■ Item List Layout – Select a layout for the item lists you place on this tab.
■ Related Items List Layout – Select a layout for your related items list. Use related items to cross-sell
items that complement each other. For more information, see Related Items.
SuiteCommerce Site Builder Guide
Creating Website Tabs
■ Welcome Page Portlet Alignment – Choose where the link to this tab will appear on the Home tab
of your web store. You can set the alignment to the left column, the right column, or choose not to
display a link to this tab on the Home tab.
■ Greeting – Enter a greeting for this tab. This greeting appears above your tab message. You can
enter up to 4,000 characters of letters, numbers, and HTML.
■ Message – Enter a message for this tab. This message appears below the greeting on your tab. You
can enter up to 4,000 characters of letters, numbers, and HTML. On your Home tab, the message
appears below content in the Flash® or image field.
■ Page Title – Enter a page title for this tab which is added to the HEAD element of the HTML source
code for this page. For more information, see Adding Page Titles in Site Builder.
■ URL Component – This field is displayed only after you turn on the Descriptive URLs feature. Enter
a name which will appear in the URL for this page. If you do not enter a URL component, the text in
the Label field is used in the URL.For more information see Descriptive URLs in Site Builder.
Note: The name you use as a URL component cannot be a reserved character string in the
NetSuite application. If you enter a reserved character string, then you will be notified with a
popup alert message. You can enter a different URL component to continue.
■ Meta Tag HTML – Enter a META tag which is added to the HEAD element of the HTML source code
for this page. For more information, see Adding META Tags in Site Builder.
Organizing Presentation Tabs
After you create presentation tabs for your web store, you can set the order in which they display on
your website.
To organize presentation tabs:
1. Go to Setup > Web Site > Set Up Web Site.
2. If you use the Multiple Web Sites feature, click Edit next to the site you want to organize.
3. Click the Appearance subtab.
4. On the Tabs subtab, select a row, and drag it to the position where you want it to appear.
When shoppers view your website, the tabs appear in the order you set here.
Hosted Tabs
Hosted tabs are useful when you want to display an HTML page along with the presentation tabs on
your website, or when you want to link to a page on a different website.
Note that to store HTML files for display on your website, you must turn on the Hosting HTML Files
feature at Setup > Company > Enable Features > Web Presence.
To create a hosted tab:
1. Go to Web Site > Publishing > Tabs > NewLists > Site Builder > Tabs > New.
2. Click New Hosted Tab.
You can also create a hosted tab using the Web Site Content Manager at Lists > Web Site >
Content ManagerLists > Site Builder > Content Manager.
For more information, see Using the Site Builder Web Site Content Manager.
3. In the Label field, enter a name for this tab. You can enter up to 30 characters of letters and
numbers.
SuiteCommerce Site Builder Guide
58
Creating Website Tabs
59
4. If you use the Multiple Web Sites feature, select the site where you want the hosted tab to
appear.
5. In the Link URL field, enter the web address of the site you want to link to.
Use this format: www.anothersite.com
When customers click the tab label, they are redirected to the URL you entered.
Note: If you are linking to a hosted page from this tab, skip this step. The URL
automatically populates this field when you select your HTML file.
6. In the Web Site Page field, select an HTML file from the Web Site Hosting Files folder in the file
cabinet.
7. Check the Display in Web Site box to make this tab available to all visitors on your site.
8. Click Save.
Now, the hosted tab automatically appears in your website. To preview your site, go to Setup > Web
Site > Preview Web Site.
You can also use a hosted tab to display a website made of HTML files that you host in Netsuite. For
more information, see Displaying an HTML Site in a NetSuite Tab.
If you use the Multiple Web Sites, and the Intranet features, and you want to make a hosted tab only
available in your NetSuite account, clear the Display in Web Site box and make a selection on the
Audience subtab. For more information, see Creating an HTML Intranet Site.
Creating Site Categories
To organize information and items for sale on your website, put them in categories. Categories must be
associated with presentation tabs for them to display on your website.
For example, a buyer can click on the Cameras category to see a list of products available.
SuiteCommerce Site Builder Guide
Creating Site Categories
60
Use the presentation tab record to organize which categories display on a tab and in which order. For
more information, see Arranging Web Store Categories.
If your NetSuite account was created prior to 2007, you can use the Specials category to display certain
items on your website. For more information, see Using the Specials Category.
Adding Items to Site Categories
Use the Basic subtab on the category record in NetSuite to choose items and subcategories for display
in a certain category.
To make sure your web store pages load as quickly as possible, do not put more than 50 items in each
category. Set up enough categories and subcategories to make browsing easy for your customers. The
Web store displays up to 1,000 items per category. You are permitted to add more items to a single
category, but any items over the 1,000 item limit only display in search results.
Note that when editing and saving a category with more than 10,000 items, any changes you make to
the sublist are not processed or saved. Editing tasks include: adding new items, deleting old ones, and
reorganizing items in the category. This is done to reduce the potential for slow Web site performance.
To create a category:
1. Go to Lists > Web Site > CategoriesLists > Site Builder > Categories.
2. You can also create new categories using the Web Site Content Manager at Lists > Web Site >
Content ManagerLists > Site Builder > Content Manager. In the New header, click Category.
For more information about the Content Manager, see Using the Site Builder Web Site Content
Manager.
Or, you can use the Import Assistant to import site category data into NetSuite from CSV file
contents. See Site Category Import.
3. On the Site Category page, enter a name in the Category field.
4. If you use the Multiple Sites feature, select the site where you want the category to display.
5. In the Subcategory of field, choose a tab or parent category from the list.
For example, if this is a category you want to appear on your Catalog tab, select Catalog.
6. In the Category List Layout field, select a layout for the list of subcategories you place in this
category.
Category layouts allow you to customize your site by presenting your categories and category
lists in the design of your choice. For more information on layouts, see Creating and Editing
Website Layouts.
7. In the Item List Layout field, select a layout for the list of items you place in this category.
8. In the Related Items List Layout field, select a layout for your related items list. Use related
items to cross-sell items that complement each other. For more information, see Related Items.
9. Check the Display in Web Site box to display this category to everyone who visits your site.
10. Click Save to make the category available on your website.
Note: For the fields listed under the Audience subtab, if you enable the Select All option for a
field that does not have any value listed under it, the items in this category or sub category will
not be displayed on your website.
To remove this category from your site, check the Inactive box on the category record or click the
Delete button. To display the category in an intranet site in your NetSuite account, make a selection on
the Audience subtab. For more information, see Publishing Categories Internally.
SuiteCommerce Site Builder Guide
Creating Site Categories
61
Use the subtabs on the category record to add content.
Basic Subtab
At the bottom of this subtab, add the items you want to appear in this category.
1. On the Basic subtab, write brief and detailed descriptions in the appropriate fields.
Brief descriptions display on your website directly below the category name and can have 999
characters. Detailed descriptions can have 4,000 characters. The detailed description displays on
the item list page where customers add items to the shopping cart.
Description fields can have letters, numbers, punctuation, and HTML. For more information, see
Using HTML in Description Fields.
2. In the Page Title field, enter a name for your website page. This will appear in the HEAD element
of the HTML source code for the website page. For more information, see Adding Page Titles in
Site Builder.
3. In the Meta Tag HTML field, enter a META tag for the category which is added to the HEAD
element of the HTML source code for the page. For more information, see Adding META Tags in
Site Builder .
4. If you use the Descriptive URL feature, the URL Component field displays. Enter a name for this
category that you want to show in the URL that points to the page. If you leave this field blank,
the category name is used.
Note: The name you use as a URL component cannot be a reserved character string in
the NetSuite application. If you enter a reserved character string, then you will be notified
with a popup alert message. You can enter a different URL component to continue.
For more information see Descriptive URLs in Site Builder.
5. In the Search Keywords field, enter alternate names for this category that customers can use
in the Search field on your web store to find this category. For more information, see Setting Up
Alternate Search Keywords.
Media Subtab
1. Select a thumbnail image for your category in the Thumbnail field. This thumbnail appears with
your category in your website.
2. Select an image for your category in the Image field. This image only appears in your website
with a layout that uses full-size images. If you select an image and do not select one of the
Basic layout templates, or a custom layout template that you create, only the thumbnail image
appears.
For more information about layout templates, see Item and Category Templates.
You can set default sizes for images. For more information on setting default sizes for images,
see Resizing Images.
Audience Subtab
In the Audience subtab, select individual names or group names to give them access to this Category.
If you select a group, employee, and a partner, the user must be a member of the group or be the
employee selected or be the partner selected to access this Category.
You should not enable the Select All option for the fields that do not have any values listed under them.
If you enable the Select All option for such fields, the items in this category or sub category will not be
displayed on your website.
SuiteCommerce Site Builder Guide
Creating Site Categories
62
If you wish to publish this category to an intranet, see Publishing Categories Internally.
Translation Subtab
If you use the Multi-Language feature, the Translation subtab will appear after saving a new category
record. You can enter translated text for specific fields. For more information, see the help topic Setting
Up a Site for Multiple Languages.
Tag Substitution Subtab
If you use Advanced Site Customization, the Tag Substitution subtab will appear after saving a new
category. See Defining Custom Web Site Tags for information on substituting custom tags.
Arranging Web Store Categories
You can arrange Web store categories to display in the order of your choice on the presentation tab.
Use the Content subtab on the tab record to do this.
To arrange the display of categories on a tab:
1. Go to Web Site > Publishing > TabsLists > Site Builder > Tabs.
2. Click Edit next to the name of the tab that contains the categories you want to organize.
3. On the Content subtab, click the Categories subtab.
4. Drag and drop the categories to set the order in which they should appear on the tab.
5. Click Save.
When shoppers view this tab, your categories appear in the order you set here.
Using the Specials Category
The Specials category is automatically generated by NetSuite in accounts provisioned prior to 2007.
You can use the Specials category to display items you may want to sell at a special price for a limited
time. When customers visit your site, they see a link to the Specials category on the Home and Catalog
tabs.
Adding an Item to the Specials Category
You can add an item to the Specials category by checking a box on the item record, or by selecting an
item on the Basic subtab of the Specials category record.
SuiteCommerce Site Builder Guide
Creating Site Categories
Note: The On Special option is displayed on the item record only if you have enabled the
Specials feature.
To put an item in the Specials category:
1. Go to Web Site > Publishing > ItemsLists > Site Builder > Items.
2. Click Edit next to the item you want to put on special.
3. Click the Specials subtab.
4. Check the On Special box.
Note: The description displayed in the web store comes from the description fields on
the Store subtab.
5. Click Save.
The item automatically appears in the Specials category of your site.
Alternatively, you can select items on the Specials Category record. Go to Lists > Web Site >
Categories.Lists > Site Builder > Categories.. Click Edit next to the Specials category, and then make
your selection on the Items sublist on the Basic subtab.
Using the Specials Category with Multiple Websites
If you use the Multiple Web Sites feature, you can only display the Specials category on one site at a
time. Select the site where you want the Specials category to display in the Site field on the Specials
category record.
To select a website for the Specials category:
1. Go to Lists > Web Site > CategoriesLists > Site Builder > Categories.
2. Click Edit next to the Specials category.
3. In the Site field, select the website where you want to display the Specials category.
4. In the Subcategory of field, select the tab where the Specials category should display.
Removing the Specials Category from your Website
If you do not want to use the Specials category, go to Lists > Web Site > CategoriesLists > Site Builder
> Categories. Click Edit next to the Specials category, clear the Display in Web Site box, and then click
Save.
Publishing an Employee Directory
Use NetSuite to create an employee directory that includes the name, phone number, and email
address for each employee in your organization. You can publish an employee directory on your
website, or make it available to a specific audience.
To create an employee directory:
1. Go to Lists > Web Site > Employee DirectoryLists > Site Builder > Employee Directory. Click New.
SuiteCommerce Site Builder Guide
63
Creating Site Categories
2. In the Category field, enter a name for the employee directory. The name you enter here
becomes the link for the employee directory in your intranet site or Web site.
3. If you use the Multiple Web Sites feature, choose the site where you want to display the
employee list.
4. In the Subcategory of field, select the tab where you want to display the employee list.
5. In the Organized By field, select the criteria by which you want to sort the employee list.
6. If you want to display the employee list in your website, check the Display in Web Site box.
7. If you do not want to display the employee list in your website, use the Audience subtab to
select the people in your organization who can view the employee directory.
8. Click Save.
You can enter optional information on the following subtabs:
■ Basic – Add descriptions to display on the employee directory.
■ Media – Add a thumbnail image to display with the link to the employee directory.
■ Translation – If you use the Multi-Language feature, enter foreign language translations here.
■ Tag Substitution – If you use Advanced Site Customization, you can enter custom website tags.
Publishing Information to an Internal Site
If you use the Intranet feature, you can publish tabs and categories internally to specific roles, groups
or individuals that have access to your NetSuite account.
For example, you can publish a tab internally to everyone with access to your account. Then, you can
publish various categories, each with their own audience. Some employees, such as accountants, may
have access to a category with information or announcements on payroll. Others, like support reps,
have access to a category with information on cases or support policies.
Publishing Tabs Internally
Intranet tabs are different from center tabs. Intranet tabs are created primarily for publishing
information to an internal audience. Center tabs are created primarily to organize and give access to a
set of page links and portlets in your NetSuite account.
For more information on center tabs, see Creating Center Tabs.
To publish tabs internally, an administrator must enable the Intranet feature at Setup > Company >
Enable Features > Web Presence. Check the box next to Intranet, and click Save.
To create an intranet tab:
1. Go to Lists > Web Site > Tabs > New.
2. Click New Presentation Tab.
3. In the Label field, enter a name for the tab.
4. Enter a Greeting and Message to show at the top of your site.
The Greeting appears in bold text, and the Message shows under the greeting.
5. Clear the Display in Web Site box to make sure this tab only shows in your NetSuite account.
6. On the Audience subtab, select an audience for your intranet site:
SuiteCommerce Site Builder Guide
64
Publishing Information to an Internal Site
65
■ Check the All box to select all of a group, such as all customers, all vendors or all employees.
■ If you check the All Employees box or select a name in the Employees field, an employee
must have access to the Employee Center in order to view the tab.
■ If you check All Roles, the tab is displayed for all roles, including customer, vendor and
partner.
Note: Press CTRL while selecting individual names or roles to highlight more than one.
7. After you have selected everyone you want to see this tab, click Save.
Your new intranet tab appears in your account. To add information to your new tab, you must create
categories and assign them to this tab.
You can also create a hosted tab for your intranet site by clearing the Display in Web Site box on the
hosted tab record. For more information about audience permissions on hosted files, see Audience
Permissions for Hosted Sites. To learn how to create an intranet site when you use the Multiple Web
Sites feature, see Creating an HTML Intranet Site.
Publishing Categories Internally
You can now create categories to publish information on your intranet page. Those you grant access to
on the Audience subtab can see the categories published to the intranet tab when they log in.
To create a category for an intranet tab:
1. Go to Lists > Web Site > Categories.
2. On the Site Category page, enter a name in the Category field.
3. In the Subcategory of field, choose your intranet tab from the list.
4. Clear the Display in Web Site box, and select the people who should be allowed to see the
category on the Audience subtab. Each category can have its own audience so that each person
will see information pertaining only to them.
On the Audience subtab, you can give access to both static groups you manually create and
dynamic groups that automatically update every 24 hours based on search criteria. Both types of
groups appear in the Groups list.
5. Click Save.
For more information about categories see, Creating Site Categories.
SuiteCommerce Site Builder Guide
Website Hosting with Site Builder
66
Website Hosting with Site Builder
■ Hosting HTML Websites with NetSuite Site Builder
■ Understanding NetSuite Login Pages
■ Audience Permissions for Hosted Sites
■ Creating an HTML Intranet Site
■ Displaying an HTML Site in a NetSuite Tab
■ Website Staging Environment
■ Example for Building a Combination Site
■ External Catalog Site (WSDK) Overview
Hosting HTML Websites with NetSuite Site Builder
With the Host HTML Files feature, you can host a custom HTML website in the NetSuite file cabinet. Use
the Advanced Web Reports feature to track site visitors and determine the most popular pages on your
website. For more information, see Hosted Page Hits by Customer Report.
To turn on the Host HTML Files and the Advanced Web Reports features, go to Setup > Company >
Enable Features. Click the Web Presence subtab, and then check the boxes next to the features you
want to use.
If you want to run your site as a web store, you can use NetSuite website tags to integrate your site
with NetSuite web store checkout by adding links to the shopping cart and registration pages in your
custom HTML. For more information, see Tags for Use in HTML Pages and Site Templates.
You can also use tags to display items from your NetSuite account in your hosted HTML website. Note,
however, that tags are not substituted in hosted files greater than 2 MB in size. For more information,
see Using Web Site Tags in Hosted Files.
Note: NetSuite supports the use of client-side JavaScript in hosted pages; however, server-side
scripts are not currently supported.
NetSuite also supports audience permissions on hosted sites. This lets you restrict intranet sites and
hosted tabs on your website for specific users, roles, or groups. For more information, see Audience
Permissions for Hosted Sites.
Note: CDN services are not supported for Site Builder websites.
To host your custom HTML site with NetSuite:
1. Go to Setup > Site Builder > Web Site Hosting Files Setup > Site Builder > Web Site Hosting Files.
2. Select the folder where you want to upload your site files.
■ To publish your site on the web, use the Live Hosting Files folder.
■ For more information about staging your hosted site before publishing it to your online
customers, see Website Staging Environment.
■ To move an existing HTML site to NetSuite, see Moving an HTML Website to NetSuite.
SuiteCommerce Site Builder Guide
Hosting HTML Websites with NetSuite Site Builder
67
Note: If you name a hosting folder or file the same name as a default NetSuite folder or
file, you may lose images or HTML from NetSuite basic site themes.
3. Select the folder where you want to store your site, and then click New Folder to create
subfolders. For example, you may want to create a subfolder for images.
4. Upload files from your computer to you new folder.
■ Click Add File to add individual files.
■ Click Advanced Add to add multiple files in a .zip file. Check the Unzip files box to
automatically unzip files when they are uploaded to the file cabinet.
5. When you have added all of your site files and folders, go to Setup > Site Builder > Set Up Web
Site.
6. On the Setup subtab, in the Default Hosting Root field, select the top level folder in the file
cabinet where your site is stored.
7. In the Web Site Home Page Type field, select Hosted Web Page.
8. In the Web Site Home Page field, select the file name of your home page.
9. Click Save.
Now, when customers visit your NetSuite website, they see only your custom HTML website. If you
need to edit an HTML file, make changes to the file on your computer, and then upload the modified
file to the file cabinet. To preserve links and references to the file, do not change the file name.
For more information about setting up a domain name for your website, see the help topic Domain
Names.
For more information about optimizing your site for search engines, see Site Builder Search Engine
Optimization (SEO).
Moving an HTML Website to NetSuite
If you are moving an existing HTML site to NetSuite, you may want to create a new hosting folder in the
Web Site Hosting Files folder to keep your site structure and links intact.
For general information about hosting your HTML site with NetSuite, see .
To recreate the structure of an existing HTML website in NetSuite:
1. Go to Setup > Site Builder > Web Site Hosting Files Setup > Site Builder > Web Site Hosting Files.
2. Click New Folder to create a new hosting folder based on the structure of your existing HTML
website.
You can create a new folder on the same level as the Live Hosting Files folder or create a
subfolder in the Live Hosting Files folder. Your approach depends on how you want to structure
your website. Later, you will select the folder you create as the Default Hosting Root for your
website.
3. Create subfolders as needed and add files. For more information about uploading files, see
Uploading Files to the File Cabinet.
4. Go to Setup > Site Builder > Set Up Web Site.
If you use multiple websites, click Edit next to the site you want to modify, or click New to create
a new website.
5. On the Setup subtab, in the Web Site Home Page Type field, select Hosted Web Page.
SuiteCommerce Site Builder Guide
Hosting HTML Websites with NetSuite Site Builder
68
6. In the Web Site Home Page field, select the file name of your home page.
7. In the Default Hosting Root field, select the top-level folder in the file cabinet where your site is
stored. This is the folder you created in Step 2.
8. Click Save.
To preview your site, go to Setup > Site Builder > Preview Web Site. Click Preview Site.
Audience Permissions for Hosted Sites
You can limit access to hosted sites for internal use, by granting access to specific users, roles, or
groups.
NetSuite supports audience permissions on hosted sites via an Audience subtab on the root hosting
folders in the Web Site Hosting Files folder.
When you select an audience for a website, all pages, associated tabs, images, and other files for that
website can only be accessed by members of the audience that you select. These pages are protected
from unauthorized access. Any user not included in the audience receives a “Page Not Found” error
message when trying to access the website URL.
This feature is typically used to limit access to an internal site, such as a sales or a professional services
portal, on a NetSuite website tab.
To set up an internal hosted site for a select audience:
1. Go to Setup > Site Builder > Web Site Management > Web Site Hosting Files.
2. Click New Folder to create a new folder in the Web Site Hosting Files folder.
For more information, see Creating File Cabinet Folders.
3. On the Audience subtab, clear the Display in Web Site box.
When this box is cleared, files in the folder are no longer displayed to visitors on the website.
Files will only display to members of the audience you select.
4. Select the audience that is allowed to visit this site.
You can base your audience on the following criteria. To view this site, a user must meet only one
of the criteria you set in each category.
■ Roles
■ Departments
■ Subsidiaries
■ Groups
■ Employees
■ Customers
■ Vendors
■ Partners
To select more than one item in each of these fields, press and hold CTRL.
5. Click Save.
Now, you can upload the HTML files for your hosted site into the folder you created above, for more
information on setting up a hosted site, see Hosting HTML Websites with NetSuite Site Builder.
SuiteCommerce Site Builder Guide
Creating an HTML Intranet Site
69
Creating an HTML Intranet Site
If you use the Multiple Web Sites feature, you must create a website, and then designate that site as
the intranet site in your NetSuite account.
To create an intranet site using the Multiple Web Sites feature:
1. Go to Setup > Site Builder > Set Up Web Site > New.
2. Create a new site. You might name this site Internal, for example.
3. Create a new folder in the Web Site Hosting Files folder.
4. Upload the desired HTML files for the site.
5. Go to Setup > Site Builder > Set Up Web Site, and click Edit next to the site you created in Step 2.
6. In the Default Hosting Root field, select the name of the folder that holds the HTML files for that
site.
7. Click Save.
8. Go to Setup > Company > General Preferences.
9. In the Internal Web Site field, select the site you created in Step 2.
10. Click Save.
Now, you can update the files in the Web Site Hosting folder selected as the Default Hosting Root for
the intranet site.
Note that unless you set audience permissions for the Web Site Hosting folder that holds the files
published on the intranet site, then anyone with permission to that folder will have access to the files.
For more information about restricting access to Web Site Hosting folders, see Audience Permissions
for Hosted Sites.
Displaying an HTML Site in a NetSuite Tab
You can display a custom HTML website as a tab in your NetSuite website. For more information on
uploading a custom website, see Hosting HTML Websites with NetSuite Site Builder.
When you create a tab for your custom HTML website, you can use the custom site in conjunction with
NetSuite's shopping cart and checkout. This lets you take orders in NetSuite through your own site.
The Web Site Hosting feature must be enabled in your account to make your HTML site a custom tab.
An Administrator can enable this feature at Setup > Company > Enables Features > Web Presence.
To display an HTML site as a tab:
1. Go to Lists > Web Site > Tabs > NewLists > Site Builder > Tabs > New.
2. Click New Hosted Tab.
3. In the Label field, enter a name for your custom tab.
This name shows on the tab in the website.
4. In the Web Site Page field, select the file name of your HTML website.
The URL for your page from the file cabinet record fills in the URL field above.
SuiteCommerce Site Builder Guide
Displaying an HTML Site in a NetSuite Tab
Note: Your HTML file should use either the <NLPAGETABS> or <NLPAGETOP> tags to
integrate with the other tabs of your site.
5. Check the Display in Web Site box to make this tab available to anyone who visits your site.
If you have the Intranet feature enabled, you can clear this check box and select individuals or
groups below that you want to view the tab after they log in or register.
6. Click Save.
Now, when a customer clicks this tab, they are taken to your custom website.
Website Staging Environment
You can test and prepare changes to your hosted website using NetSuite's staging environment.
In your Web Site Hosting Files folder, there are two folders—Live and Staging. Files in the Live folder
compose your website and appear to customers. When you need to make and test changes to your
site, you can upload your new site to the Staging folder.
You can set the audience on your Staging folder so that only employees or partners can view the
website while it is under test. When you set an audience for your staging folder, employees and
partners must log into NetSuite, and use the URL for the site home page to view the site. For more
information, see Audience Permissions for Hosted Sites.
When the audience for the staging folder is not set, you must create a domain where you can stage
your website.
To set up your website staging environment:
1. Register your staging domain and point the domain at NetSuite. For more information, see the
help topic Pointing Domain Names at NetSuite.
2. Go to Setup > Setup Web Site > Domains. Add the domain for use on your staging environment.
3. In the HTML Hosting Root column, select Staging.
4. Click Add.
When you are confident with your new site, move your files from the Staging folder to the Live folder.
Example for Building a Combination Site
This section offers sample HTML and GIF files for a site that mixes a hosted home page with Netsuite
tabs, shopping cart and checkout. You can experiment with this example to best serve your needs.
Click here to download a ZIP file that includes the sample home page and images. When the dialog
opens, choose Save, and then save the media file as NetSuite_examples.zip in a location where you
can find it again.
Follow the steps below to start using the sample files:
1. Add the Sample Files to the File Cabinet
2. Set Preferences for the Sample Web Store
3. Create a Tab for Your Website
SuiteCommerce Site Builder Guide
70
Example for Building a Combination Site
71
4. Create a Category for Your Website
5. Create an Item Record to Publish on Your Website
6. Preview Your Website
Add the Sample Files to the File Cabinet
Because you will display these files in your web store, you must upload them in the Web Site Hosting
Files folder in the NetSuite file cabinet.
To upload website files in the file cabinet:
1. Go to Setup > Site Builder > Web Site Management > Web Site Hosting Files.
2. Click the Live Hosting Files folder.
3. Click the Site folder.
4. At the bottom of the page, click Advanced Add.
5. In the Zip Archive to Add field, click Browse.
6. Select the NetSuite_examples.zip file from your hard drive, and click Open.
7. Check the Make All Files Available Without Login box.
8. Click Add. All files are automatically unzipped in the site folder.
9. Click Edit next to logo_wolfe_electronics.gif.
10. In the Folder field, select Images.
11. Click Save.
Next, set preferences for your site including the hosted home page.
Set Preferences for the Sample Web Store
Set preferences to determine how your site appears and interacts with your NetSuite account. In the
steps below, you will set the look and feel of your site by choosing a color theme, logo, and site theme.
To set web store preferences:
1. Go to Setup > Site Builder > Set Up Web Site.
2. On the Setup subtab, in the Web Site Home Page Type field, choose Hosted Web Page.
3. In the Web Site Home Page field, choose Live Hosting Files : /site/index.html.
4. Click the Appearance subtab.
5. In the Web Site Color Theme field, you can choose your own company colors or choose -From
Theme- to use the color theme provided with the site theme.
6. In the Web Site Logo field, choose logo_wolfe_electronics.
7. In the Web Site Logo Alignment field, choose Left.
8. In the Web Site Theme field, select one of the Basic site themes.
If you use the Advanced Site Customization feature, you can customize the templates for these
themes or use them as guides to make your own at . For more information, see Customizing Site
Themes.
SuiteCommerce Site Builder Guide
Example for Building a Combination Site
72
9. In each of the Drilldown Template and the Layout fields, choose -From Theme- to use the
templates associated with the site theme you selected in Step 8. You can mix and match site
templates by selecting different templates for Drilldown and Layout.
The Advanced Site Customization feature is required to customize the basic item/category
templates or to create your own. For more information on creating item/category templates,
see Web Site > Appearance > Item/Category TemplatesLists > Site Builder > Item/Category
Templates.
10. Click Save.
For more information on the other optional settings on the Site Builder Web Site Setup page, see the
help topic Web Site Preferences.
Next, create a website tab and a category for your site.
Create a Tab for Your Website
To create a Web site Tab, go to Lists > Web Site > Tabs > NewLists > Site Builder > Tabs > New.
You will use tabs as the pages of your web store, to organize and display categories of similar items
and information. You can also use a hosted tab to display an HTML page or link to a different website.
For more information, see Creating Website Tabs.
After creating a tab for your website, you can create a category and display it on a tab.
Create a Category for Your Website
To create categories for your site, go to Lists > Web Site > Categories > NewLists > Site Builder >
Categories > New.
Categories organize the items you sell in your web store. On the Web Site subtab of item records, you
select the category where you want to display the item. To learn more about setting up categories, see
Creating Site Categories.
After you have created a category, and assigned it to the tab you created, next create an item record.
Create an Item Record to Publish on Your Website
You can create item records of virtually any type for display on your website. Note that to display an
item in your web store, it must have a value for price, it must be assigned to a category, and the Display
in Web Site box must be checked. For more information, see Setting Up Items for the Web Site.
Your web store is now ready to preview.
Preview Your Website
To preview your website, go to Setup > Site Builder > Preview Web Site. Click Preview Site. Your site
opens in a new window.
The website home page displays the sample hosted HTML page you uploaded in the file cabinet. The
other tabs display categories and items you have set up in your account. The Shopping Cart, Checkout
and My Account tabs display by default in all NetSuite websites. You can choose not to display any tab
in your website by clearing the Display in Web Site box.
SuiteCommerce Site Builder Guide
Example for Building a Combination Site
73
Note: If you choose to build your website with HTML pages, you can use Attribute tags in the
HTML to display items and categories. For more information, see Tags for Use in HTML Pages
and Site Templates. You can also use attribute tags to display information from category and
item records in site templates. For more information, see Creating Attribute Tags for Standard
Records.
External Catalog Site (WSDK) Overview
An External Catalog Site gives you the flexibility to use your own website, while taking advantage of
NetSuite shopping cart and checkout capabilities.
When you use an External Catalog Site, your website is hosted by a third party, but the shopping cart,
customer login, registration, and checkout pages are hosted by NetSuite. To enable the customer to
navigate back and forth, you must copy and paste links from NetSuite into your website HTML, and
you must provide NetSuite with links back to your site. Your customers can navigate your website, view
items on your site, add items to the shopping cart, change item quantities, and submit orders.
If you want NetSuite to host all the pages of your web store or site, then you should not use the
External Catalog Site feature. To learn more about different options read the following:
■ Hosting HTML Websites with NetSuite Site Builder
■ SuiteCommerce Advanced
Benefits of Using an External Catalog Site
An External Catalog Site integrates your website with information stored in NetSuite, as well as
ecommerce capabilities. Your site performs real-time queries of your inventory using scripts provided
by NetSuite that you incorporate into your website HTML. You can choose to display the following
product information along with an add to card button for each item:
■ Names
■ Descriptions
■ Prices
■ Stock status
■ Weight
■ Images
To get started implementing your external catalog site, read the following topics:
■ Enabling the External Catalog Site Feature
■ Setting Up an External Catalog Site
■ Best Practice for Creating an External Catalog Site (WSDK)
Enabling the External Catalog Site Feature
Before you can integrate your website with NetSuite, an Administrator must enable this feature in
NetSuite.
SuiteCommerce Site Builder Guide
External Catalog Site (WSDK) Overview
74
To turn on the External Catalog Site feature:
1. Go to Setup > Company > Enable Features.
2. On the Enable Features page, click the Web Presence subtab.
3. On the Web Presence subtab, check the boxes next to Web Site, Web Store, External Catalog
Site (WSDK), and Online Ordering.
4. Click Save.
After you enable the feature, the tools needed to integrate your External Catalog Site with NetSuite are
immediately available. Next, ensure that you have created item records in NetSuite for all the products
you want to sell online. For more information, read Setting Up Items for the Web Site.
You must also ensure that the items you want to display in your External Catalog Site are available
online. The Display in Web Site box must be checked on each item record. After you have marked each
item to be available online, scripts that you copy and paste into your website become available for each
item you want to display on your site.
Note: If your items are not available online, then these items cannot be integrated with your
website.
Setting Up an External Catalog Site
To set up an External Catalog Site, you must modify your website HTML and define settings in NetSuite.
In NetSuite you define how your customers navigate between your website, the shopping cart,
registration, and checkout.
To enter the URLs that take customers from NetSuite back to your site:
1. Go to Setup > Site Builder > Set Up Web Site. If you use multiple websites, click Edit next to the
site you want to modify.
2. On the Setup subtab, check the WSDK box.
3. Click the External subtab.
4. Enter the appropriate URLs for each field. Use this format for URLs: http://
www.mywebstore.com/catalogpage1.html
5. When you have finished, click Submit.
Integrating your WSDK HTML
To integrate the product information that exists in NetSuite with your website, you must copy and
paste the links, URLs, and scripts provided by NetSuite into your website HTML. The links provided
by NetSuite will take customers from your site to the shopping cart, customer registration page, and
checkout. HTML and URLs for querying items enable you to display the products you want to sell
SuiteCommerce Site Builder Guide
External Catalog Site (WSDK) Overview
75
on your site. The HTML and URLs provided to you are dynamically generated by NetSuite based on
information entered in your account.
To access your External Catalog Site scripts:
1. Go to Setup > Site Builder > Preview Web Site.
2. Under the External Catalog Site Tools heading, click Links from your site back into NetSuite.
The page that is displayed shows links and scripts you must use to integrate your site with the
NetSuite shopping cart, checkout, and the customer login and registration system.
3. Paste the links into your website HTML to take your shoppers from your website to the shopping
cart, checkout page, customer login pages, as well as the registration page for new customers.
You can also copy and paste scripts that recognize and welcome the customers browsing
your store. By default, these scripts display the number of items your customers have in their
shopping carts and the current subtotal of items in your customers' shopping carts.
4. Go back to the Preview Web Site page. Click HTML and URLs for querying items.
The page that is displayed shows the list of items you made available online.
5. Click Item Script Page next to each item you want to display on your site. A page appears with
the appropriate scripts for the item.
6. Paste the scripts into your website HTML. You can display the add to cart button and other
information for each item. You are not required to add every script on this page to your website
SuiteCommerce Site Builder Guide
External Catalog Site (WSDK) Overview
76
HTML. Choose which scripts you want to use. Because you created item records in the system,
and you are tracking inventory in NetSuite, inventory status information is up-to-date.
Note: You have the option to use your primary custom domain in WSDK links and
scripts. You can replace the default domain displayed on the page with your primary
site domain. Use the domain found at Setup > Set Up Web Site, on the Domains subtab,
marked as the Primary Web Site URL.
7. (Optional) You can modify the Add Item To Cart HTML to set the page where online shoppers
are directed when they choose to continue shopping. Follow the instructions on the page.
For more information, read URL Parameters for Adding Items to the Cart.
After you finish pasting URLs and scripts into your website HTML, your External Catalog Site is ready for
customers.
Best Practice for Creating an External Catalog Site (WSDK)
This section contains best practice recommendations for creating an External Catalog Site.
■ You have the option to use your primary website domain in WSDK links and scripts. You can replace
the default domain displayed on the page with your primary website domain. Use the domain
found at Setup > Set Up Web Site, on the Domains subtab, marked as the Primary Web Site URL.
■ Be consistent with the domain you use in the WSDK links and scripts. For example, do not add
items to the cart using the website primary domain, and then get the count of items in the cart
using the default domain displayed on the Item Script page.
■ If you change the domain you use in links and scripts, then use a file editor to search and replace all
occurrences of the domain in all of your website files. If there are inconsistencies, shoppers may not
be able to add items to the cart and checkout successfully.
■ For more information, read Setting Up an External Catalog Site.
SuiteCommerce Site Builder Guide
Site Builder Customization
77
Site Builder Customization
There are different levels of customization available for NetSuite Site Builder based on the features you
have enabled in your account.
■ Basic Customization
■ Advanced Site Customization
■ Site Scripting
Basic Customization
Along with the Web Site and Web Store features, NetSuite Site Builder provides a set of basic site
themes and layouts you can mix and match. You can change color themes, post saved search results
on your site and add links, allowing shoppers to share information about the products you sell.
For basic customization, knowledge of HTML is not required. Read the topics below for more
information:
■ Creating and Editing Website Layouts
■ Changing Website Color Themes
■ Adding a ‘Tell A Friend' Link
Advanced Site Customization
To use HTML for customizing your Site Builder website, turn on the Advanced Site Customization
feature at Setup > Company > Enable Features on the Web Presence subtab. With Advanced Site
Customization, you can modify the HTML in site themes and layouts, and customize the text that
appears on your website in messages, email and other areas. Read the topics below for more
information:
■ Customizing Site Themes
■ Item and Category Templates
■ Adding a Style Sheet to Your Site
■ Customizing Website Text
NetSuite provides website tags so you can combine your custom HTML with elements of the NetSuite
web store interface (such as tabs and page layout) and objects from your NetSuite account, such as
items and custom fields. For more information, read Web Site Tags and, Displaying Price Levels and
Sale Prices.
You can customize Website URL Parameters to link to various pages or pass parameters such as
promotion codes or currency values in your NetSuite website or store.
You also have the option to create your own HTML website pages, host them in NetSuite, and use the
NetSuite shopping cart and checkout. For more information, see Website Hosting with Site Builder.
Site Scripting
You can use SuiteScript to customize your Site Builder and your SuiteCommerce Advanced web store.
SuiteCommerce Site Builder Guide
Basic Customization
78
■ The Scriptable Cart feature enables you to attach scripts to the sales order form submitted at
checkout. This is most useful if you are familiar with scripting entry forms. The logic in the custom
SuiteScript you attach to a sales order is triggered when the customer submits an order, and
continues to operate on the sales order during each step of order processing. Scriptable cart is also
useful for working with customizations you want to add to the sales order, such as custom fields
and item line validation. See Scriptable Cart.
■ The SuiteScript Server Pages (SSP) feature, now in beta, supports the packaging of Web store
customizations into SSP applications. You can create SSP applications that fully customize your
customers' shopping experience, by replacing default Web store pages with your own custom
assets. You can use familiar HTML and SuiteScript, and even other E-Commerce platforms, to create
these customizations. See the help topic SSP Application Overview.
■ Along with SuiteScript, SSP applications have access to a new set of shopping objects and methods
designed specifically for use with the Web store. See the help topic Commerce API Overview.
Basic Customization
To apply basic customizations to your NetSuite web store, knowledge of HTML is not required. Read the
topics below for more information:
■ Creating and Editing Website Layouts
■ Changing Website Color Themes
■ Adding a ‘Tell A Friend' Link
Creating and Editing Website Layouts
You can use Web site layouts to customize the way items and categories appear in your website.
If you use the Advanced Site Customization feature, you can attach templates for item lists and
category lists on the Layout subtab. For more information, see Item and Category Templates.
If you do not use Advanced Site Customization, you can still change the number of rows, and columns
applied to any layout. You can also display numbered page navigation links and links for sorting items
on the page.
Types of Web Site Layouts
There are several layouts available for basic customization. The list below describes each layout you will
find in your account by default:
■ Basic templates – A set of 24 different layouts provided by NetSuite, applicable to item, category,
and tab pages.
■ Standard Dense List Layout – Displays items in a table format, with cells for item name, description,
price, quantity and the Add to Cart button in each row.
■ Standard Featured Items Layout – Displays items in a vertical list and shows the image associated
with the item, the item name and brief description but omits the Add to Cart button.
■ Standard Items/Category Layout – Displays items in a vertical list and shows the image associated
with the item, the item name and brief description, and includes the add to cart button.
When you customize any one of the 24 Basic templates provided by NetSuite, you can only modify
the fields on the Default Chart Type subtab. To modify the HTML used in each template attached to
SuiteCommerce Site Builder Guide
Basic Customization
79
those layouts, you must enable the Advanced Site Customization feature. For more information, see
Advanced Site Customization.
Editing Web Site Layouts
You can edit Web site layouts that you create and the basic templates provided by NetSuite. Go to
Setup > Site Builder > Layouts, and then click Customize next to the layout you want to modify. Note
that without the Advanced Site Customization feature, your customization options are limited.
Creating Web Site Layouts
After you create a layout, you must select the layout on a tab to display it on your website. For more
information, see Customizing Presentation Tabs. To see a new layout on your site, go to Setup > Site
Builder > Preview Web Site.
To create an item/category layout:
1. Go to Web Site > Appearance > Layouts > New.
2. In the Name field, enter a name for the layout.
3. The sections below describe the fields on each subtab.
Default Chart Type
1. In the Border Style field, select one of the following:
■ No Window – this places your Welcome message in a colored box at the top of the page
■ Window With Title Bar – this places your Welcome message and featured items in a colored
box below your Welcome greeting
■ Window Without Title Bar – this places your Welcome message and featured items in an
outlined, colored box
To customize colors for your layouts, go to Lists > Color Themes.
2. In the Column Width field, choose Fit to Browser Window or select a column width. The column
width options in the list are in pixels.
3. In the Number of Columns Shown field, choose Single Column List or the number of columns
you want to appear on a page.
4. In the Number of Rows Shown field, choose the number of rows you want to appear on a page.
The maximum limit is 50 rows on a page. Visitors to your site can click page links to see more
items and categories.
5. In the Row Height field, specify the height of the table cells in pixels. Enter a number in this field.
You can leave this field blank to use the default value set by NetSuite.
6. In the Row Padding field, define the space between cell content and its borders. Enter a positive
number in this field to create more space, or a negative number to create less space. You can
leave this field blank to use the default value set by NetSuite.
7. Check the Paginate box to show your site visitors which page they are on if your list is on
multiple pages. In the Display field, choose to show page numbers at the top of the list, bottom
of the list, or both.
8. Check the Sort Links box to allow your customers to sort lists alphabetically or by price. In the
Display field, choose to show these links at the top of the list, bottom of the list, or both.
9. In the Items Are Laid Out field, choose to lay out items horizontally or vertically.
SuiteCommerce Site Builder Guide
Basic Customization
80
10. If you want to use a checkerboard effect with this custom layout, check the Use Checkerboard
Effect box. This causes every other item in a list to have a background.
11. In the Sort By field, choose one of the following to sort item or category lists:
■ Sequence – Lists items in the order they appear on the tab or category record.
■ Name – Lists items alphabetically by name.
■ Price – Lists items by price, low to high.
12. Check the Descending box to list prices from high to low, names from Z to A or sequenced items
in reverse
13. Check the Use Templates box to an item/category templates to format lists for this layout.
Note: If you check the Use Templates box, the Heading and Items subtabs are removed.
The settings on these subtabs should be addressed in your item/category templates.
14. In the List Template field, select the template for the list of categories or items. This template
must include the <NLITEMLIST> tag.
To create a new list template from this page, click the New button next to the list Template field.
For more information, see Creating Item/Category Templates.
15. In the List Cell Template field, select the template for how categories or items in the list should
display.
16. If you checked the Use Checkerboard Effect box, in the Alternate List Cell Template field, select
an item/category template to use for every other item or category in a list. The type of tags used
in this template must match those used in the templates selected in the List Template field and
List Cell Template field. Click the New button to create a new template.
Note: Item templates and category templates cannot be combined on layouts.
Heading
1. In the Heading Placement field, choose where the category name or the brief description of a
category should display.
2. If you want the heading to have a backdrop, check the Heading Backdrop box. Checking this box
applies a custom color to appear behind the category name.
3. In the Image field, choose how the category image should display in the heading:
■ No Image – this shows no image on the page you apply this custom layout to
■ Show Image Thumbnail – this shows only the image thumbnail
■ Show Full-Size Image – this shows only the full-size image
4. In the Image Placement field, choose where the category image is placed in relation to the
category description.
5. Check the Gap Between Text and Image box to have a larger space between the image and
description.
6. In the Image Alignment field, choose how the category image should be aligned.
7. In the Title Text Alignment field, choose how the name of the category is aligned.
8. In the Description Text Alignment field, choose how the description of the category is aligned.
9. In the Vertical Alignment field, choose how text is vertically aligned in the heading.
Items
1. In the List Style field, select one of the following:
SuiteCommerce Site Builder Guide
Basic Customization
81
■ Graphical Item List – item lists span multiple rows
■ Dense Item List – condenses your item lists into a single row
2. In the Image field, choose how images should display in a list.
3. In the Image Placement field, choose how category or item images are displayed in relation to
the description.
4. Check the Gap Between Text and Image box to have a larger space between the image and
description.
5. In the Image Alignment field, choose how category or item images should be aligned.
6. In the Title Text Alignment field, choose how the names on this list should be aligned.
7. In the Description Text Alignment field, choose how the descriptions in the list should be
aligned.
8. In the Vertical Alignment field, choose how the text for each item or category should be
vertically aligned.
9. Check the Show Item Prices box to show prices next to items in lists.
10. To display the Add To Cart link next to items, check the Show Add To Cart Button box. If you do
not check this box, the Add to Cart button does not appear next to items. Shoppers must drill
down to item details to place items in the shopping cart
11. To show separators between items, check the Show Separators Between Items box. Separators
are small dots that can help differentiate your categories and items.
After you create your custom layouts, you can do the following:
■ Apply your layouts to specific tabs and categories in your website using the Content Manager in Site
Builder Lists > Site Builder > Content ManagerWeb Site > Publishing > Content Manager.
■ Set default layouts at Setup > Site Builder > Set Up Web Site.
Changing Website Color Themes
You can customize your site by selecting a color that fits your business. Select from a multitude of
NetSuite colors, or customize your own.
To change the colors in your website:
1. Go to Setup > Site Builder > Set Up Web Site.
2. If you use the Multiple Web Sites feature, click Edit next to a website.
3. Click the Appearance subtab.
4. In the Web Site Color Theme field, select a color from the list.
To create a custom color theme, go to Setup > Site Builder > Color Themes.
5. Click Submit.
The changes you make on the Web Site Setup page automatically update in your store or site. To
preview your store or site, go to Setup > Site Builder > Preview Web site.
Adding a ‘Tell A Friend' Link
You can allow your customers to quickly send email messages to others containing links to items in
your website using the ‘tell a friend' preference. When you enable this preference, a site visitor can click
SuiteCommerce Site Builder Guide
Basic Customization
82
a Tell A Friend link while viewing an item. Clicking this link opens a new message using the customer's
email editor that contains a link to the item's page.
To enable this preference, go to Setup > Site Builder > Setup Tasks > Set Up Web Site. On the
Appearance subtab, in the Tell a Friend section, check the Show “Tell a Friend” Link box.
The Tell a Friend email message has a subject of “Hi There,” contains the following text: “I thought you
would like to have a look at this product,” and includes the URL that points to the item in the Web store.
You can customize the text of this email at Setup > Site Builder > Customize Text. For more information,
see Customizing Website Text.
When you use a hosted site or a site with custom themes, you can also add the Tell a Friend link to
hosted pages using an attribute tag in the following format:
<%=getCurrentAttribute('item','tellafriendlinkhtml')%>.
Advanced Site Customization
The Advanced Site Customization feature lets you incorporate your own HTML code to themes and
templates on your website or store. For best results, you should be proficient with HTML. Read the
topics below for more information:
■ Customizing Site Themes
■ Creating and Editing Site Themes
■ Item and Category Templates
■ Displaying Price Levels and Sale Prices
■ Adding a Style Sheet to Your Site
■ Using Web Site Text Groups
Customizing Site Themes
Create a unique e-commerce site as you maintain your item, category, and tab information in NetSuite.
Using site themes gives you great flexibility in site design and maintenance. Site themes are based on
Item/Category templates and Layouts. You can use a site theme to define the look and feel of tabs,
sidebars, headers, and footers on your website.
Use the basic NetSuite site themes and templates, or create your own.
1. Go to Setup > Site Builder > Item/Category Templates to customize the standard NetSuite
templates or to create your own templates. For more information about Item/Category
templates, see Creating Item/Category Templates.
Create site templates as a basis for the layouts that you apply to tabs and categories in your
site. In the custom HTML that you create, you can insert Web Site Tags specifically designed by
NetSuite to pull information from item, tab, and category records.
2. Go to Setup > Site Builder > Layouts to create page layouts based on your templates. For more
information about this process, see Applying Templates to Lists of Categories and Lists of Items.
3. Go to Setup > Site Builder > Site themes to attach your layouts and templates to site themes.
For more information, see the detailed steps below.
To use this feature, go to Setup > Company > Enable Features. On the Web Presence subtab, check the
Advanced Site Customization box, and click Save.
SuiteCommerce Site Builder Guide
Advanced Site Customization
83
Note: Advanced knowledge of HTML is recommended. When you enter HTML for a theme, it
must be correct HTML, and it must correctly use the Web Site Tags provided by NetSuite. To add
graphics and apply style sheets to HTML site theme templates that you create, you must upload
image and CSS files to the Web Site Hosting Files folder.
Creating and Editing Site Themes
Customize and edit site themes from the Web Site Themes page on the Setup tab. You can edit the
Default site theme, or customize one of the Basic site themes. After creating a custom site theme, it will
display on the list, and you can go back to edit the custom site theme you created.
To customize or edit a site theme, first Go to Setup > Site Builder > Setup Tasks > Themes.
Click the links below to expand steps for each subtab. To view a chart of NetSuite website tags, see Web
Site Tags and Tags for Use in HTML Pages and Site Templates.
General subtab
1. In the Page cellpadding field, enter a value for the amount of space you want to appear outside
the tables in your HTML.
For example, to include no space between your tables, enter 0.
2. In the Color Theme field, select the color background scheme to use for this theme. You can
override this theme by selecting a theme on the Set Up Web Site page.
You can create your own color theme at Web Site > Appearance > Color Themes > New.
3. In the Site Font field, select the default font to use for text in your site.
4. In the field named Addition to <head>, enter any HTML you want to appear in the <head>
section of your website.
This section is useful for referencing script files, defining scripts your pages need or adding a
message in the title of your window.
5. In the <body> tag attributes field, you can control the attributes of the page <body> tag.
For example, you can control the page background color, default text color, link color and margin
width. Enter customized values to override the default values for the <body> tag of your site.
Leave this field empty to use default body tag attributes.
Use the following as an example for this field:
bgcolor='#FFFFFF' link='#000000' vlink='#000000' alink='#000000' text='#000000' style='margin:5
px'
SuiteCommerce Site Builder Guide
Advanced Site Customization
84
6. In the Default Item Drilldown Template field, select the item/category template that should be
used to display item detail pages.
The item detail page is displayed when a site visitor clicks on an item on your website to see
more information. You can override this default by selecting templates for individual items on
item records.
For more information on item templates, see Item and Category Templates.
Note: Selecting a default item template on the Set Up Web Site page overrides this
setting.
7. In the Default Info Item Drilldown Template field, Select the item/category template that should
be used to display information item detail pages.
Your HTML template is applied when a site visitor clicks the name of the information item from
a list to view more details. You can override this default by selecting templates on individual
information item records.
Note: Selecting a default information item template on the Set Up Web Site page
overrides this setting.
8. In the Default Item List Layout field, select the default layout for lists of items in your site. You
can set list layouts on individual categories and tabs to override this default.
For more information on layouts and list templates, see Creating and Editing Website Layouts
and Item and Category Templates.
Note: The Item List Layout set on the parent Tab overrides the setting on the Set Up
Web Site page.
9. In the Default Category List Layout field, select the default layout for lists of categories or
subcategories in your site. You can set list layouts on individual categories and tabs to override
this default.
Note: Selecting a default category list layout on the Set Up Web Site page overrides this
setting.
10. In the Default Related Items Layout field, Select the default layout for lists of related items in
your site. You can set list layouts on individual categories and tabs to override this default.
Note: Selecting a default related items list layout on the Set Up Web Site page overrides
this setting.
11. In the Welcome Page Item List Layout field, select the list layout you want to use for items on
your Welcome tab.
Create new layouts at Web Site > Appearance > Layouts > New.
Body subtab
1. In the Logo and Tabs Template field, enter the HTML that defines the top of the page, including
your logo and tab bar.
This example displays your logo, the Register and Log In links, the tab bar and the code that
recognizes a customer that has logged in or prompts a returning customer to Log In. Replace
YOUR LOGO URL with the URL of the image you use for your logo.
<tr>
SuiteCommerce Site Builder Guide
Advanced Site Customization
85
<td>
<table width="100%" border=0>
<tr>
<td align="left"><img src="YOUR LOGO URL" border=0>
</td>
<NLPAGELINKS>
</tr>
</table>
<br>
<table border=0 cellspacing=0 cellpadding=0>
<tr><NLPAGETABS>
</tr>
</table>
<table border=0 cellspacing=0 cellpadding=0 width=100%>
<tr class='bgbar'>
<td align="right" class='smalltext'><NLUSERINFO>
</td>
</tr>
</table>
</td>
</tr>
2. In the Content Area Template field, you can customize the central content area where your
categories and items are displayed. This example inserts lists of items available on the tab you
are viewing.
<td valign="top" width="100%">
<table width="100%">
<NLCOLUMNCONTENTS>
</table>
</td>
3. In the Left Sidebar Width field, enter a width in pixels for the size of the left column in your
website.
4. In the Left Side Navigation Template field, enter HTML for the table on the left side navigation
of all pages. For example, you can enter the following:
<td valign="top" width="<NLSIDEBARWIDTH>">
<table>
<NLCOLUMNCONTENTS>
</table>
</td>
5. In the Right Sidebar Width field, enter a width in pixels for the size of the right column in your
website.
6. In the Right Side Navigation Template field, enter HTML for the table on the right side
navigation column on the Home page, and My Account tab on your web store. For example, you
can enter the following:
<td valign="top" width="<NLSIDEBARWIDTH>">
<table>
<NLCOLUMNCONTENTS>
</table>
</td>
SuiteCommerce Site Builder Guide
Advanced Site Customization
86
7. In the Footer Template field, you can customize the footer of your site pages. This example
places a copyright statement in the footer.
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td class='smalltextrt' align='right'>
Copyright © 2004 Your Company Name. All rights reserved.
</td>
</tr>
</table>
Tabs and Buttons
1. In the Active Tab Template and Inactive Tab Template fields, you define how the active tab (the
tab a customer is viewing) and the inactive tabs appear. If you create an active tab template, you
must also create an inactive tab template.
This example creates a tab bar with a dark blue active tab and light blue inactive tabs. The color
of the text on the tabs in defined by the color theme selected at Setup > Site Builder > Set Up
Web Site.
Active Tab Template :
<td width="2"></td>
<td bgcolor="darkblue">
<a href='<NLTABLINKURL>' <NLTABLINKATTRIBS>>
<NLTABLABEL></a> </td>
<td width="2"></td>
Inactive Tab Template :
<td width="2"></td>
<td bgcolor="lightblue"> <a href='<NLTABLINKURL>'
<NLTABLINKATTRIBS>><NLTABLABEL></a>
</td>
<td width="2"></td>
2. In the Add to Cart Button field, you can customize the button that customers click if they want to
buy an item. This example creates a button with text “Buy Now!”.
<NLADDTOCARTOPTIONS>
<tr align='left'>
<td class='smalltext' width='1%'>
<NLADDTOCARTITEMID><NLADDTOCARTQUANTITY>
</td>
<td>
<INPUT type='button' class='bgbutton' value='Buy Now!'
id='addtocart'
name='addtocart'
onkeypress="window.event.cancelBubble=true;"
onclick="<NLADDTOCARTCLICKSCRIPT>">
</td>
</tr>
3. In the Add to Cart Button on Dense Lists field, you can customize the button that customers
click if they want to buy an item. This example creates a button with text “Buy Now!”.
SuiteCommerce Site Builder Guide
Advanced Site Customization
87
<NLADDTOCARTOPTIONS>
<tr align='left'>
<td class='smalltext' width='1%'>
<NLADDTOCARTITEMID><NLADDTOCARTQUANTITY>
</td>
<td>
<INPUT type='button' class='bgbutton' value='Buy Now!'
id='addtocart'
name='addtocart' onkeypress="window.event.cancelBubble=true;"
onclick="<NLADDTOCARTCLICKSCRIPT>">
</td>
</tr>
Sidebars subtab
1. In the Default Portlet Template field, enter the HTML to define the framing around any portlets
displayed on your site that you do not define in step 2 below.
This HTML must start with <td> and end with </td>. For example, you can enter the following:
<td>
<table width="<NLSIDEBARWIDTH>">
<tr>
<td><NLPORTLETTITLE>
</td>
</tr>
<tr><NLPORTLETCONTENTS>
</tr>
</table>
</td>
2. Using the same format as the Default Portlet Template, enter HTML between <td> and </td> tags
for the following portlets:
■ Cart Summary
■ Currency Selector
■ Language Selector
■ Search
■ Search Form
■ Site Navigation
To apply these templates, you must set these portlets to display at Setup > Site Builder > Set Up
Web Site > Appearance.
3. In the Navigation Show Top-level Links field, choose the type of menu you want to display in
your navigation portlet:
■ All Tabs – Shows contents of all tabs
■ Current Tab – Shows contents of the tab being viewed
■ Categories – Shows contents of the category being viewed
To use this preference you must enable the Show Navigation Portlet preference on the Set Up
Web Site page.
The contents in the site navigation list depend on your decision to show items or categories in
the navigation portlet.
SuiteCommerce Site Builder Guide
Advanced Site Customization
88
Note: If you use an older account with legacy navigation, clear legacy settings at Setup >
Site Builder > Set Up Web Site > Legacy.
4. Check the Navigation Show Subcategories box to show subcategories in the navigation menu
portlet.
■ If you select All Tabs as your top level navigation, subcategories under all tabs are shown.
■ If you select Current Tab as your top level, subcategories of the tab being viewed are shown.
■ If you select Categories as your top level, subcategories of the category being viewed are
shown.
5. Check the Navigation Show Items box to show item links in your navigation menu portlet.
You must check the Show Navigation Portlet box on the Set Up Web Site page to use this
preference.
■ If you select All Tabs as the top-level navigation, item links are shown for all tabs.
■ If you select Current Tab as the top level, item links are shown for the items on the tab being
viewed.
■ If you select Categories as the top level, item links are shown for the items in the category
being viewed.
Misc subtab
1. For each of the following, you can enter custom HTML or select an image for the different kinds
of bullets in your website:
■ Bullets – This replaces the bullets next to login links or any bullets that are not part of a
hierarchical list.
■ Item Bullets – This replaces the bullets next to items in the left-column, navigational portlet.
■ Open Category Bullets – This replaces the bullets next to categories that are open and
showing subcategories or items in the left-column, navigational portlet.
■ Closed Category Bullets – This replaces the bullets next to categories that are not open in the
left-column, navigational portlet.
2. In the Separator HTML field, enter the HTML you would like to appear between items in item
lists.
Note: Separator HTML only appears when you are viewing pages with layouts where the
Show Separators Between Items box is checked.
You can override your site theme's appearance (color theme, tab style, portlet style, etc.) based on
appearance settings at Setup > Site Builder > Set Up Web Site.
To further control your site, you can create custom HTML tags. These tags will be replaced based on
your default settings and tag substitution definitions. This lets you customize your page templates to
look different when individual tabs of your site are viewed.
To enter custom tag definitions, go to Setup > Site Builder > Tags > New, enter your custom tags. When
you have finished, click Save.
Item and Category Templates
Web site item/category templates allow you to customize the look and feel of your website pages. Use
HTML to organize the content on the page, and NetSuite website tags to display information from item
records on your site, such as images, sales price, information from custom fields, and more.
SuiteCommerce Site Builder Guide
Advanced Site Customization
89
To create item/category templates you must enable the Advanced Site Customization feature on the
Web Presence subtab at Setup > Company > Enable Features > Web Presence. An administrator must
complete this task.
By default, NetSuite provides a set of basic templates for the following:
■ List cells - Determine how name, description and image are displayed for each category or item in a
list.
■ List pages - Display a list of categories, items, information items, related items, or upsell items.
■ Drilldown pages - Are also known as item detail pages. When visitors to your web store click on an
item name or an information item name, they “drill down” to the detail page where they can see
more information about the item including a list of related items and upsell items.
After you customize or create an item/category template, attach the template to a layout so you can
apply it to tabs, categories or items on your site. For more information, see Applying Templates to Lists
of Categories and Lists of Items.
Next, go to Setup > Site Builder > Site Themes to select a set of templates and layouts to create a
theme for your website. For more information, see Customizing Site Themes.
The topics below provide more information about using Web site templates and layouts on your
website:
■ Read Creating Item/Category Templates to learn how to make your own HTML templates for items
and categories.
■ Use the Sample HTML for Item/Category Templates to help you create a new Item/Category
template for your Web Site.
■ Read Placing Multiple Images in an Item/Category Template to learn how to show multiple images
for items on your site.
Creating Item/Category Templates
You can use item/category templates to customize the look and feel of several types of Web site pages:
■ category lists
■ item lists
■ lists of related items
■ lists of upsell items
■ item detail pages
■ information item detail pages
After you create an item/category template, you can attach it to a category or item list page. For more
information, see Applying Templates to Lists of Categories and Lists of Items. You can also create an
item/category template that shows multiple views of an item on your site. See also, Placing Multiple
Images in an Item/Category Template.
SuiteCommerce Site Builder Guide
Advanced Site Customization
Note: To add graphics and apply style sheets to HTML site theme templates that you create,
you must upload image and CSS files to the Web Site Hosting Files folder.
To create an item/category template:
1. Go to Web Site > Appearance > Item/Category Templates > New.
2. In the Name field, enter a name for this template.
3. (Optional) In the Description field, enter a description for your template.
4. In the Template HTML field, enter HTML within <td> start and end tags to create your item/
category template. The HTML you enter here specifies how content is displayed. Note the
following:
■ Use NetSuite Web Site Tags to display information from fields on item records in the site.
■ Read Sample HTML for Item/Category Templates to help you create your first template.
5. (Optional) In the Addition to <head> field, you can enter any additional HTML you want to
appear in the header of the item page.
6. Click Save.
Note that when you create a template for category list pages, you must include the <NLITEMLIST> tag
in the template HTML so that categories display properly on the page. For more information about
Web Site Tags, see Tags for Use in HTML Pages and Site Templates.
For a list of record types and attributes, see Tags for Use in HTML Pages and Site Templates. For a
complete list of the website tags available for use in item/category templates and hosted HTML pages,
see Web Site Tags.
Applying Templates to Lists of Categories and Lists of Items
After you have created a template for a category or item list, you must apply the template to a layout.
A layout record requires a template for the list, and a template for each list cell. The list cell template
determines how names, descriptions and images are displayed in the list.
SuiteCommerce Site Builder Guide
90
Advanced Site Customization
91
To create a layout for item lists or category lists using an item/category template:
1. Go to Setup > Site Builder > Layouts. Click New.
2. In the Name field, enter a name for the layout. Use a name that identifies whether this template
is for lists of categories or for lists of items, for example Spring Sale Item List Template.
3. Check the Use Templates box.
4. Select the HTML templates you want to attach to this layout.
a.
Select a template in the List Template field.
b.
Select a template in the List Cell Template field.
5. Click Save.
When your layout is complete, you can apply it to your website by selecting it on tab and category
records, in your site theme, or on the Appearances subtab of the Setup Web Site page.
Applying Templates to Item Detail Pages or Information Items
When you use an item/category template on your item detail pages, it is not necessary to create a
layout. Instead, you can select the template for the item detail page on the Set Up Web Site page. As a
result, the template is applied globally to all item detail pages on your website.
SuiteCommerce Site Builder Guide
Advanced Site Customization
Note: You can override the global item drilldown template setting on the Set Up Web Site page
by selecting a different template on an individual item record.
To apply item/category templates to item detail pages or information items:
1. Go to Setup > Site Builder > Set Up Web Site. Click the Appearance subtab.
2. If you use the Multiple Web Sites feature, click Edit next to a website.
3. In the Default Item Drilldown Template field, select the default template for all items or
information items in your site.
If you want to apply a template for an information item, choose your template in the Default
Information Item Drilldown Template field.
4. Click Save.
Sample HTML for Item/Category Templates
Use the HTML code samples provided below to create a set of item/category templates for your
website:
■ Example of a Category List Template
■ Example of an Item List Template
■ Example of a Category in a List
■ Example of an Item in a List
■ Example of an Item Page
■ Example of an Information Item Page
Example of a Category List Template
This example displays the name, description, and image for the category being viewed and lists
its subcategories below. List templates must include the <NLITEMLIST> tag to display the list of
subcategories.
<td width='100%'>
<table width=100%>
<tr>
<td colspan=2 align='center'>
<h1>
<%=getCurrentAttribute('sitecategory','itemid')%>
</h1>
<%=getCurrentAttribute('sitecategory','storedetaileddescription')%>
<br>
<br>
<img src='<%=getCurrentAttribute('sitecategory','storedisplaythumbnail')%>' border=0>
</td>
</tr>
<tr>
<NLITEMLIST>
</tr>
</table>
</td>
SuiteCommerce Site Builder Guide
92
Advanced Site Customization
93
Example of an Item List Template
This example lists the category name before listing the items in the category. List template must
include the <NLITEMLIST> tag to display the list of items in a category.
<td width='100%'>
<table width=100%>
<tr>
<td>
<h1>
<%=getCurrentAttribute('sitecategory','itemid')%>
Items
</h1>
</td>
</tr>
<tr>
<NLITEMLIST>
</tr>
</table>
</td>
Example of a Category in a List
This example is a category cell template for categories in a list. The category name, description, and
image are included in the list, and the name and image act as links to go to the category page.
<td>
<h2>
<a href='<%=getCurrentAttribute('sitecategory','storeURL')%>'>
<%=getCurrentAttribute('sitecategory','itemID')%></a>
</h2>
<%=getCurrentAttribute('sitecategory','storeDetailedDescription')%>
<br><br>
<a href='<%=getCurrentAttribute('sitecategory','storeURL')%>'>
<img src='<%=getCurrentAttribute('sitecategory','storeDisplayThumbnail')%>' border=0></a>
</td>
Example of an Item in a List
This example is an item cell template for items in a list. The item name, stock status, description, price,
weight, image, and related items are displayed along with an Add to Cart button. The item name and
image act as links to the item page.
<td>
<h2>
<a href='<%=getCurrentAttribute('item','storeURL')%>'>
<%=getCurrentAttribute('item','itemID')%>
<%=getCurrentAttribute('item','stockStatusMessageHTML')%></a>
</h2>
<!--%=getCurrentAttribute('item','salesPrice')%><br>-->
Only <%=getCurrentAttribute('item','salesPriceHTML')%>
<br><br>
<table>
SuiteCommerce Site Builder Guide
Advanced Site Customization
94
<%=getCurrentAttribute('item','addToCartListHTML')%>
</table>
<a href='<%=getCurrentAttribute('item','storeURL')%>'>
<%=getCurrentAttribute('item','storeDisplayImageHTML')%></a>
</td>
Example of an Item Page
This example is for an item drilldown page that shows when a visitor clicks the name of an item to view
details. This example includes the item's name, detailed description, price, weight, and full size image
with an Add to Cart button.
<td>
<h2>
<%=getCurrentAttribute('item','itemID')%>
</h2><br>
<%=getCurrentAttribute('item','storeDetailedDescription')%>
<br><br>
<h3>
<!--%=getCurrentAttribute('item','salesPrice')%>
<br>-->
Only <%=getCurrentAttribute('item','salesPriceHTML')%>
</h3>
Weight <%=getCurrentAttribute('item','weight')%>
<br><br>
<%=getCurrentAttribute('item','storeDisplayImageHTML')%>
<table>
<%=getCurrentAttribute('item','addToCartHTML')%>
</table><br>
<table>
<tr>
<%=getCurrentAttribute('item','relatedItemsHTML')%>
</tr>
</table>
</td>
Example of an Information Item Page
This example is for a text and image information item page that shows when a visitor clicks the name
of the information item. This example includes the information item title, brief description, full size
image and detailed description.
<td>
<h2>
<%=getCurrentAttribute('infoitem','itemID')%>
</h2>
<br>
<%=getCurrentAttribute('infoitem','storeDescription')%>
<br>
<%=getCurrentAttribute('infoitem','storeDisplayImageHTML')%>
<br>
<%=getCurrentAttribute('infoitem','storeDetailedDescription')%>
</td>
SuiteCommerce Site Builder Guide
Advanced Site Customization
95
Placing Multiple Images in an Item/Category Template
Web site tags and item/category templates allow you to show the items you sell on your web store
from various angles or in different colors or sizes.
You can publish multiple images for items in one of the following ways:
■ Use multiple <img src> tags to publish images directly from the File Cabinet.
With this approach, it is best to create an item drilldown template specific to each item, as the
images may only be appropriate for a particular item. For details, see Publishing multiple images for
an item using <img src> tags.
■ Use custom item fields to store images on each item record, and then use attribute tags in a site
template to publish multiple images of the item on your site.
With this approach you do not need to maintain a set of templates when you want to change
images for a particular item. The attribute tag you use in the item drilldown template refers to the
custom field. This is so you can attach specific images to item records, but build different templates
for your website that refer to the same custom field. For more information, see Publishing multiple
images for items using custom item fields.
You must have the Advanced Site Customization feature turned on at Setup > Company > Enable
Features > Web Presence to create and edit item templates. An administrator must complete this task.
Publishing multiple images for an item using <img src> tags
1. Click Images to open the Images folder.
Find the image you want to use, or in the footer of the page, click Add File. See Uploading Images
for detailed information on uploading image files to NetSuite.
2. Go to Web Site > Lists > Item/Category TemplatesWeb Site > Site Builder > Item/Category
Templates.
3. Create your template file as instructed in Creating Item/Category Templates.
4. To add images, in your template HTML code, use <img src> tags that refer to the image files in
the NetSuite file cabinet. Use the NetSuite-generated URL for a file in the images folder. To find
the URL for the image file, click Edit next to the file you want to use, and then choose a URL on
the file record. Note the following example of the <img src> tag.
<img src=”/core/media/media.nl?id=2033&c=563214&h=f6a40c57d48a0e61dde7”>
■ To align the image, add the align attribute in the <img src> tag.
■ To add a border to the image, add the border specifications to the tag.
5. Click Save.
6. After you have saved your item/category template, go to Lists > Web Site > ItemsLists > Site
Builder> Items.
a.
Click Edit next to an item record.
b.
Click the Web Store subtab.
c.
Select the item drilldown template you created, in the Item Drilldown Template field.
7. Click Save on the item record.
Publishing multiple images for items using custom item fields
1. Go to Customization > Lists, Records, & Fields > Item Fields > New.
SuiteCommerce Site Builder Guide
Advanced Site Customization
96
2. In the Label field, enter a name for an alternate image field on item records, such as Alternate
View Image.
3. In the ID field, enter a one word or number code that you will use in the tag for this field. For
example, enter altimage. Later, you will use this ID to create an Attribute tag:
<%=getCurrentAttribute('item','altimage')
4. In the Type field, select Image.
5. Check the Store Value box.
6. Check the Show in List box to see data for this field in the Items list.
7. On the Applies To subtab, check the box next to each type of item you want to select additional
images for.
8. On the Display subtab, set preferences for where you want this field to appear on the item
record in NetSuite.
9. Click Save.
10. On each item record, locate your new custom field, and select or upload an alternate image for
the item.
11. After saving each item record with an alternate image, create an Item Drilldown Template. To
display the alternate image, use the tag format below enclosed in the <img src> tag in your
template:
<img src='<%=getCurrentAttribute('item','altimage')%>'>
For more information, see Creating Attribute Tags for Custom Records and Custom Fields. See
also, Creating Item/Category Templates.
12. After you have saved your item/category template, you can do one of the following:
■ Apply it to all items for an individual theme at Setup > Site Builder > Themes.
■ Apply it to all items for a site with any theme at Setup > Site Builder > Set Up Web Site.
■ Apply it to individual items on item records at Web Site > Publishing > ItemsWeb Site > Site
Builder > Items.
Displaying Price Levels and Sale Prices
You can display multiple price levels for items on website pages. This enables you to display both the
original and sale prices for items. When you update price levels in your account, the items in your site
are automatically updated.
Sale prices and other price levels can be added to item pages using item/category templates. Use the <
%=getCurrentAttribute('item','pricelevelx')%> tag to display item prices, where x is replaced with the
ID number for the price level.
For example, because the default ID for the online price is 5, the tag attribute is pricelevel5. The IDs of
alternate sales prices increase by one between the base price and the online price. For the price levels
included in your account, the attributes are as follows:
Price Level
Attribute
Base Price
pricelevel1
Alternate Price 1
pricelevel2
SuiteCommerce Site Builder Guide
Advanced Site Customization
Price Level
Attribute
Alternate Price 2
pricelevel3
Alternate Price 3
pricelevel4
Online Price
pricelevel5
97
If you use custom price levels in addition to the default levels, you can view their respective IDs at
Setup > Accounting > Accounting Lists. Select Price Level in the Type filter at the bottom of the page.
Note: Internal IDs only show in lists when you have the Show Internal IDs box checked at
Home > Set Preferences.
Use the following code sample as a guide for creating an item/category template with both a sale price
and an original price:
<td>
<h2><%=getCurrentAttribute('item','itemid')%>
<%=getCurrentAttribute('item','stockstatusmessagehtml')%>
</h2>
<br><%=getCurrentAttribute('item','storedetaileddescription')%>
<br><br>
Was <s><%=getCurrentAttribute('item','pricelevel1')%></s>!
Now Only <%=getCurrentAttribute('item','pricelevel5')%>
</h3>
<br>
<table><%=getCurrentAttribute('item','addtocarthtml')%>
</table>
<br>
<%=getCurrentAttribute('item','storedisplayimagehtml')%>
</td>
Adding a Style Sheet to Your Site
If you use the Advanced Site Customization and Host HTML Files features, you can use a style sheet
with your website. You must have both features enabled to upload a CSS file.
To use a style sheet with a hosted site:
1. Click the Documents tab.
2. Open the Web Site Hosting Files folder.
3. Open the Live Hosting Files folder, or open the Staging Hosting Files to test your style sheet
before publishing.
4. Open the site folder.
5. Click Add File, and choose your style sheet.
If you host all or part of your site and your hosted files refer to this style sheet, your style sheet is
already applied.
To use a style sheet with a Site Builder website using Advanced Site Customization:
1. Complete the steps above for hosted site.
2. Go to Setup > Site Builder > Themes.
SuiteCommerce Site Builder Guide
Advanced Site Customization
98
3. Click Edit or Customize next to the theme you use for your site.
4. On the General subtab, in the Addition to <head> field, enter a link to your style sheet. Use
a relative URL that includes your NetSuite account number, for example /c.123456/site/
sitestyle.css.
Using Web Site Text Groups
You can use groups to organize the custom text you create for any of the system-generated text that
appears on your website.
For details on creating custom text for your site, see Customizing Website Text.
If you use multiple websites, you can differentiate the branding on each site by customizing the text on
each site. If you operate one website, you can create multiple website text groups to experiment with
different custom text options.
Click Customize next to the Default group to modify the text currently applied to your website.
Click New to start creating custom text. You must first create a new group, by entering a name and
description, and then go back to the Customize Text Group page to customize the text in that group.
The default website text group contains the website text currently applied to your website. When
you create a new group, it inherits any customization that exists in the default group. After you start
working with a new group, click Save to preserve the changes you make.
After you finish creating a new website text group, go to the Web Site Setup page to associate it with a
site.
To create a website text group:
1. Go to Setup > Site Builder > Customize Text > New.
2. Enter a name and description for a new group. The description is optional. If you are creating
custom text groups to support multiple languages on your site, name the text group for the
language into which you want to translate text.
3. Click Save.
4. Click Customize to modify the text group you created in the previous step.
5. Click Save when you are finished.
6. (Optional) Click Edit to modify the name or description of an existing website text group.
7. (Optional) Click View to see a list of sites where the text group is applied
If you have already associated the website text group with a site, the site will be updated with any
customization changes after clicking Save.
To associate a website text group with a site:
1. Go to Setup > Site Builder > Set Up Web Site.
SuiteCommerce Site Builder Guide
Advanced Site Customization
99
2. Click the Appearance subtab.
3. In the Customize Text Group section, select the website text group you want to display on that
site.
4. Click Save.
You can now view your site to see your custom website text group applied.
Customizing Website Text
You can customize the system-generated text that appears in your website. This includes text in error
messages, email messages, and buttons. It also includes headings and fields displayed during the web
store checkout process. Customizing the text on your website lets you communicate more effectively
with your customers.
You can also create different groups of custom text for use on multiple sites. For more information, see
Using Web Site Text Groups.
To customize the text in your website:
1. Go to Setup > Site Builder > Customize Text.
2. If you use the Multi-Language feature, select the language for which you want to customize the
text. An administrator can select multiple languages for your site at Setup > Company > General
Preferences > Languages.
3. The Customize Web Site Text page is divided into subtabs for each block of text that appears in
your website.
■ Email – Customize the email messages sent to shoppers on your website. For more
information, see Customizing Web Store Email Messages.
For specific information about fulfillment confirmation email messages, see the help topic
Order Fulfillment Confirmation Email.
■ Error Messages – Customize error messages displayed on your web store. For example, you
can change the error message displayed when a customer enters an invalid coupon or gift
certificate code.
■ Headings – Change the headings on pages in the checkout process.
■ List Options – Customize the default option on select lists. This affects items on your web
store with list options such as matrix items.
For example, when a shopper selects a color or size for a product, you can change the
NetSuite default list option from “Select” to “Choose One.”
■ Alerts – Customize alerts displayed in the web store. For example, you can customize the
alert that is displayed when a shopper selects a product in a color that is out of stock.
■ Buttons – Change the text on buttons in the web store. For example, you can customize the
label on each of the buttons on the shopping cart page.
■ Field Labels – Customize the labels for entry fields on your web store. For example, you can
change the “Address 1” field label on the Address page in the web store, to “Street Address.”
4. Click on a subtab to choose a type of website text to customize.
The Default Text column displays the HTML source code for each block of text that appears in
the web store. The blank fields in the Customization column are for your customized changes to
the existing HTML. The Description column provides more information about each field.
5. Copy the HTML in the Default Text column, make your changes, and then paste your customized
HTML in the Customization column.
SuiteCommerce Site Builder Guide
Advanced Site Customization
100
6. Click Save.
To view your updated site after you save your changes, go to Setup > Site Builder > Preview Web Site.
Customizing Web Store Email Messages
To customize email messages sent from your web store, you have the following options:
■ Use the Customize Web Site Text page.
■ Create email templates you can associate with multiple email notification types and websites.
For more information about web store email templates, see the help topic Templates for Web Store
Email Messages.
For information about setting preferences for email messages, such as BCC email message settings,
and selecting email templates, see the help topic Order Emails.
For specific information about non-web order fulfillment confirmation messages, see the help topic
Order Fulfillment Confirmation Email.
Use the Email subtab on the Customize Web Site Text page to customize the email message that is sent
at each stage of order processing, as well as when a customer, purchases a gift certificate, or places
an order for a download item. After you save your changes on this page, you can set additional email
preferences on the Web Site Setup page. For more information, see the help topic Web Site Email
Preferences.
To customize email messages generated from web store orders:
1. Go to Setup > Site Builder > Customize Web Site Text.
2. Click Customize next to the website text group you want to modify.
3. Click the Email subtab.
The Default Text column displays the HTML source code for each type of email message. The
blank fields in the Customization column are for your customized changes to the existing HTML.
The Description column describes the variables in each type of email message.
SuiteCommerce Site Builder Guide
Advanced Site Customization
101
4. Copy the HTML in the Default Text column, make your changes, and then paste your customized
HTML in the Customization column.
5. Click Save when you are finished.
You can customize text for one email message, or several. Go to the Web Site Setup page to set
preferences for sending email messages. For more information, see the help topic Web Site Email
Preferences.
Attribute Tags for use in Email Messages
You can use NetSuite's attribute tags to include information from sales orders in email messages sent
to your customers. Use the following structure for your tag:
<%=getCurrentAttribute("salesorder","field")%>
Replace the word field with a Field Internal ID from the list in the table below. For example, include the
estimated ship date of the order in the email message by using the following attribute tag:
<%=getCurrentAttribute("salesorder","shipdate")%>
The same structure works for both the fulfillment email and the order received email. The fields
exposed by attribute tags come from the original sales order form associated with the transaction.
The table below lists common fields available for use with attribute tags.
Field Internal ID
Field UI Label
actualshipdate
Actual Ship Date
balance
Balance
billaddress
Bill To
entity
Entity
giftcert
Gift Certificate
orderstatus
Order Status
otherrefnum
P.O. number
paymentmethod
Pymt. Method
paypaltranid
PayPal Tran. ID
salesrep
Sales Rep
shipaddress
Ship To
shipdate
Estimated Ship Date
shipmethod
Shipping Method
shippingcost
Shipping Cost
subsidiary
Subsidiary
taxrate
Tax Rate
taxtotal
Tax Total
terms
Terms
SuiteCommerce Site Builder Guide
Advanced Site Customization
Field Internal ID
Field UI Label
total
Total
trandate
Date
tranid
Doc. No.
102
Website URL Parameters
This section describes the parameters exposed on your web store URLs and describes how web store
managers and website designers can use these parameters to display specific pages in a NetSuite web
store.
The following topics are discussed in this section:
■ URL Parameters for Displaying Shopping Pages – Describes how to display search results as well as
specific tab, category, and item pages, on your web store.
■ URL Parameters for Adding Items to the Cart – Includes information about how to construct a URL
for adding items to the shopping cart in a OneWorld account.
■ URL Parameters for Passing Marketing Information - Describes how to construct URLs for tracking
partners and for use in marketing your web store.
■ URL Parameters for Setting Values in Your OneWorld Web Store - Describes URL parameters for use
with a OneWorld web store.
■ URL Parameters for Setting the Currency on your Website - Identifies the URL parameters you can
use to set the currency for prices displayed on a page of your web store.
Anatomy of a Website Shopping URL
Before you can start working with URL parameters, it is important to understand how NetSuite web
store URLs are formed. Whether you use NetSuite's shopping domain (shopping.netsuite.com) or your
own domain, understanding how to add parameters to your website URLs gives you more options for
customization. For more information about domains, see the help topic Domain Names.
Forming the Base Domain of a URL
The base domain of a NetSuite web store consists of the following variables: the domain for your
website, your NetSuite account number (if you use the NetSuite shopping domain), and variables
indicating which website page to display, such as internal IDs for item and category records.
Note: The NetSuite shopping domain used to construct the base domain for your site varies
according to the host data center for your NetSuite account. You can always find the shopping
domain for your site on the Set Up Domains page or on the Domains subtab on the Web Site
Setup page. For more information on data centers, see Understanding Multiple Data Centers.
You may notice that NetSuite shopping URLs appear in two different formats:
■ http://shopping.netsuite.com/s.nl/c.123456/id.12/.f?category=123
■ http://shopping.netsuite.com/s.nl?c=123456&id=12&category=123
SuiteCommerce Site Builder Guide
Website URL Parameters
103
The first format above is more favorable for search engine optimization (SEO). However, when you
are constructing a URL for a process, such as adding an item to the shopping cart, both formats work
equally well. Note that custom domains also appear in both formats:
■ http://www.wolfeelectronics.com/s.nl/id.12/.f?category=123
■ http://www.wolfeelectronics.com/s.nl?id=12&category=123
Important: If you use your own custom domain, you should never use the NetSuite
shopping domain to construct URL parameters for your website.
Alternating between the NetSuite shopping domain (shopping.netsuite.com), and your own custom
domain (www.mysite.com) can cause cookie and session information to get lost as visitors click through
the pages of your site.
Required Web Site URL Parameters
If you use the NetSuite shopping domain, the c parameter is required to identify your NetSuite account.
If you use the Multiple Web Sites feature, the n parameter, which identifies the internal ID for the site,
is also required. For example, the URL below points to a tab on site 3 (n.3) in NetSuite account number
123456.
http://shopping.netsuite.com/s.nl/c.123456/n.3/sc.13/.f
If you use custom domains for your web stores, however, the c and n parameters are not required
because your custom domain is mapped to the correct NetSuite account and website at the database
level. The URL below uses a custom domain to show the same page as the URL above.
http://www.wolfeelectronics.com/s.nl/sc.13/.f
All website URLs from your NetSuite account use /s.nl/ in the path to indicate an e-commerce page
request. Note that URLs which contain /.f? before additional parameters are more favorable for SEO.
Adding Parameters to a URL
In addition to identifying the domain and the website page, the URL includes parameters which can be
used in a query string.
By adding a query string to the URL of a NetSuite web page, you can display specific information on the
page. A query string contains name and value pairs, with the name and value in each pair separated by
an equal sign (=).
For example, when a shopper clicks on one of the URLs below, he or she is taken to a web store tab
presenting a list of results for the search term, “electronics.” Note that the first example uses the
NetSuite shopping domain and identifies the NetSuite account number (c.123456).
■ http://shopping.netsuite.com/s.nl/c.123456/sc.2/.f?search=electronics
■ http://www.wolfeelectronics.com/s.nl/sc.2/.f?search=electronics
The tab's internal ID is defined in the sc parameter. You can find the internal ID for any record in
NetSuite in the address bar of your browser when you navigate to that record. For more information,
see How do I find a record's internal ID?
Note that the first parameter (in this case “search=electronics”) is always preceded by a question mark
(?), and any subsequent parameters are preceded by ampersands (&). The URLs below display items 1
through 5 in a list of 10 search results for “electronics.”
SuiteCommerce Site Builder Guide
Website URL Parameters
104
■ http://shopping.netsuite.com/s.nl/c.123456/sc.2/.f?search=electronics&range=1,5,10
■ http://www.wolfeelectronics.com/s.nl/sc.2/.f?search=electronics&range=1,5,10
URL Parameters for Displaying Shopping Pages
The following parameters are supported on URL, /s.nl. All the parameters listed below can display on
web store, cart and checkout pages.
For more information about constructing a URL, see Required Web Site URL Parameters. Note that the
internal ID for any record in NetSuite displays in the address bar of your browser when you navigate to
that record. How do I find a record's internal ID?
URL Parameter
Notes
c
Required to identify the NetSuite account (c.123456). Not required if you use
a custom domain.
http://shopping.netsuite.com/s.nl/c.123456/n.3/sc.13/.f
n
Required to identify the site (n.3) when you use the Multiple Web Sites
feature. Not required if you use a custom domain or if you do not use the
Multiple Web Sites feature.
http://shopping.netsuite.com/s.nl/c.123456/n.3/sc.13/.f
sc
Identifies the tab (sc.42) on a tab page; sc stands for section.
On a category or item detail page, this parameter identifies the selected
tab. It also provides location context so the correct tab and category are
highlighted in the site navigation portlet. For example:
■ http://shopping.netsuite.com/s.nl/c.123456/n.3 /sc.42/.f
■ http://www.wolfeelectronics.com/s.nl /sc.42/.f
category
Identifies the category (category.13) on a category page. On an item
detail page, this parameter identifies the category context of the selected
item. It also provides location context so the correct tab and category are
highlighted in the site navigation portlet. For example:
■ http://shopping.netsuite.com/s.nl/c.123456/n.3/sc.17 /category.13/.f
■ http://www.wolfeelectronics.com/s.nl/sc.17 /category.13/.f
id
Identifies the item (id.100) on an item detail page. For example:
■ http://shopping.netsuite.com/s.nl/c.123456/n.3/it.A /id.100 /.f?
sc=17&category=13
■ http://www.wolfeelectronics.com/s.nl/it.A /id.100 /.f?sc=17&category=13
it
Identifies the item type (it.I).
On an item detail page, this parameter distinguishes between sales items
(A), and information items (I). Note that this parameter is optional for sales
items, but required for information items. For example:
■ http://shopping.netsuite.com/s.nl/c.123456/n.3 /it.I/ id.208/.f?
sc=17&category=15
■ http://www.wolfeelectronics.com/s.nl /it.I/ id.208/.f?sc=17&category=15
search
This parameter makes any page in the web store a search results page. It
displays the search entry field on a web store page, with the search results
for that page displayed below it. For example:
These URLs display a page with results for the search term, “electronics”:
SuiteCommerce Site Builder Guide
Website URL Parameters
URL Parameter
105
Notes
■ http://shopping.netsuite.com/s.nl/c.123456/sc.2/.f ?search=electronics
■ http://www.wolfeelectronics.com/s.nl/sc.2/.f ?search=electronics
ext
For use only with External Catalog (WSDK) sites to add NetSuite e-commerce
functionality.
When this parameter is set true, the page is displayed without any item or
category tabs. Only the cart, checkout and customer center tabs appear if
they are set to display in the Web site.
This example displays the shopping cart page for an external catalog site
(ext=T):
http://www.wolfeelectronics.com/s.nl?sc=2&ext=T
continue
When used with the sc parameter identifying the cart tab, this parameter
allows customization of the Continue Shopping button to go to the specified
URL.
In this example, the continue parameter sends the shopper to a specific Web
Store page when they click the Continue Shopping button:
■ http://shopping.netsuite.com/s.nl?c.123456&sc=3 &continue=http://
shopping.netsuite.com/s.nl/c.123456/n.3/sc.12/.f
■ http://www.wolfeelectronics.com/s.nl?sc=3 &continue=http://
www.wolfeelectronics.com/s.nl/sc.12/.f
range=from,to,of
Displays a set of items: from item x, to item y, of n number of pages. The
from and to values start at 1 for the first item (as opposed to 0).
No more than 50 items can be displayed on a page. The to parameter is
ignored if the range includes more than 50 items.
This URL displays the last three items in a list of thirteen items which spans
two pages:
■ http://shopping.netsuite.com/s.nl/c.123456/n.3/sc.12/category.2
/.f?range=11,13,13
■ http://www.wolfeelectronics.com/s.nl/sc.12/category.2/.f?
range=11,13,13
logoff
Only for use on the checkout domain. When you add logoff=T to the URL,
this parameter logs off the current shopper.
login
Only for use on the checkout domain. When you add login=T to the URL, this
parameter makes the current page a log in page.
newcust
Only for use on the checkout domain. When you add newcust=T to the URL
this parameter displays the registration page with mandatory password
fields.
redirect
Redirects to a URL after a process has completed. This parameter is
observed by backend requests such as additemtocart.nl.
URL Parameters for Adding Items to the Cart
NetSuite supports two different URLs for adding items to the shopping cart:
■ /app/site/backend/additemtocart.nl – Use this URL to create add to cart buttons for items in an
external catalog site or in a website made of hosted HTML pages.
■ /app/site/backend/intl/additemtocart.nl – Use this URL in a web store associated with a OneWorld
account. Create add to cart buttons that set multiple parameters to be processed in one request,
like subsidiary and currency, for example.
SuiteCommerce Site Builder Guide
Website URL Parameters
All the parameters listed in the tables below are used in either the POST or GET action that adds an
item to the shopping cart.
For example, you can use the multi parameter to create a URL for distribution to customers in a
promotional email. This URL will add multiple items to the shopping cart when a customer clicks the
link to visit your web store.
For information about adding multiple items to the shopping cart, see Adding Multiple Items to the
Shopping Cart.
/app/site/backend/additemtocart.nl
Use the parameters below to create add to cart buttons for items in an external catalog site or in a
website made of hosted HTML pages.
URL Parameter
Notes
buyid
Passes the internal ID for the item which is added to the cart.
qty
Passes the quantity of the item to add to cart.
amount
Only functions with donation items. This parameter sets the price for the
item added to the cart.
category
This parameter is required for tracking customer activity on your website.
However, it is not required for successfully adding an item to the shopping
cart.
multi<id,qty;...>
Adds multiple items to the cart in one request. This parameter does not
support item options. For more information, see Adding Multiple Items to
the Shopping Cart
redirect
Use the redirect parameter to take shoppers to a page on your website
after they add an item to the cart. This parameter is used to determine the
proper page to display after an item is added to the cart.
Note: Only functions when the After Shopper Adds an Item
to the Cart preference is set to stay on the same page. Set this
preference at Setup > Site Builder > Set Up Web Site, on the
Shopping subtab.
continue=<url>
Sets the URL for the Continue Shopping button in an External Catalog Web
site. For more information, see Setting Up an External Catalog Site.
showcart
When you add showcart=T to the URL, this parameter displays the cart
after items are added to the shopping cart.
/app/site/backend/intl/additemtocart.nl
You can use this URL with the same parameters as the additemtocart URL above, except that you can
use /app/site/backend/intl/additemtocart.nl to set parameters for subsidiary, currency, and language.
URL Parameters
Notes
selcurrency
Use the internal ID of the currency you want to set.
selsubsidiary
Use the internal ID of the subsidiary you want to set.
selshopperlanguage
Use this parameter to pass a locale key. For example: en_US,
en_UK, or fr_FR.
SuiteCommerce Site Builder Guide
106
Website URL Parameters
URL Parameters
107
Notes
Note: locale keys are not exposed in the NetSuite
system. You may need to research which language code is
appropriate.
Note: If your selected Out Of Stock Behavior option is Disallow back orders but display out-
of-stock message or Remove out-of-stock items from store, you might still be able to add out
of stock items to your cart using these URL parameters. However, when you try to place the
order with such out of stock items in your shopping cart, an error message is displayed and you
will not be able to place the order successfully.
Adding Multiple Items to the Shopping Cart
You can add more than one item to the shopping cart in one request. First set the value of the buyid
attribute to “multi.” Next, add the item IDs, and item quantities as values for the multi attribute.
Adding Multiple Items to the Cart with a URL
The sample URL below from account number 123456, adds one item (ID=51) with size and color
options; and one of another item (ID=52) with different size and color options.
/app/site/backend/additemtocart.nl?c=123456&buyid=multi&multi=51,1,custcolsize|1||
custcolcolor|1;52,2,custcolsize|2||custcolcolor|2
You can use item ID and quantity, or item ID, quantity and options in a URL that adds multiple items to
the shopping cart. Note the example of item options specified in the URL:
custcolsize|1||custcolcolor|1;
Note: The vertical bar (|) separates option ID (custcolsize) from option value (1). The double
vertical bar (||) separates option ID/value pairs from one another.
Adding Multiple Items to the Cart Using HTML
When you operate an external catalog site, use HTML to add multiple items to the shopping cart. The
sample code below adds one each of item IDs 206, 207, 205 and 208 to the shopping cart.
Sample code snippet for adding multiple items to the shopping cart:
<!-- START ITEM TEMPLATE -->
<td>
<!-- START MULTI ITEM ADD CODE -->
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<form method='post' action='http://www.wolfeelctronics.com/app/site/backend/additemtocart.nl'>
<tr>
<td>
<p align="left"><input class='bgbutton' type="submit" value="Enter Store"></p>
<input type='hidden' name='c' value='123456'>
<input type=hidden name='qtyadd' id='qtyadd' value='1'>
<input type=hidden name='buyid' id='buyid' value='multi'>
SuiteCommerce Site Builder Guide
Website URL Parameters
108
<input type=hidden name='multi' id='multi' value='206,1;207,1;205,1;208,1'>
</td>
</tr>
</table>
</form>
<!-- END MULTI ITEM ADD CODE -->
</td>
<!-- END ITEM TEMPLATE -->
Note: The code sample above also functions with the NetSuite shopping domain. Replace
the URL in the <form> tag. For example: <form method='post' action='http://
shopping.netsuite.com/app/site/backend/additemtocart.nl'>
URL Parameters for Passing Marketing Information
The parameters listed below are useful for marketing your web store. You can provide discount codes
for your customers, and track campaigns. You can also track partners who refer shoppers to your site.
For more information about constructing a URL, see Required Web Site URL Parameters.
URL Parameter
Notes
c
Identifies the NetSuite account (c.123456). Not required if you use a custom
domain.
http://shopping.netsuite.com/s.nl/c.123456/n.3/sc.13/.f
n
Identifies the site when you use the Multiple Web Sites feature. Not required
only if you use a custom domain.
http://shopping.netsuite.com/s.nl/c.123456/n.3/sc.13/.f
leadsource
Passes campaign information to your web store.
You can create a campaign that drives shoppers to your web store with the
leadsource parameter in the URL. This way, you can capture the campaign ID on
the lead record created when a shopper registers on your web store and track
the success of the campaign.
These are examples of campaign URLs entered in NetSuite:
■ http://shopping.netsuite.com/s.nl?c=123456&leadsource=great_sale
■ http://www.wolfeelctronics.com ?leadsource=great_sale
promocode
Use any valid coupon code with this URL parameter.
This parameter passes the discount item associated with a promotion code
into the session and keeps it there until the shopper arrives on the last page of
checkout.
Use this parameter, to drive shoppers to your web store with a URL that
provides them with a discount at checkout.
The URLs below include the promocode parameter:
■ http://shopping.netsuite.com/s.nl?c=123456 &promocode=discount
■ http://www.wolfeelectronics.com ?promocode=discount
partner
Passes the ID of the referring partner. If the partner field is exposed on your
Sales Order form, this partner is saved on the transaction and on the customer
record created from that transaction.
Both URLs below track partner information:
■ http://shopping.netsuite.com/s.nl?c=123456 &partner=slconsulting
SuiteCommerce Site Builder Guide
Website URL Parameters
URL Parameter
109
Notes
■ http://www.wolfeelectronics.com ?partner=slconsulting
You can also use the partner parameter with the Partner Code instead of the
Name. It lets you keep the partner relationship transparent to the web store
visitor.
URL Parameters for Setting Values in Your OneWorld Web
Store
The table below displays the URL parameters you can use to set values in your OneWorld web store.
These parameters are only used by backend processes, they are not exposed in the user interface. If
you use hosted pages in your website, or if you have an external catalog site (WSDK), these parameters
can be useful for customization.
Note that the URLs listed below require a value for the c parameter (your NetSuite account number)
and the n parameter (the internal ID for the site if you use the Multiple Web Sites feature). If you use a
custom domain, then omit the c and n parameters.
For more information about constructing a URL, see Required Web Site URL Parameters.
URL
URL Parameter
Notes
/app/site/backend/
setshoppercurrency.nl
selcurrency
Sets the currency for the shopper's
session. Pass the ID of the currency.
/app/site/backend/
setshopperlanguagelocale.nl
setshopperlanguage
Sets the language displayed on the site
for the current shopper's session. Use this
parameter to pass language codes. For
example: en_US, en_UK, or fr_FR.
Note: the language codes are not exposed
in the NetSuite system. You may need
to research which language code is
appropriate.
/app/site/backend/
setshoppersubsid.nl
selsubsidiary
Sets the subsidiary displayed in the
website for the current shopper's session.
The subsidiary must appear in the list of
regions displayed on your web store in
Setup> Setup Web Site.
/app/site/backend/intl/
setshopperregioninfo.nl
c
n
selsubsidiary
selcurrency
selshopperlanguage
This URL supports multiple parameters
including the standard c and n
parameters for account and site. Use this
backend URL to send multiple requests to
be processed at one time.
■ Selsubsidiary - Use the internal ID of
the subsidiary you want to set.
■ Selcurrency - Use the internal ID of the
currency you want to set.
■ Selshopperlanguage - Use this
parameter to pass a locale key. For
example: en_US, en_UK, or fr_FR.
Note: locale keys are not exposed in
the NetSuite system. You may need
SuiteCommerce Site Builder Guide
Website URL Parameters
URL
URL Parameter
110
Notes
to research which language code is
appropriate.
URL Parameters for Setting the Currency on your Website
To set the currency for prices displayed on a page of your web store, make sure you are using the
Multiple Currencies feature, and that you have created a set of currency records in your account. The
figure below shows a list of currency records.
For more information, see Setting Up Multiple Currencies.
Choose the parameter you want to work with, either currencykey or currency. Both parameters give the
same results.
■ Use currencykey in the URL, and then pass the internal ID of the currency record.
■ Use currency in the URL, and then pass the value from the Symbol column of the currency list.
For example, both URLs below display prices in Euros:
■ http://www.wolfeelectronics.com/Product-Catalog/Flat-ScreenTVs? currencykey=4
■ http://www.wolfeelectronics.com/Product-Catalog/Flat-ScreenTVs? currency=EUR
SuiteCommerce Site Builder Guide
Web Site Tags
111
Web Site Tags
In addition to entering your own custom HTML for items, categories, tabs, and item/category and site
theme templates you can also use various types of NetSuite tags to customize your website. Web site
tags allow you to apply an advanced level of customization to your website.
You can use attribute tags in most description fields, but to work with other types of Web Site Tags, you
must use the Advanced Site Customization feature. You should have experience working with HTML
code to use Web Site Tags most effectively.
Important: Web Site tags are not supported in SuiteCommerce Advanced websites.
Read the topics below for more information about each type of site tag:
■ Use Attribute tags to show information extracted from item, category, tab, customer, and custom
records on your website. For more information, see Creating Attribute Tags.
■ Use the declareAttribute tag when you use an attribute tag in a field, and you use a site template to
display that field on your website. For more information, see Declare Attribute Tags for Tags Within
Tags.
■ Define your own tags for use in customizing item/category templates and site themes. For more
information, see Defining Custom Web Site Tags.
■ Use NetSuite's server-side Include tag to reuse sections of HTML code from files you host in the
NetSuite file cabinet. For more information, see Using the Server-Side Include Tag.
■ View a list of NetSuite tags for use in the HTML pages you host in NetSuite, and in the site themes
you create. For more information, see Tags for Use in HTML Pages and Site Templates.
■ View a list of NetSuite tags for use in email templates for messages sent from your web store. For
more information, see the help topic Tags Available for Web Store Email Templates.
Creating Attribute Tags
Use Attribute tags to display information from item, information item, category, and customer records
in site themes, item/category templates, and hosted HTML pages.
For example, you might use Attribute tags to display an image in the store detailed description field of
your NetSuite generated site, or to capture information retrieved from browser requests, or to display
an item from your NetSuite account on a hosted HTML page.
Attribute tags are supported in HTML files hosted in your NetSuite file cabinet, item/category
templates, site themes, and email messages generated from orders. To customize email messages go
to Setup > Site Builder > Customize Text.
Important: Web Site tags are not supported in SuiteCommerce Advanced websites.
Use the table below, in Using recordType in Attribute Tags, to find reference information for creating
Attribute tags.
■ For sample code, and links to other topics on creating Themes and Item/Category Templates, read
Using Attribute Tags in Site Templates.
■ For sample code you can use to display items from your NetSuite account on hosted HTML pages,
read Using Web Site Tags in Hosted Files.
SuiteCommerce Site Builder Guide
Creating Attribute Tags
112
■ To learn how to create Attribute tags for custom records and custom fields, read Creating Attribute
Tags for Custom Records and Custom Fields.
■ To learn how to create Attribute tags for standard NetSuite records, read Creating Attribute Tags for
Standard Records.
Note that you can use Attribute tags in most description fields on standard NetSuite records, however,
to use website themes, customize item/category templates, and use Attribute tags in hosted HTML
pages, you must enable the Advanced Site Customization feature.
Using recordType in Attribute Tags
To create an Attribute tag, use the tag component for recordType and an attribute for the information
you want to display from the record. For example:
<%=getCurrentAttribute('item','storedisplayname')%>
To learn more about the syntax for creating attribute tags read the following topics:
■ Creating Attribute Tags for Custom Records and Custom Fields
■ Creating Attribute Tags for Standard Records
The table below provides a guide to finding more information about which fields on NetSuite records
are available for use in Attribute tags and how to construct them.
Record Type
Tag Component for
recordType
Notes
Item
item
For more information, see Item Attributes.
Information Items
infoitem
Only Text and Image or Formatted Text
records are available for use in Attribute tags.
For more information see, Information Item
Attributes.
Category
sitecategory
For more information, see Category Attributes
Color Theme
colortheme
Tags with the colortheme component
return colors for the current color theme in
#RRGGBB form.
For more information, see Color Theme
Attributes.
Customer
customer
For more information, see Customer
Attributes.
Custom record
record ID
For more information see Creating Attribute
Tags for Custom Records and Custom Fields.
Order Email
Messages
salesorder
For more information, read the topic,
Attribute Tags for use in Email Messages.
site
Used for site-wide properties, such as
capturing referrer information from visitors
on your site.
For more information, see Site Attributes
request
Used for returning information about the
session to include in any custom JavaScript.
SuiteCommerce Site Builder Guide
Creating Attribute Tags
Record Type
Tag Component for
recordType
113
Notes
For more information, see Request Attributes.
checkout
Used in the Order Script Tracking HTML field
at Setup > Site Builder > Set Up Web Site on
the Analytics subtab.
Checkout Attributes capture data related to
the order amount, shipping, and tax.
Thank You page
confirmation
Used to capture data from orders placed on
your website, and to send this data to thirdparty reporting tools.
For more information, see Order
Confirmation Attributes.
Using Attribute Tags in Site Templates
You can use Attribute tags for customizing HTML templates for use on your website. This lets
you control the look and feel of your site. You decide where to display images and how to display
information from NetSuite records on your website. Note that Web Site Tags are not supported in
SuiteCommerce Advanced.
For more information about options for customizing your website with Attribute tags, see Customizing
Site Themes and Item and Category Templates.
The code sample below is from an item/category template for the related items list.
<TABLE border=0 cellspacing=0 cellpadding=0 width="100%">
<TR>
<TD class="txt11-grey" valign="top"><b><%=getCurrentAttribute('item', 'relatedItemsDescri
ption')%></b></TD>
</TR>
<TR>
<TD class="lnk13b-blackOff" valign="top"><a href="<%=getCurrentAttribute('item','storeurl
')%>" class='lnk13b-blackOff'; onMouseover="this.className='lnk13b-blackOn'; return true;" onMo
useout="this.className='lnk13b-blackOff'; return true;"><%=getCurrentAttribute('item','storedis
playname2')%></a></TD>
</TR>
<TR>
<TD class="txt11-grey" valign="top"><STRONG><%=getCurrentAttribute('item','stockstatusmes
sagehtml')%></STRONG></TD>
</TR>
<TR>
<TD class="txt11-grey" valign="top"><%=getCurrentAttribute('item','storedescription2')%><
/TD>
</TR>
<TR>
<TD><IMG src="images/common/spacer.gif" width=1 height=5></TD>
</TR>
<TR><TD bgcolor="#CCCCCC"><IMG src="images/common/spacer.gif" width=1 height=1></TD>
</TR>
<TR><TD><IMG src="images/common/spacer.gif" width=1 height=5></TD></TR>
</TABLE>
SuiteCommerce Site Builder Guide
Creating Attribute Tags
114
Using Web Site Tags in Hosted Files
You can use NetSuite's Web Site Tags to build custom pages for your site that have a similar look and
feel to other non-custom areas of your site. You can also display information from item and customer
records in your NetSuite account on your website. Note that Web Site Tags are not supported in
SuiteCommerce Advanced.
Use the following format to insert information from a record in your account:
<%=getAttribute('recordtype',id,'attribute')%>
For example, you can use the code sample below to display an item in your HTML website. Note that
the internal ID for the item record must be referenced in the Attribute tag:
<h2><%=getAttribute('item',10,'itemid')%><%=getAttribute('item',10,'stockstatusmessagehtml')%><
/h2>
<br><br><%=getAttribute('item',10,'storedetaileddescription')%>
<br><br>
Only<%=getAttribute('item',10,'salespricehtml')%>
<br><br><br>
<table>
<td><%=getAttribute('item',10,'addtocarthtml')%></td>
<td><%=getAttribute('item',10,'storedisplayimagehtml')%></td>
</table>
The internal ID is found in the URL of the record page in your account. For more information, see How
do I find a record's internal ID?
See Tags for Use in HTML Pages and Site Templates to view a chart including the record types attributes
you can use.
Important: Web site tags are not substituted in hosted files greater than 2 MB in size.
Creating Attribute Tags for Custom Records and Custom
Fields
You can display information from custom records and custom fields on your website by using attribute
tags in item/category templates and in the HTML you write for your site themes in Site Builder.
Creating Attribute Tags for Custom Fields
Display information from custom fields on item and customer records by using the custom field ID as
the attribute.
For example, to include information from an item custom field with ID custitem1, you can use the
following attribute tag:
<%=getCurrentAttribute('item','custitem1')%>
You can find the ID for a field in the following places:
■ attribute – Go to . Click the name of the record type. The attribute is listed on the Fields subtab, in
the ID column.
■ Custom fields on customer records – Go to .
SuiteCommerce Site Builder Guide
Creating Attribute Tags
115
Creating RecordAttribute Tags for Custom Records
Display information from custom fields on custom records using the custom record type ID, the ID for
the custom record, and the custom field on the record as the attribute.
To display information from a custom record, use the following syntax for the tag:
<%=getRecordAttribute('recordTypeID',id,'attribute')%>
■ recordTypeID – Open a custom record of the type you want to use. On the Custom record Type
page, note the value for Internal ID. The number referenced here is the recordTypeID for all custom
records of this type.
■ id – Open the list of records for the custom record type you want to use. The ID for each unique
record is listed in the ID Column.
■ attribute – Go to . Click the name of the record type. The attribute is listed on the Fields subtab, in
the ID column.
Creating Attribute Tags for Standard Records
Attribute tags are typically made up of two components — record type and attribute.
The attribute can be any information available on a NetSuite record or a field on a record that
contains the information. For a list of record types and their corresponding tag components, see Using
recordType in Attribute Tags.
Sample Attribute Tags
Attribute tags are commonly used for displaying the default value in a field on a certain record type,
such as item records or customer records. You can also display a value in a field on a specific record,
or specify the information for display. Use the information below to create attribute tags for your own
website.
■ Displaying the Default Value from a Field on a Record
■ Displaying Information from a Specific Record
■ Specifying Information for Display
Displaying the Default Value from a Field on a Record
You can use an attribute tag to display information from the current applicable record. This can be
can be an item being viewed in the web store, or data from the customer record assigned to the same
customer currently logged in. Note the following syntax:
<%=getCurrentAttribute('recordType','attribute','defaultValue')%>
■ The following tag shows the store display name of the item being viewed in the site:
<%=getCurrentAttribute('item','storedisplayname')%>
■ The following tag displays the name of the customer currently logged in:
<%=getCurrentAttribute('customer','entityID','Guest')%>
SuiteCommerce Site Builder Guide
Creating Attribute Tags
116
Note: Customers must be logged in to display personalized information. NetSuite
recommends using default values for all customer tags.
Displaying Information from a Specific Record
Use an internal ID in the tag to refer to a specific record of any type that supports current attribute
tags. In this way, you can display values from fields on specific records regardless of the page being
viewed on the website. Note the following syntax:
<%=getAttribute('recordType',id,'attribute')%>
The internal ID is found in the URL of the record page in your account. For more information, see How
do I find a record's internal ID?
For example, to display the value in the Store Display Name field on item ID 7, use this attribute tag:
<%=getAttribute('item',7,'storedisplayname')%>
Specifying Information for Display
You can use an additional parameter, nlignorefamily, in an Attribute tag to omit data from the record
“family.” The nlignorefamily flag ignores data from record types other than the record type specified in
the tag. For example, when you are working with customer records, you can exclude data from other
entity records that may be related, such as partner records.
In the following sample attribute tag, an empty string is returned if a particular customer record does
not exist. When the nlignorefamily flag is not present, a partner email, or an email from some related
entity record is rendered.
<%=getCurrentAttribute('customer','email', '', 'nlignorefamily')%>
Note that you can change the third parameter in the sample, from an empty string to any string you
want to display when a customer record does not exist.
You can use the nlescapehtml parameter to specify that you want a response formatted for HTML. For
example:
<%=getCurrentAttribute('request','querystring','','nlescapehtml')%>
Note: When using request attributes in you r attribute tags, also use nlescapehtml to avoid
cross-site scripting vulnerabilities.
Records that Support Attribute Tags
Use the links below to see a complete list of attributes for each record type:
■ Item Attributes
■ Information Item Attributes
■ Color Theme Attributes
■ Category Attributes
■ Customer Attributes
■ Site Attributes
■ Request Attributes
SuiteCommerce Site Builder Guide
Creating Attribute Tags
117
■ Checkout Attributes
■ Order Confirmation Attributes
Item Attributes
The following table includes the eligible fields for the item record type and the corresponding attribute
to use in your tag. Attributes are not case-sensitive. For example, use the attribute tag below, to show a
list of upsell items on your site.
<%=getCurrentAttribute('item','correlateditemshtml')%>
Field Name
Attribute
Notes
Available To Adv.
Partners
availabletopartners
Canonical URL
canonicalurl
Class
class
Correlated Items
correlateditemshtml
Returns the list of automated upsell items.
Department
department
Detailed Description
storedetaileddescription
Display in Site
isonline
Display Name/Code
displayname
Drop Ship Item
isdropshipitem
Featured Description
featureddescription
Featured Item
isfeatured
See also Information Item Attributes.
Note: This attribute is different
from the Featured Item attribute for
information items.
Featured Item (Opt 2)
welcomedescription
If the Featured Description field is empty,
this attribute returns the value in the Store
Description field.
Handling Cost
handlingcost
Inactive
isinactive
See also Information Item Attributes.
Note: This attribute is different from
the Inactive attribute for information
items.
Internal ID
internalid
Item/Category Display
Image
storedisplayimagehtml
Item/Category Display
Image
storedisplayimage
Returns the URL only.
Item/Category Display
Thumbnail
storedisplaythumbnailhtml
storeDisplayThumbnailHt
ml-URL
Use storeDisplayThumbnailHtml-URL to
access the URL of the image file.
SuiteCommerce Site Builder Guide
Creating Attribute Tags
Field Name
Attribute
Notes
Item/Category Display
Thumbnail
storedisplaythumbnail
Returns the URL for use in an <img> tag.
Related Item Thumbnail
Image
relateditemthumbnailhtml
Returns the image at the size you set for
Related Item Thumbnails on Image Resizing
page. Setup > Site Builder > Image Resizing.
Featured Item Thumbnail
Image
featureditemthumbnailht
ml
Returns the image at the size you set for
Featured Item Thumbnails on Image Resizing
page. Setup > Site Builder > Image Resizing.
Item Options
denselistitemoptionshtml
Returns HTML for the item options select list
in a dense list format.
Item Name/Number
itemid
Item Weight
weight
Item Weight Unit
weightunit
Shows the unit of measure for item weight,
such as lb, oz, kg, or g.
Lead Time
leadtime
storeleadtime
Both attributes return the value for lead time
from the Inventory subtab.
Location
location
Manufacturer
manufacturer
Maximum Variable
Amount
maxdonationamount
Minimum Quantity
minimumquantity
Offer Support
offersupport
On Special
onspecial
Online Price
salespricehtml
Online Price
salespricelisthtml
Returns HTML for how it appears on an item
list page.
Online Price
(For dense list layout)
denselistsalespricehtml
Returns HTML for how it appears on a dense
list layout.
Price Level
pricelevel
pricelevel1, pricelevel2, etc.
Use pricelevel to return the price for the
customer who is logged in.
For more information, see Displaying Price
Levels and Sale Prices.
Quantity Available
quantityavailable
Quantity On Hand
quantityonhand
Related Items
relateditemshtml
Returns the items you add to the Related
Items subtab of Item records.
Note: For upsell items, see
“Correlated Items” at the beginning of
this table.
Related Items
Description
relateditemsdescription
SuiteCommerce Site Builder Guide
Returns contents in the Related Items
Description field on the item record.
118
Creating Attribute Tags
Field Name
Attribute
Notes
Related Item Name
relateditemsdescription2
Returns the contents in the Related Items
Description field on the item record if
present. If the field on the item record is
blank, then this attribute defaults to the
item's name.
Related items
description
relateditemsdescription3
Returns the contents in the Related Items
Description field on the item record if
present. If the field on the item record is
blank, then this attribute defaults to the
value in the Related Items field on the Upsell
subtab at Setup > Site Builder > Set Up Web
Site.
Sale Unit
saleunit
Sales Description
salesdescription
Search Keywords
searchkeywords
Shipping Cost
shippingcost
Special Order Item
isspecialorderitem
Specials Description
specialsdescription
Stock Description
stockdescription
Store Description
storedescription
Store Display Name
storedisplayname
Store Display Name
storedisplaynamehtml
Displays as a link to the item detail page or
as a link shoppers can use to transfer data in
the case of a download item hosted in the file
cabinet.
Subsidiary
subsidiary
Type
type
Defines the type of the item in use on the
website. For example: an item for sale, or an
information item.
Units Type
unitstype
URL Component
urlcomponent
Varialble Amount
isdonationitem
Vendor Name/Code
vendorname
119
Attributes for Elements not Available on the Item Record
Add to Cart button with
item name
addtocartitemid
Lists the item name on the Add to Cart
button.
Add to Cart button
addtocarthtml
Returns HTML for the Add to Cart button. Use
between <table> and
</table> tags.
Quantity field
addtocartquantityhtml
Returns HTML for the quantity field as it
appears with the Add to Cart button.
Add to Cart button
(Item detail page)
addtocartdrilldownhtml
Returns HTML for the Add To Cart button as it
appears on an item detail page.
SuiteCommerce Site Builder Guide
Creating Attribute Tags
120
Field Name
Attribute
Notes
Add to Cart button
(Item list page)
addtocartlisthtml
Returns HTML for the Add To Cart button as it
appears on an item list page.
Add to Cart button
(Dense list layout)
denselistaddtocartbuttonh
tml
Returns HTML for the Add To Cart button as it
appears in dense lists.
Add to Cart quantity
(Dense list layout)
denselistaddtocartquantit
yhtml
Returns HTML for the quantity field as it
appears with the Add to Cart button on dense
lists.
Add to Cart button with
options
addtocartoptionshtml
HTML to publish the
entire page
storepagehtml
Out of Stock message
stockstatusmessagehtml
See the note below.
“Tell A Friend” link
tellafriendlinkhtml
Upsell related items
together with item you
add to the Related Items
subtab on item records.
allrelateditemshtml
URL Address of the item
referenced
storeurl
Note: To include the stock status message with an Add to Cart button, you must use the
stock status message attribute in a tag that appears before the attribute tag for the add to cart
button. For example:
<%=getCurrentAttribute('item','stockstatusmessagehtml')%><%=getCurrentAttribute('item',
'addtocartdrilldownhtml')
Information Item Attributes
The following table includes the eligible fields for the information item record type and the
corresponding attribute to use in your tag. Attributes are not case-sensitive. For example, the Attribute
tag below would show the value in the Store Detailed Description field on an information item record.
<%=getCurrentAttribute('infoitem','storedetaileddescription')%>
Field Name
Attribute
Notes
Detailed Description
storedetaileddescription
Display in Site
isonline
Featured Description
featureddescription
Featured Item
bfeat
Featured Item (Opt 2)
welcomedescription
If the Featured Description is empty, this
attribute returns the value in the Store
Description field.
Inactive
binactive
SuiteCommerce Site Builder Guide
Creating Attribute Tags
Field Name
Attribute
Notes
Internal ID
internalid
Item/Category Display
Image
storedisplayimagehtml
Item/Category Display
Image (returns URL only)
storedisplayimage
Item/Category Display
Thumbnail
storedisplaythumbnailhtml
storeDisplayThumbnailHtmlURL
Use storeDisplayThumbnailHtml-URL to
access the URL of the image file.
Item/Category Display
Thumbnail
storedisplaythumbnail
Returns only the URL for the thumbnail
image.
Item Name/Number
itemid
Returns the value in the Name field on
information items.
Search Keywords
searchkeywords
Store Description
storedescription
Subsidiary
subsidiary
URL Component
urlcomponent
Meta Tag HTML
metataghtml
Page Title
pagetitle
Store page
storepagehtml
Returns HTML to publish the entire page.
Color Theme Attributes
The following table includes the eligible fields for the color theme and the corresponding attribute to
use in your tag. Attributes are not case-sensitive. For example:
<%=getCurrentAttribute('colortheme','color3')%>
Field Name
Attribute
Notes
Active Tab Color
color3
Active Tab Text Color
color7
Block Background Color
color1
Button Color
color15
Header Bar Color
color5
Header Bar Text Color
color6
Header Trim Color
color2
Inactive Tab Color
color4
Inactive Tab Text Color
color8
Link Color
color10
Page Background Color
color11
Page Top Background Color
color12
SuiteCommerce Site Builder Guide
121
Creating Attribute Tags
Field Name
Attribute
Notes
Portlet Label Text Color
color14
Portlet Trim Color
color13
Required Field Background Color
color16
Text Color
color9
122
Category Attributes
The following table includes the eligible fields for the category record type and the corresponding
attribute to use in your tag. Attributes are not case-sensitive. For example, you could use the Attribute
tag to expose the canonical URL for a particular category:
<%=getAttribute('sitecategory',7,'canonicalurl')%>
Field Name
Attribute
Notes
Canonical URL
canonicalurl
Category Image
categorythumbnailhtml
Returns the image at the size you set
for Category Thumbnails on the Image
Resizing Page.
Detailed Description
storedetaileddescription
Inactive
isinactive
binactive (information item)
Internal ID
internalid
Item/Category Display
Image
storedisplayimagehtml
Item/Category Display
Image (returns URL only)
storedisplayimage
Item/Category Display
Thumbnail
storedisplaythumbnailhtml
storeDisplayThumbnailHtmlURL
Use storeDisplayThumbnailHtml-URL to
access the URL of the image file.
Item/Category Display
Thumbnail (returns URL
only)”
storedisplaythumbnail
Item Name/Number
itemid
Returns the value in the Category field on
category records.
Search Keywords
searchkeywords
URL Component
urlcomponent
Description
description
Description (Opt 2)
description2
If the Category Description is empty, this
attribute returns the value for Category
Name.
Meta Tag HTML
metataghtml
Page Title
pagetitle
Parent Category
parentcategory
SuiteCommerce Site Builder Guide
Creating Attribute Tags
Field Name
Attribute
Notes
store page
storepagehtml
HTML to for the entire page
123
Customer Attributes
The following table includes the eligible fields for the customer record type and the corresponding
attribute to use in your tag. Attributes are not case-sensitive. For example, you could use the Attribute
tag below to display the customer price level on your site:
<%=getCurrentAttribute('customer','pricelevel')%>
Field Name
Attribute
Notes
Inactive
isinactive
Internal ID
internalid
Price Level
pricelevel
pricelevel1, pricelevel2,
etc.
Use pricelevel to return the price for the customer
who is logged in.
Use pricelevel followed by a numeric value,
representing the price level ID, to return other
price levels on the item record.
Use the Price level List at Setup > Accounting >
Accounting Lists to determine the correct ID.
Subsidiary
subsidiary
Account
accountnumber
Address
defaultaddress
Alternate Name
altname
This attribute returns the Company Name for
companies, for individuals, it returns the First and
Last name.
Note: You must have the proper setup
for Auto Generated numbers to use the
attribute tag for alternative name. Go to Set
up > Company > Auto Generated number.
On the Entities subtab, check the Allow
Override box for Customer records.
Alt. Email
altemail
Alt. Phone
altphone
Balance
balance
Campaign Category
campaigncategory
Category
category
Child Of
parent
Comments
comments
Company Name
companyname
Credit Limit
creditlimit
Currency
currency
SuiteCommerce Site Builder Guide
Creating Attribute Tags
124
Field Name
Attribute
Notes
Customer ID
entityid
Date Created
datecreated
Days
daysoverdue
This attribute displays the days overdue on the
balance.
Email
email
Email Preference
emailpreference
End Date
enddate
Fax
Fax
Give Access
giveaccess
Home Phone
homephone
Image
imagehtml
Project Title
title
Language
language
Lead Source
leadsource
Mobile Phone
mobilephone
Mr./Ms.
salutation
Name
firstname
This attribute returns the first name for individuals.
Other Relationships
otherrelationships
Overdue (balance)
overduebalance
Partner
partner
Phone
phone
Pref. CC Processor
prefccprocessor
Reminder Days
reminderdays
Resale Number
resalenumber
Role
accessrole
Sales Rep
salesrep
Ship Complete
shipcomplete
Shipping Item
shippingitem
Start Date
startdate
Status
entitystatus
Taxable
taxable
Tax Item
taxitem
Tax Reg. Number
vatregnumber
Terms
terms
Territory
territory
Unsubscribe
unsubscribe
Address
url
SuiteCommerce Site Builder Guide
Creating Attribute Tags
125
Site Attributes
You can create attribute tags for elements of the site that do not exist on NetSuite records, such as the
URL for the home page. For example:
<%=getCurrentAttribute('site','homepageurl')%>
Site Properties
Attribute
Notes
Consent to accept website
cookies
cookieconsenthtml
Displays a black banner at the top of
your website with a link to read your
website cookies policy.
Copyright
copyrighthtml
Displays the copyright message with ©
symbol, year, and store display name
Display name of the store
name
Returns the display name from the Site
Setup page.
Home page URL
homepageurl
HTML to publish the
entire page
storepagehtml
Logo alignment
logoalignment
Returns left, right or center alignment.
Logo image
logoimagehtml
Logo image URL
logoimageurl
Returns the URL for use in an <img> tag.
Logo image link
logolinkurl
Tab name currently being
viewed
currenttablabel
Welcome page image
welcomeimagehtml
Welcome page image/
flash URL
welcomeimageurl
Returns URL for use in an <img> tag.
Related items list title
relateditemsdescription
Returns the contents in the Related
Items field on the Upsell subtab at Setup
> Site Builder > Set Up Web Site.
Upsell items list title
upsellitemsdescription
Returns the contents in the Upsell field
on the Upsell subtab at Setup > Site
Builder > Set Up Web Site.
Request Attributes
You can create attribute tags for properties of your website that are not exposed on NetSuite records,
such as elements from browser requests made by shoppers as they view your website. For example,
you could use the Attribute tag below to capture cookies from visitors to your site:
<%=getCurrentAttribute('request','cookies')%>
SuiteCommerce Site Builder Guide
Creating Attribute Tags
126
Note: When using request attributes, also use nlescapehtml in your attribute tag to avoid
cross-site scripting vulnerabilities. This additional parameter is most commonly used along with
the querystring attribute. For more information see, Specifying Information for Display.
Site Properties
Attribute
Notes
Cookies associated with the
current page
cookies
IP Address for the session
ipaddress
Referrer to the current page
referrer
Scheme of current page (http or
https)
scheme
Use this attribute to create secure links. For
more information, see Creating Secure Links.
URL parameters of the current
page
querystring
User Agent HTTP header
useragent
Returns the visitor's browser type and
version.
Creating Secure Links
When you display an image on your site that references an image on another site, you must use a fully
qualified URL. If you use a URL that is not secure (one that starts with HTTP as opposed to HTTPS) on a
store checkout page, then visitors on your site may see a popup warning indicating the page contains
“nonsecure items.” To eliminate this popup warning, use an Attribute tag to construct a link returning
HTTP or HTTPS as appropriate. For example:
<%=getCurrentAttribute(‘request', ‘scheme')%>://www.othersite.com/file.ext
You can use this tag in a website template and the resulting URL will always be a fully qualified URL
appropriate for the page on which it displays, HTTP for shopping pages, and HTTPS for checkout pages:
http://www.othersite.com/file.ext
https://www.othersite.com/file.ext
Checkout Attributes
Use checkout attribute tags on the checkout tab at Lists > Web Site > Tabs. Click Edit next to the
Checkout tab, and use the Web Site Tags listed below in the Place Order Message field. Here, you can
capture data related to the order amount, shipping, and tax.
For example, you can use the tag below to capture the total amount of an order:
<%=getCurrentAttribute('checkout','total')%>
Field Name
Attribute
Notes
Order subtotal
subtotal
Tax calculated for complete order
tax
Order shipping amount
shipping
Grand total for the order
total
SuiteCommerce Site Builder Guide
Creating Attribute Tags
127
Order Confirmation Attributes
Use the attributes listed in the table below to capture data from orders placed on your website, and
to send data from orders to third-party reporting tools. For more information and a code sample, see
Working with Google Analytics.
Capture data related to the order amount, shipping, and tax by adding attribute tags to your tracking
script HTML on the Analytics subtab at Setup > Web Site > Set Up Web Site.
For best practice, enter all analytics information in one place at Setup > Site Builder > Set Up Site on the
Analytics subtab. Note that the confirmation attribute is only used on the Thank You page, displayed
after a shopper on your site submits an order.
The sample attribute tag below captures data from the items on the order:
<%=getCurrentAttribute('confirmation','orderitems')%>
Order component
Attribute
Notes
Order subtotal
subtotal
Tax calculated for complete
order
tax
Order shipping amount
shipping
Grand total for the order
total
order number
ordernumber
Promotion code ID
promotioncoderef
Only supported on the order
confirmation page.
Partner ID
partner
Shipping method
shipmethodref
Promotion code name
promocode
Lead Source
leadsource
orderitems
Returns data for each item in the order,
including item name, quantity, and price.
shiptocity
Returns the city where the order was
shipped.
shiptostate
Returns the state (or province?) where
the order was shipped.
shiptocountry
Returns the country where the order
was shipped.
Declare Attribute Tags for Tags Within Tags
You must use the declareAttribute tag when you use an attribute tag in a field, and you use a site
template to display that field on your website. The declareAttribute tag is required by NetSuite's tag
replacement engine to display embedded tags.
Behind the scenes, NetSuite's tag replacement engine scans each page twice to identify the attributes
you use in your custom HTML, and then render all the attributes properly on your web pages. The first
SuiteCommerce Site Builder Guide
Declare Attribute Tags for Tags Within Tags
128
time it scans a page, the tag replacement engine identifies the attributes used in each tag on the page.
At this time, embedded tags are passed over. On the second pass, it replaces all the tags on the page,
including tags that are embedded. Use the declareAttribute tag to point to embedded tags.
Using declareAttribute Tags
You can use declareAttribute tags in item/category templates or Hosted web pages.
For example, you may create an item drilldown template that contains an attribute tag for the detailed
description field on an item record:
<%=getCurrentAttribute('item','storedetaileddescription')%>
The HTML in the detailed description field may contain an attribute tag for the item name:
<%=getCurrentAttribute('item','storedisplayname')%>
To display all the information in the detailed description field from the item record, you must use the
declareAttribute tag for the item name in front of the Attribute tag for the detailed description field. For
example:
<%=declareCurrentAttribute('item','storedisplayname')%><%=getCurrentAttribute('item',
'storedetaileddescription')%>.
Use the appropriate declareAttribute tag listed below to ensure the embedded tag is rendered properly
in your site. Note that the declareAttribute tag takes the same parameters as its corresponding
Attribute tag.
Syntax:
■ declareAttribute
<%=declareAttribute('item',7,'storedisplayname')%><%=getAttribute('item','storedetaileddesc
ription')%>.
■ declareCurrentAttribute
<%=declareCurrentAttribute('item','storedisplayname')%><%=getCurrentAttribute('item',
'storedetaileddescription')%>.
■ declareRecordAttribute
<%=declareRecordAttribute('24',34,'custrecord80')%><%=getRecordAttribute('24',34,'custrecord
85')%>
Defining Custom Web Site Tags
You can create your own custom tags to use in item/category templates and site themes. Use custom
tags to repeat lines of custom HTML that you created. You can also use custom tags to combine HTML
with NetSuite item attribute tags to display some text or information from a NetSuite record on your
website.
SuiteCommerce Site Builder Guide
Defining Custom Web Site Tags
129
By using custom tags you do not have to enter a code snippet more than one time. It gives you one
place to use custom HTML that will then apply everywhere in your site where the tag exists.
Tag Substitution
You can also use custom tags in Tag Substitution. Tag Substitution on Tabs and Categories enables you
to change what your custom tag displays on certain pages of your website.
For example, a site manager wants to hide search and navigation portlets on some tabs but not others.
This can be done with tag substitution. First create custom tags for each portlet by pasting HTML code
(found in the site theme) for the portlets into custom tag records. Next, replace the HTML code in the
theme for those portlets with custom tags. Finally, on each tab record that should be hidden, enter a
tag substitution. For more information, see Using Tag Substitution on Tabs and Categories.
Creating Custom Tags
Create custom tags to display information on your site. You can use custom tags to repeat lines of
custom HTML, to combine HTML with attribute tags to display information from a NetSuite record on
your website, or with tag substitution.
When you create a custom tag, you can use it in the following places:
■ Item records, in the store description field
■ Category records, in the brief and detailed description fields
■ Item/Category templates
■ Site themes
Important: Web Site tags are not supported in SuiteCommerce Advanced websites.
To create a custom tag:
1. Go to Site > Appearance > Tags > New.
2. In the Tag field, enter a name for your tag using all capital letters with no spaces.
When you use this tag elsewhere in NetSuite, you will surround the tag with angle brackets. Do
not enter the tag name with brackets here.
3. In the Description field, enter an internal description about the purpose of the tag.
4. In the Default Value field, enter what should appear when you do not define a substitution value
on a tab or category record for this tag.
Here, you can enter HTML, a combination of HTML and attribute tags, or a standard block of text.
5. Click Save.
Important: Do not use custom tag names that have the same names as HTML elements.
Also, do not create custom tag names starting with 'NL' as this naming may conflict with default
NetSuite tags.
Using Tag Substitution on Tabs and Categories
Tag substitution lets you display unique content by replacing the value of a custom tag with a different
value you enter directly on tab and category records.
SuiteCommerce Site Builder Guide
Defining Custom Web Site Tags
130
For example, the site manager who wants to hide search and navigation portlets on some tabs but
not others uses custom tags to replace the HTML code in the site theme for those portlets. On each
tab record where he wants to hide a portlet, he enters a different value for the portlet in the Tag
Substitution subtab.
Important: Web Site tags are not supported in SuiteCommerce Advanced websites.
Using tag substitution is a three-part process:
1. Create a custom tag. For more information, see Creating Custom Tags.
2. Add the custom tag to your templates. For more information, see Adding Tags to Templates.
3. Substitute the value for the tag on each tab. For more information, see Substituting Values on
Tabs and Categories.
Adding Tags to Templates
After you have created a custom tag, you can add the tag to a field in a site theme template.
1. Go to Web Site > Appearance > Site Themes.
2. Click a subtab on the Web Site Theme page, and then add your custom tags in the appropriate
fields.
For example, to hide certain portlets on certain tabs in a NetSuite website, replace the HTML in
the appropriate fields on the Sidebars subtab with custom tags.
3. Click Save.
Substituting Values on Tabs and Categories
Next, the site manager substitutes different values on each tab where he wants to hide a portlet. Note
that the steps below can also apply to category records where you want to substitute a value for a
custom tag.
1. Go to Lists > Web Site, and click either Tabs or Categories.
2. Click Edit next to the tab or category where you want to use your new tag.
3. In the Tag field, select a custom tag.
4. In the Substitution Value field, enter to display a blank space on your site. Alternatively, you can
enter HTML, or a different tag to display different content.
5. Click Add.
6. Click Save.
You can preview your site to see how your tag is working at Setup > Site Builder > Preview Site.
SuiteCommerce Site Builder Guide
Using the Server-Side Include Tag
131
Using the Server-Side Include Tag
You can use the server-side Include tag in your item/category templates and in the HTML pages hosted
in your NetSuite file cabinet.
The server-side Include tag is useful for reusing a common piece of HTML code throughout your site,
such as a page header, a page footer or a navigation menu. When it is time to update that piece of
code, you do not need to update the code on each template and HTML file in your account. You only
need to update the file referred to in the Include tag.
Note that using Include tags, instead of repeating blocks of HTML code, can make the pages of your
website render more quickly. For more information, see Best Practices for Website Performance.
For example, several pages in your website share the same HTML for a related items list template
that you customized for your site. Upload a text or HTML file that includes the code in the appropriate
hosted file folder in your NetSuite file cabinet. Next, use the Server-Side Include tag in the item
drilldown template to call HTML code in the hosted file. When you need to make changes to the HTML
for your related items list, you can edit the hosted file.
Important: Web Site tags are not supported in SuiteCommerce Advanced websites.
To use the Server-Side Include tag:
1. Create a text or HTML file for the code you call in other site pages.
2. Upload this file to the appropriate folder in your NetSuite File Cabinet.
3. Now, you are ready to create your Server-Side Include tag. This is the syntax:
<%=include('URL')%>
Replace URL with the site-relative URL of your HTML or text file. This must be a quoted string.
This field is case sensitive. For example:
<%=include('/list.html')%>
4. Place this tag in the hosted pages of your site, or in an item/category template where you want
the common piece of HTML code to appear.
Note: Currently, you cannot use Server-Side Include tags in site theme templates.
Tags for Use in HTML Pages and Site Templates
NetSuite's Web Site Tags allow you to display tab, category, and item information in HTML files you host
from the file cabinet or the custom HTML you use in your Web Site Themes.
To use Web Site Tags, the Advanced Site Customization feature must be enabled in your NetSuite
account. To host HTML files in the file cabinet, you must use the Host HTML Files feature. To enable
these features, click the Web Presence subtab at Setup > Company > Enable Features.
Important: Web Site tags are not supported in SuiteCommerce Advanced websites.
You can use Web Site Tags to do the following:
■ To edit or customize site themes
SuiteCommerce Site Builder Guide
Tags for Use in HTML Pages and Site Templates
132
■ To integrate a site that you host in NetSuite with a NetSuite shopping cart, checkout or other
presentation tabs created in NetSuite
The table below displays each Web Site Tag, the site theme fields where it can be used, and notes
describing what it does. Note that each tag is presented in two different formats. You can use tags in
HTML files hosted in NetSuite or in site themes in either format displayed below.
Tag
Site Theme
Field
What it Does
<NLTABID>
<%=getTabID()%>
Active Tab
Inactive Tab
Returns the unique internal ID for the current
tab
<NLTABLABEL>
<%=getTabLabel()%>
Active Tab
Inactive Tab
Replaces the default label of a tab with the name
you have chosen for the tab.
<NLTABLINKURL>
<%=getTabLinkURL()%>
Active Tab
Inactive Tab
Places a navigation URL to view a page under a
tab. Use this tag within an href of an <a> tag.
<NLTABLINKATTRIBS>
<%=getTabLinkAttribs()%>
Active Tab
Inactive Tab
Gives rollover attributes to your tab. Use within
an href of an <a> tag.
<NLADDTOCARTOPTIONS>
<%=getAddToCartOptions()%>
Add To Cart
Button
Lists item options that have been selected on
the Add to Cart button.
<NLADDTOCARTITEMID>
<%=getAddToCartItemID()%>
Add To Cart
Button
Lists the item name on the Add to Cart button.
<NLADDTOCARTCLICKSCRIPT>
<%=getAddToCartClickScript()%>
Add To Cart
Button
Adds JavaScript to make your custom Add To
Cart button add the item to the shopping cart.
A mandatory tag if you are customizing the
button.
<NLADDTOCARTQUANTITY>
<%=getAddToCartQuantity()%>
Add To Cart
Button
Shows the quantity of items that will be added
on the Add To Cart button.
<NLADDTOCARTSUBMITSCRIPT>
<%=getAddToCartSubmitScript(
)%>
Add To Cart
Button
Adds JavaScript to check mandatory fields for
adding the item, such as item options. Not for
use with buttons on dense lists.
<NLCOMPANYID>
<%=getCompanyId()%>
Any
Adds your company ID.
Use this tag to generate company-relative URLs
in accounts that copies are made from. Do not
hard code the company ID.
<NLPROCESSONCE>
Any
Use this tag to surround HTML code in all areas
of the site theme. When the page is displayed,
only the first portion of HTML surrounded
by the NLPROCESSONCE tag is shown.
Subsequent blocks of HTML surrounded by the
NLPROCESSONCE tag will not be displayed.
For example, when you customize a site theme,
you may see an image or a greeting message
displayed twice. Use the NLPROCESSONCE to
resolve the problem.
<%=getOnlineFormLinkHtml(
formid )%>
Any
Renders the <href> to create a link from a
hosted HTML page, or a tab, or category record
to an online form. This tag preserves incoming
URL parameters, such as lead source, partner,
and promotion code.
Using this tag ensures that analytics data is
automatically transferred across domains. For
SuiteCommerce Site Builder Guide
Tags for Use in HTML Pages and Site Templates
Tag
Site Theme
Field
What it Does
more information, see Web Analytics and Online
Forms.
Replace formid with the number found in the
form's URL after "formid=.” Use this syntax to
create a link to an online form:
<%=getOnlineFormLinkHtml(7)%></a>
<%=getOnlineFormLinkHtml(
formid, subsidiary ID )%>
<%=getOnlineFormLinkHtml(
formid, ‘default')%>
Any
If you use a OneWorld account, use the tag
that includes the subsidiary ID, to record a
subsidiary on the form.
For example, use this syntax to create a link to
an online form:
<%=getOnlineFormLinkHtml(7, 99)%></a>
When a visitor to the site submits the online
form, the subsidiary (with ID=99) is recorded on
the form.
Use ‘default' in the tag to record the subsidiary
ID of the account where you created the online
form, for example,
<%=getOnlineFormLinkHtml(7,‘default')%></a>
<%=getOnlineFormUrl( formid
)%>
Any
Use within an <href> in a hosted HTML page on
your website, to render a link to an online form.
Use this tag instead of a hard-coded link to the
online form, as this tag preserves incoming URL
parameters you may want to pass on to the
online form, such as lead source, partner, and
promotion codes.
Replace formid with the number found in the
form's URL after "formid=.” Use this syntax to
render a link to an online form:
<a href=”<%=getOnlineFormUrl(7)%>”></a>
<%=getOnlineFormUrl( formid,
subsidiary ID )%>
<%=getOnlineFormUrl( formid,
‘default')%>
Any
If you use a OneWorld account, use the tag
that includes the subsidiary ID, to record a
subsidiary on the form.
For example, use this syntax to create a link to
an online form:
<a href=”<%=getOnlineFormUrl(7,99)%>”></a>
When a visitor to the site submits the online
form, the subsidiary (with ID=99) is recorded on
the form.
Use ‘default' in the tag to record the subsidiary
ID of the account where you created the online
form, for example,
<a href=
”<%=getOnlineFormUrl(7,‘default')%>”></a>
<NLITEMLIST>
<%=getItemList()%>
SuiteCommerce Site Builder Guide
Content Area
Returns the list of items or categories for the
page.
When you create a template for category list
pages, you must include the <NLITEMLIST> tag
133
Tags for Use in HTML Pages and Site Templates
Tag
Site Theme
Field
What it Does
in the template HTML so that categories display
properly on the page.
<NLCOLUMNCONTENTS>
<%=getColumnContents()%>
Content Area
Left-Side
Navigation
Right-Side
Navigation
Adds lists of items according to the tab being
viewed. This tag is required for your site to
display content from your account.
<NLCURRENCYSELECTHTML>
<%=getCurrencySelectHTML()%>
Currency Select
Portlet
Returns the currency selector portlet.
<NLPORTLETTITLE>
<%=getPortletTitle()%>
Default Portlet
Place this tag within HTML for a portlet template
to add a title for the portlet. You must use this
tag between <table> and </table> tags.
<NLPORTLETCONTENTS>
<%=getPortletContents()%>
Default Portlet
Cart Summary
Portlet
Currency Select
Portlet
Language Select
Portlet
Search Portlet
Search Form
Portlet
Site Navigation
Portlet
Place this tag within HTML for a portlet template
to add the contents of the portlet.
You must use this tag between <table> and </
table> tags.
<NLCARTTOTAL>
<%=getCartTotal()%>
Header
Sidebar
Adds the monetary total for all items in the cart,
including the currency symbol, for the current
site visitor.
<NLCARTITEMCOUNT>
<%=getCartItemCount()%>
Header
Sidebar
Adds the number of items in the cart for the
current site visitor.
<NLCARTSUMMARYHTML>
<%=getCartSummaryHTML()%>
Header
Sidebar
Adds the Cart Summary portlet for the current
customer's shopping cart. This tag must be used
between <tr> and </tr> tags.
<NLCARTDISCOUNTEDTOTAL>
<%=getCartDiscountedTotal()%>
Cart Summary
Portlet
Shows the discounted total before tax. The
amount shown equals the item subtotal minus
the applied discount.
Note: This tag only calculates
discounts related to promotion codes.
Gift certificates are not included.
<NLCARTAPPLIEDDISCOUNT>
<%=getCartAppliedDiscount()%>
SuiteCommerce Site Builder Guide
Cart Summary
Portlet
Shows the discount applied to the order.
This tag only calculates discounts related to
promotion codes. Gift certificates are not
included. The discount amount displayed using
this tag matches the discount amount displayed
on the Review & Submit page.
134
Tags for Use in HTML Pages and Site Templates
Tag
Site Theme
Field
What it Does
Note: The tax amount displayed
with this tag depends on whether the
discount associated with the promotion
code is marked Before Tax or After Tax.
<NLCARTAPPLIEDGC>
<%=getCartAppliedGC()%>
Cart Summary
Portlet
Shows the gift certificate applied to the order.
This is the total amount of gift certificates
applied.
<NLCARTSHIPPING>
<%=getCartShipping()%>
Cart Summary
Portlet
Shows the estimated shipping amount for
the order. This tag shows the shipping cost.
Handling is not included.
Note: This tag includes tax on shipping
items, only for Australian companies that
collect tax on shipping.
<NLCARTSHIPPINGHANDLING>
<%=getCartShippingHandling()%
>
Cart Summary
Portlet
Shows estimated shipping and handling. This
tag shows the shipping and handling cost. This
amount matches the amount displayed on the
Review & Submit page.
Note: This tag includes tax on shipping
items, only for Australian companies that
collect tax on shipping.
<NLCARTTAX>
<%=getCartTax()%>
Cart Summary
Portlet
Shows the estimated tax on the order. This tax
amount matches the tax amount displayed on
the Review & Submit page.
<NLCARTGRANDTOTAL>
<%=getCartGrandTotal()%>
Cart Summary
Portlet
Shows the grand total in the shopping cart.
This total amount matches the total amount
displayed on the Review & Submit page.
<NLLANGUAGESELECTHTML>
<%=getLanguageSelectHTML()%
>
Left-Side
Navigation
Shows a field where visitors can select another
language for viewing your site.
You must have the Multi-Language feature
enabled and set up to use this tag.
<NLPAGELINKS>
<%=getPageLinks()%>
Logo and Tabs
Creates links for customers to register or log in.
This tag must be used between <tr> and </tr>
tags.
<NLUSERINFO>
<%=getUserInfo()%>
Logo and Tabs
Places a greeting with the customer's name who
is currently logged in, or places text and a link,
“Returning customers click here to log in.”
This tag must be used between <td> and </td>
tags.
<NLUSERINFO2>
<%=getUserInfo2()%>
Logo and Tabs
This tag returns Register and Log In links for
site visitors who are not recognized and returns
recognized visitors' first and last names in a
Welcome message.
<NLPAGETOP>
<%=getPageTop()%>
Logo and Tabs
Adds your logo, default tabs and default links to
the top of the page.
SuiteCommerce Site Builder Guide
135
Tags for Use in HTML Pages and Site Templates
Tag
Site Theme
Field
What it Does
This tag must be used within <table> and </
table> tags.
<NLPAGEHEAD>
<%=getPageHead()%>
Logo and Tabs
Adds your custom HTML and META tags in the
HEAD element of the HTML page. This replaces
NetSuite header information.
Note: Without this tag, the HEAD
element of the HTML in your custom site
will not be used.
<NLPAGEFULLHEAD>
<%=getPageFullHead()%>
Logo and Tabs
Accesses your custom page head and META tag
information in addition to NetSuite page head
text, script file inclusions and stylesheets. Use
this tag instead of <NLPAGEHEAD> if your site
uses NetSuite forms, custom fields or portlets.
<NLWELCOMEIMAGEHTML>
<%=getWelcomeImageHTML()%>
Logo and Tabs
Adds the image you have selected on the tab
record for the Welcome tab.
<NLCRUMBTRAIL>
<%=getCrumbTrail()%>
Logo and Tabs
Shows breadcrumbs in the top part of website
pages. This tag can be added to your Logo and
Tabs template.
Note: To display all breadcrumbs on
all pages, you may need to use or alter
a style sheet to ensure the breadcrumb
links are a different color from the site
background.
<NLSITELOGOHTML>
<%=getSiteLogoHTML()%>
Logo and Tabs
Returns the HTML for the site logo.
<NLCARTURL>
<%=getCartUrl()%>
Logo and Tabs
Left-Side
Navigation
Creates a link to the Shopping Cart page when
you use it with an href. This tag must be used
instead of a hard-coded link to ensure security.
<NLCARTLINKHTML>
<%=getCartLinkHtml()%>
Logo and Tabs
Left-Side
Navigation
Use this tag to create an HREF for a link to the
shopping cart.
For example: <NLCARTLINKHTML>Shopping
Cart</a>.
Note: If you set analytics link attributes
at Setup > Set Up Web Site, on the Setup
subtab, the attributes are included when
bridging from the shopping server to the
checkout server on your web store.
<NLCHECKOUTURL>
<%=getCheckoutUrl()%>
Logo and Tabs
Left-Side
Navigation
Creates a link to the Checkout page when
you use it with an href. This tag must be used
instead of a hard-coded link to ensure security.
<NLCHECKOUTLINKHTML>
<%=getCheckoutLinkHtml()%>
Logo and Tabs
Left-Side
Navigation
Use this tag to create an HREF for a link to the
Checkout page.
For example:
<NLCHECKOUTLINKHTML>Checkout</a>
SuiteCommerce Site Builder Guide
136
Tags for Use in HTML Pages and Site Templates
Tag
Site Theme
Field
What it Does
Note: If you entered analytics link
attributes at Setup> Set Up Web Site,
on the Setup tab, those attributes
are included when bridging from the
shopping server to the checkout server
on your web store.
<NLCUSTOMERCENTERURL>
<%=getCustomerCenterUrl()%>
Logo and Tabs
Left-Side
Navigation
Creates a link to the My Account tab when used
within an href. This tag must be used instead of
a hard-coded link to ensure security.
<NLCUSTOMERCENTERLINKHTM
L>
<%=getCustomerCenterLinkHtm
l()%>
Logo and Tabs
Left-Side
Navigation
Use this tag to create an HREF for a link to the
My Account tab.
For example: <NLCUSTOMERCENTERLINKHTML>
Customer Center</a>
Note: If you entered analytics link
attributes at Setup> Set Up Web Site,
on the Setup subtab, those attributes
are included when bridging from the
shopping server to the checkout server
on your web store.
<NLLOGINURL>
<%=getLoginUrl()%>
Logo and Tabs
Left-Side
Navigation
Creates a link to the Login page for the web
store when used within an href. This tag must
be used instead of a hard-coded link to ensure
security.
<NLLOGINLINKHTML>
<%=getLoginLinkHtml()%>
Logo and Tabs
Left-Side
Navigation
Use this tag to create an HREF for the login link.
For example: <NLLOGINLINKHTML>Log In</
a>.
Note: If you entered analytics link
attributes at Setup> Set Up Web Site,
on the Setup subtab, those attributes
are included when bridging from the
shopping server to the checkout server
on your web store.
<NLLOGOUTURL>
<%=getLogoutUrl()%>
Logo and Tabs
Left-Side
Navigation
Creates a link to log out the current customer
and redirect them to your Home page when
you place the tag within an href. This tag must
be used instead of a hard-coded link to ensure
security.
<NLLOGOUTLINKHTML>
<%=getLogoutLinkHtml()%>
Logo and Tabs
Left-Side
Navigation
Use this tag to create an HREF for the logout
link.
For example: <NLLOGOUTLINKHTML>Sign
Out</a>.
SuiteCommerce Site Builder Guide
137
Tags for Use in HTML Pages and Site Templates
Tag
Site Theme
Field
What it Does
Note: If you entered analytics link
attributes at Setup> Set Up Web Site,
on the Setup subtab, those attributes
are included when bridging from the
shopping server to the checkout server
on your web store.
<NLRELOGINURL>
<%=getReloginURL()%>
Logo and Tabs
Left-Side
Navigation
Creates a link to log out the current customer
and redirect them to the Login page when used
within an href. This tag must be used instead of
a hard-coded link to ensure security.
<NLRELOGINLINKHTML>
<%=getReloginLinkHtml()%>
Logo and Tabs
Left-Side
Navigation
Use this tag to create an HREF for the link to log
out the current customer and redirect them to
the Login page.
For example: <NLRELOGINLINKHTML>Sign
Out</a>.
Note: If you entered analytics link
attributes at Setup> Set Up Web Site,
on the Setup subtab, those attributes
are included when bridging from the
shopping server to the checkout server
on your web store.
<NLREGISTRATIONURL>
<%=getRegistrationUrl()%>
Logo and Tabs
Left-Side
Navigation
Creates a link to the Registration page where
customers can enter their preferred login
contact information. Place this tag within an href
tag. This tag must be used instead of a hardcoded link to ensure security.
<NLREGISTRATIONLINKHTML>
<%=getRegistrationLinkHtml()%>
Logo and Tabs
Left-Side
Navigation
Use this tag to create an HREF for a link to the
Registration page where customers can enter
their preferred login contact information.
For example:
<NLREGISTRATIONLINKHTML>Register</a>
Note: If you entered analytics link
attributes at Setup> Set Up Web Site,
on the Setup subtab, those attributes
are included when bridging from the
shopping server to the checkout server
on your web store.
<NLPAGETABS>
<%=getPageTabs()%>
Logo and Tabs
Left-Side
Navigation
Adds HTML for the individual tabs.
Use this tag in the Logo and Tabs field for
horizontal navigation across the top of the page.
Use this tag in the Left-Side Navigation field to
display tabs vertically.
Must be used between <table> and </table>
<NLSIDEBARWIDTH>
<%=getSidebarWidth()%>
Logo and Tabs
Left-Side
Navigation
Places a sidebar navigation section in the default
width.
Use within the width=param or a <td> or <table>
to obtain the correct width.
SuiteCommerce Site Builder Guide
138
Tags for Use in HTML Pages and Site Templates
Tag
Site Theme
Field
What it Does
Right-Side
Navigation
Footer
<NLGLOBALSEARCHHTML>
<%=getGlobalSearchHTML()%>
Logo and Tabs
Left-Side
Navigation
Right-Side
Navigation
Footer
Content Area
Includes the standard Search portlet in your
website, including hosted pages. This tag returns
a <td> of the search form HTML. The search
form may be used one time on any page.
<NLGLOBALSEARCHFORMHTML
>
<%=getGlobalSearchFormHTML
()%>
Content Area
Template
Search Portlet
Search Form
Portlet
When you add this tag to a Web Site theme, it
displays the search form on all store pages.
On order forms in the customer center, and
list pages, such as the sales order list on the
My Accounts tab or Customer Center, this tag
displays a link to the published search form.
Note: When a shopper on your site
runs the search on any of the following
tabs: My Account, Shopping Cart,
or Checkout, the search results are
displayed on your Home page tab.
<NLSITENAVIGATIONHTML>
<%=getSiteNavigationHtml()%>
Site Navigation
Portlet
Returns the navigation portlet.
Tags for Information Unavailable on Records
You can add attributes that do not exist on records, such as an Add to Cart button or an Out Of Stock
message. Note that Web Site tags are not supported in SuiteCommerce Advanced websites.
Note: To include the stock status message with an Add to Cart button, you must use the
stock status message attribute in a tag that appears before the attribute tag for the add to cart
button.
For example:
<%=getCurrentAttribute('item','stockstatusmessagehtml')%><%=getCurrentAttribute('item','addtoca
rtdrilldownhtml')%>
Additional
Features
Item
Info
Item
Category
Site
Request
Attribute
Cookies
associated with
the current page
X
cookies
IP Address for
the session
X
ipaddress
Referrer to the
current page
X
referrer
Scheme
of current
X
scheme
SuiteCommerce Site Builder Guide
139
Tags for Information Unavailable on Records
Additional
Features
140
Item
Info
Item
Category
Site
Request
Attribute
URL parameters
of the current
page
X
querystring
User Agent HTTP
header - visitor’s
browser type &
version
X
useragent
HTML to publish
the entire page
X
X
X
X
storepagehtml
Copyright
message with
© symbol,
year, and store
display name
X
copyrighthtml
Display name of
the store
X
name
Home page URL
X
homepageurl
Logo alignment returns left, right
or center
X
logoalignment
Logo image
<img> tag or
X
logoimagehtml
Logo image URL
X
logoimageurl
Tab name
currently being
X
currenttablabel
Welcome page
image<img> tag
or HTML
X
welcomeimagehtml
Welcome page
image/flash URL
X
welcomeimageurl
Add to Cart
button
X
addtocarthtml
Use between <table> and
</table> tags.
Add to Cart
button (HTML
for how it
appears on an
item drilldown
X
addtocartdrilldownhtml
Add to Cart
button (HTML
for how it
appears on an
item list page)
X
addtocartlisthtml
Add to Cart
button (HTML
for how it
appears in
dense lists)
X
denselistaddtoccartbutt
onh
Add to Cart
button with
options
X
addtocartoptionshtml
Add to Cart
quantity (HTML
for how quantity
field for add to
cart appears on
dense lists)
X
denselistaddtocartquan
tityh
page(http or
https) - used to
create secure
links
SuiteCommerce Site Builder Guide
Tags for Information Unavailable on Records
141
Additional
Features
Item
Info
Item
Category
Site
Request
Attribute
"Out of Stock"
message if the
quantity on
hand is at or
below 0
X
stockstatusmessagehtml
“Tell A Friend”
link
X
tellafriendlinkhtml
Upsell related
items together
with item you
add to the
Related Items
subtab on item
records.
X
allrelateditemshtml
URL Address
of the item
referenced
X
storeurl
SuiteCommerce Site Builder Guide
Website Search with Site Builder
142
Website Search with Site Builder
An important aspect of creating an effective website is making sure that shoppers find the products
they are looking for. NetSuite Site Builder provides a set of tools that make it easy to display relevant
search results on your website:
■ Learn how to leverage the global search on your web store by reading Helping Customers Find
Items on Your Site.
■ Learn about Setting Up Alternate Search Keywords to use when a shopper misspells the name of a
product while searching on your site.
■ Read Publishing Saved Search Results on Your Website for instructions on creating and posting your
own searches.
■ Learn how to better merchandise items on your website by Applying Layout Templates to Search
Results.
■ Allow customers to select their own search criteria by publishing Search Forms on your website.
■ Use NetSuite's Sitemap Generator to create an HTML site map for display on your site. For more
information, see Displaying an HTML Site Map on Your Website
Helping Customers Find Items on Your Site
Typically, when shoppers visit your site, they use a global search field to find items on your website. The
global search field typically appears at the top of each web page.
Only items that are published to categories marked to display in your website display in global search
results. Note that if you publish a category to a specific customer audience, a shopper must log in with
a role that matches the audience to see items in that category.
For information on preferences you can set for website search, see the help topic Web Site Search
Preferences.
Global Search Results Display
When a visitor to your site runs a search, the results are presented in order of relevance. NetSuite
determines relevance by matching the keywords in the visitor's search with the number of times those
keywords appear on your site, and the fields in which those keywords appear.
NetSuite matches keywords using the following algorithm for ranking:
1. Item names or keywords defined in these fields on item records display at the top of the list:
■ Item Name/Number
■ Web Store Display Name
■ Search Keywords
2. Keywords in the Web Store Description field display next.
3. Keywords in the Detailed Description field display last.
You can choose to display keyword matches in site category names at the top of the search results list.
Go to Setup > Set Up Web Site. On the Search subtab, check the Include Categories box.
SuiteCommerce Site Builder Guide
Setting Up Alternate Search Keywords
143
Setting Up Alternate Search Keywords
Set up alternate keywords that customers might use to search for items or categories in your website.
This enables customers to find and purchase the item they are looking for, even if they misspell the
item name or use a synonym for the item name.
To set alternate search keywords:
1. To set keywords for items, go to Web Site > Publishing > ItemsLists > Site Builder > Items. To
enter keywords for categories, go to Web Site > Publishing > CategoriesLists > Site Builder >
Categories.
2. On each item or category record, in the Search Keywords field, enter alternate keywords, such
as misspellings, synonyms or acronyms. You can enter several keywords separated by a comma.
3. Click Save.
Now, when customers search using a keyword you have entered on an item record, that item will be
returned as though the customer entered the item name.
Publishing Saved Search Results on Your Website
Create a saved search for items that might appeal to certain interests, and then publish the saved
search on your web store. When shoppers click a link, they can see the search results on your site.
For example, the Wolfe Electronics website has a saved search for cordless phones. This search
updated on a regular basis, so the list is up to date.
To create a saved search for use with a Published Saved Search:
1. Go to Lists > Search > Saved Searches.
2. Click New.
3. Click Item.
4. Enter a name for this search in the Search Title field. This title is not seen by your customers.
5. Check the Public box to make the search available to use on a Search Form.
6. On the Criteria subtab, select criteria to filter the records displayed in the search results.
For example, if this search is for items available on your website, choose the filter, Display in
Web Site, then select Yes. Only items that are marked to display online are included in the search
results.
Important: Use these criteria to restrict search results, such as transaction records,
from displaying on your website to all customers.
7. On the Results subtab, select the columns you want to show in the search results. For example,
use: Name, Description, and Online Price.
Note: In the Custom Label column, you can change the names of the columns in the
search results.
8. Click Add.
9. Click Save.
Next, publish this saved search to your web store. Customers will be able to view an up-to-date list
of items. Note that only search forms allow customers to change the criteria of a search. For more
information, see Search Forms.
SuiteCommerce Site Builder Guide
Publishing Saved Search Results on Your Website
144
To publish the search results:
1. Go to Web Site > Publishing > Publish Saved Search > NewLists > Site Builder > Publish Saved
Search > New.
2. Enter a title for the link shoppers click to view your search results.
3. In the Search field, select the name of the search you created.
4. In the Subcategory of field, choose the page in your site where you want to display the link to
your search results.
5. In the Item List Layout field, you can select a layout created at Web Site > Appearance > Layouts.
Choose an option in the list to customize the look of your search results.
6. Check the Display in Web Site box.
7. On the Basic and Media subtabs, enter descriptions and choose images to appear next to the
link for this Published Saved Search.
8. On the Audience subtab, you have the option of displaying search results only to registered
customers who log in instead of all site visitors.
To publish only to specific customers or to registered customers who log in, first clear the Display
in Web Site box. Then, on the Audience subtab, choose from the following:
■ To display these results to all registered customers when they log in, check Select All next to
Customers.
■ To publish to specific customers, select customer names in the Customers field.
■ To publish to a group of customers, select the group name in the Groups field.
To create groups of customers using search criteria, go to Contacts > Contacts > Groups >
New. Select Dynamic or Static based on the type of group you want to create.
9. Click Save.
Shoppers in your web store can now click the link to your published saved search and see the list of
search results.
You can also apply a layout template to the published saved search. This lets you better merchandise
your items by presenting them in a list that has a look and feel consistent with the rest of your website.
For more information, see Applying Layout Templates to Search Results.
Note: Published saved search results are updated every four hours at the database level,
adding or removing content, to meet the criteria for the search. As a result, changes in the saved
search results may not display immediately on the web store.
By default, all items marked Display in Web Site can be returned in web search results, even if they
are not assigned to a tab or category in the website. To only have items assigned to tabs or categories
appear in search results, go to Setup > Site Builder > Set Up Web Site. Clear the Show Items Not in
Categories in Search Results box.
Warning: CSV Import of Published Saved Searches is not supported.
Applying Layout Templates to Search Results
You can apply one of NetSuite's basic templates to lists displayed in search result lists. If you use the
Advanced Site Customization feature, you can edit the basic templates or create your own.
SuiteCommerce Site Builder Guide
Applying Layout Templates to Search Results
Note: A layout template will only be applied to items displayed in search results. A layout
template is not applied to searches that display entities or transactions.
To apply a layout template to results from a search form:
1. Go to Setup> Web Site> > Setup Web Site.
If you use the Multiple Web Sites feature, click Edit next to the site you want to apply the
template to.
2. Click the Legacy subtab, and clear the Legacy Dense List Layout box. If your NetSuite Account
was created later than 2007, apply the layout from the published saved search record.
Note: This subtab is only available on accounts provisioned before May 2007.
3. Click the Search subtab.
4. In the Search Form section, choose a layout in the Item List Layout field.
5. Click Save.
To apply a layout template to results from a published saved search:
1. Go to Lists > Web Site > Published Saved Searches.
2. Click Edit next to a published saved search.
3. In the Item List Layout field, choose an Item layout.
4. Click Save.
d
SuiteCommerce Site Builder Guide
145
Site Builder Search Engine Optimization (SEO)
146
Site Builder Search Engine Optimization
(SEO)
Use SEO tools in NetSuite to improve your website’s ranking in search engine listings. Read the
following topics for more information:
■ Adding Page Titles in Site Builder.
■ Adding META Tags in Site Builder
■ Adding Alt Text to Website Images in Site Builder
■ Using Canonical URLs in NetSuite Websites
■ Descriptive URLs in Site Builder
■ Setting Up Website Product Feeds
■ Keyword Marketing With Search Engines
■ Using the Sitemap Generator in Site Builder
NetSuite Reports to Help You Gauge Your SEO Success
Note that in some cases, NetSuite uses algorithms for tracking data that are different from Google
Analytics. Read the description for each report for help interpreting the NetSuite data:
■ Referrer Summary Report
■ Referrer Detail Report
■ Page Hits Detail Report
■ New Visitor Report
■ Keywords Summary Report
Adding Page Titles in Site Builder
You can enter titles for the pages in your website. When you enter a page title, the title appears in the
upper-left corner of the browser window. Entering page titles for tabs, categories, and items can help
improve ranking with search engines.
To enter a page title:
1. Go to Web Site > Publishing > ItemsLists > Site Builder> Items.
2. Click Edit next to the item you want to enter a page title for.
3. Click the Store subtab.
4. In the Page Title field, enter the page title for this item.
5. Click Save.
When customers view this item in your web store, the text you entered in the Page Title field appears in
the browser title bar.
SuiteCommerce Site Builder Guide
Adding META Tags in Site Builder
147
Adding META Tags in Site Builder
Use META tags within the head element in your hosted HTML documents, or enter them on NetSuite
item records, tabs, and categories to help search engines categorize your website. META tags can
specify page description, keywords, or you can use a META tag to indicate how long a page can be
cached in the browser.
When using the META Tag HTML field on items, tabs and categories in NetSuite, omit the <head> tag.
Your META tags are automatically added to the head element of NetSuite-generated website pages.
Note the sample META tags below:
<META name="description" content="Bargain electronics">
<META name="keywords" content="Computers,Printers,Phones">
<META http-equiv="expires" content="Tues, 21 June 20011 14:25:27 GMT">
To add META tags to a tab, category, or item record:
1. If you are using a Store Manager role, go to Web Site > Publishing. Choose Tabs, Categories, or
Items to see a list of records.
If you are using an Administrator role, go to Lists > Web Site, and then select Tabs, Categories, or
items.
2. Click Edit next to a record to enter META tags.
3. In the META Tag HTML field, enter META tags for this record.
■ On tab records the field is at the top of the page.
■ On category records the field is on the Basic subtab.
■ On item records, the field is on the Web Store subtab.
4. Click Save.
Adding Alt Text to Website Images in Site Builder
Alt text can help improve search engine ranking, and it is used to interpret pictures for people who are
visually impaired.
To enter alt text for images:
1. Go to Web Site > Files > ImagesLists > Site Builder> Images.
2. Click Edit next to an image.
3. Enter text in the Alt Image Tag field.
4. Click Save.
Alt text appears when site visitors mouse-over images on your site and it should be as concise and
descriptive as possible. Best practice is to use multiple keywords separated by commas. The Alt Image
Text field accepts hyphenated terms and double quotes. For example, you can enter: flat-screen,
“home theater”, HD.
Using Canonical URLs in NetSuite Websites
NetSuite builds a canonical, or normalized, URL based on the preferred category you select for each
item published online.
SuiteCommerce Site Builder Guide
Using Canonical URLs in NetSuite Websites
148
A canonical URL is useful in SEO because it creates a single preferred path to each item on your
website, which eliminates the perception of duplicate content. Although an item may display in
multiple categories or tabs, NetSuite uses the canonical URL to point to item pages in product feeds
and site maps.
If you do not select a preferred category on the item record, NetSuite will determine the preferred
category based on the most prominent category or tab on your site where the item is published.
To select a preferred category on an item record, check the box in the Preferred Category column on
the Store subtab.
Canonical URLs and Custom Item/Category Templates
The canonical URL tag exists in the <head> element of NetSuite's basic item drilldown and category
list templates.
Note that you may need to add a canonical URL tag if you have already customized NetSuite's basic site
templates.
To add a canonical URL to a customized Item/Category Template:
1. Go to Setup > Site Builder > Item/Category Templates.
2. Click Edit next to the template you want to modify.
3. In the Addition to <head> field, enter the following:
■ For item drilldown templates:
<link rel='canonical' href='<%=getCurrentAttribute('item','canonicalurl')%>'/>
■ For category list templates:
<link rel='canonical' href='<%=getCurrentAttribute('sitecategory','canonicalurl')%>'/>
4. Click Save.
Descriptive URLs in Site Builder
With descriptive URLs, shoppers understand the content on each page of your site, from reading the
web address. In NetSuite, you can create descriptive URLs that point to each tab, category, item, and
image file published on your web store.
By default, NetSuite uses the item record ID in the URL to point to an item detail page. For example, the
URL below points to a web store page that displays a flat screen TV:
http://www.mysite.com/it.A/id.151/.f
The descriptive URL provides shoppers with more information about the page, and you have the option
to include the parent category in a descriptive URL. For example:
http://www.mysite.com/Home-Entertainment/TVs/Flat-Screen-TV
In Site Builder, you can construct your own descriptive URLs by entering keywords in the URL
Component field on tab, category, item records, and image files. Alternatively, you can run the Bulk Set
URL Components task to automatically update descriptive URLs on your website.
SuiteCommerce Site Builder Guide
Descriptive URLs in Site Builder
149
To use descriptive URLs in NetSuite, first, set up a domain at Setup > Site Builder > Set Up Domains.
Next, turn on the Advanced Site Customization feature, and the Descriptive URLs feature at Setup >
Company > Enable Features, on the Web Presence subtab.
Descriptive Image URLs
You can use the Bulk Set URL Components page to update all image file records in the file cabinet.
Here, you can also select a source for generating URL components for images published on your
website, such as the image caption, or Alt Image tag. Alternatively, you can enter the URL Component
directly on the image file record. Overwriting an image by uploading a new image file does not affect
the value in the URL Component field.
Setting Up Descriptive URLs
To set up descriptive URLs in Site Builder, you must have set up a custom domain at Setup > Site
Builder > Set Up Domains. Also, the Advanced Site Customization feature and the Descriptive URLs
feature must be enabled.
You can enter keywords in the URL Components field on the following record types in NetSuite: tabs,
categories, items, and images. The Bulk Set URL Components task derives URL components from the
record name on tabs and categories, and from the Web Store Display name on item records. Note that
the task only sets a value in the URL Component field when that field is blank. It does not overwrite a
value that you set in the URL Component field.
To set up Descriptive URLs:
1. Enable the Descriptive URLs feature at Setup > Company > Enable Features > Web Presence.
Note: You must also turn on the Advanced Site Customization feature, and use a
custom domain. For more information, see the help topic Pointing Domain Names at
NetSuite.
2. Go to Setup > Site Builder > Set Up Web Site.
If you use the Multiple Web Sites feature, click edit next to a website.
3. Set your preferences in the Descriptive URLs section. The preferences you set here are applied
automatically. You are not required to run the Bulk Set URL Components task after changing
your preferences.
a.
In the Format field, choose from the following options for items in your web store:
■ /tab-name/category-name/item-name
■ /item-name
b.
Check the Use File Extension box to optimize descriptive URLs on item and category
pages. This preference does the following:
■ Includes the file name extension on URLs that point to item pages, and information
item pages.
■ Includes a trailing slash on URLs that point to tabs and categories. For example, http://
www.store.com/Home-Entertainment/TVs/.
SuiteCommerce Site Builder Guide
Descriptive URLs in Site Builder
150
Note: The file name extension is always included in the descriptive URL pointing
to images stored in the Images folder of the file cabinet, whether this box is
checked or cleared.
c.
To handle unrecognized URLs, select one of the options under Action for Unrecognized
URLs:
■ Page Not Found – Returns a Page Not Found (404) error for unrecognized URLs.
■ Moved Permanently – Redirects to the last valid descriptive URL for the item with 301
Moved Permanently status code.
■ Return Search Results – Redirects to a search results page on your site, based on
keywords found in the URL.
d.
Click Save.
4. Go to Setup > Site Builder > Setup Tasks > Set Up Web Site.
a.
In the Action section, choose to set or clear URL components.
Note: Clearing URL components could have a negative impact on search engine
ranking. For more information, see Best Practice for Using Descriptive URLs.
b.
In the Apply To section:
■ Check the Item and Category box to set URL components on tab, category, and item
pages.
■ Check the Web Site Images box to set URL components on files in the Images folder of
the file cabinet.
c.
In the Images Options section, select a source for generating URL components for
images. :
■ Image Caption – Derives the URL component from the Caption field on image files.
■ Alt Image Tag – Derives the URL component from the Alt Image Tag field on the image
file.
■ Item/Category Name – Derives the URL component from the name of the item or
category record to which the image is attached. For images associated with both a
category and an item, the category name is used.
For example, if the item is named “My Item” the image attached would be named “MyItem-image.” The thumbnail would be named “My-Item-thumb.” A file extension is
added based on the preference you set in Step 4b.
Note: On image files attached to item records the URL components are
sourced from the Store Display Name field under the Store sub tab of the item.
■ Best Available – Derives the URL component for images based on the criteria listed
below:
1.
The store display name of the item associated with the image.
2.
The value in the Alt Image Tag field on the image file.
3.
The value in the Caption field on the image file.
5. Click Submit.
After you run the Bulk Set URL Components task, a descriptive URL points to each page of your
website. The same URL component is used for a particular item in every location within the site.
Parameters are added to the descriptive URL to provide site location context as needed.
SuiteCommerce Site Builder Guide
Descriptive URLs in Site Builder
151
Best Practice for Using Descriptive URLs
The following list describes best practice for using Descriptive URLs in Site Builder:
■ When naming categories and tabs published on your website, use keywords that describe what
can be found on the page. For example, if you sell movies, instead of naming a tab “Catalog,” name
it “Shop For Movies,” or “DVD Movies.” Alternatively, you can enter those keywords in the URL
Component field.
■ When naming images published on your website, consider search engine optimization (SEO). The
name should describe the image or the item that the image is associated with.
■ To manually edit the URL Component field on a set of item records, you can customize the item list
view to display the field, and then click Edit on the list page to enable inline editing.
■ Use the option to clear URL components only when first setting up a site, or if you need to
regenerate URL components with updated item information. To continue using descriptive URLs, be
sure to run the Bulk Set URL Components task again. After a site is up and running, do not clear URL
components, as visitors' bookmarks may result in broken links.
■ Note the following when turning off the Descriptive URLs feature or clearing URL components:
□ If you turn off the feature, URLs are generated using the default NetSuite format (using internal
record IDs). After you turn the feature off, visitors to your site using descriptive URLs may receive
a 404 page-not-found error.
□ If you choose to clear URL components permanently, select one of the options under the
preference, Action for Unrecognized URLs.
Keyword Marketing With Search Engines
When you use the Marketing Automation feature in addition to the Advanced Web Reports feature, you
can use keyword campaigns to track the effectiveness of paid keywords, including Google Adwords and
Yahoo! Sponsored Search.
To use keyword campaigns for tracking paid keywords:
1. Create or import keyword campaigns in NetSuite for each keyword you plan to purchase.
For more information, see Chapter 6 of the Marketing guide.
2. Provide a URL with the proper lead source parameters when you register each keyword with the
keyword service, such as Google or Yahoo!.
The destination URL should be formatted as follows to ensure that the correct keyword
campaign is associated with the customer record:
http://yourlandingpage.com?leadsource=yourcampaignID
You can copy the URL in this format from the campaign record, or you can create the URL using
the campaign ID entered on the campaign record.
Note: When you enter a keyword campaign record in NetSuite, you must only enter
the URL for the landing page. When you save the record, the lead source parameter and
campaign ID are automatically added to the URL.
3. Analyze your keyword data using the following Marketing reports:
■ Sales by Paid Keyword Summary and Detail
SuiteCommerce Site Builder Guide
Keyword Marketing With Search Engines
152
■ Leads by Paid Keyword Summary and Detail
When a lead clicks the link to your site, the lead source is saved in the cookie received from your
website and used in reporting data. This information is maintained no matter how many times the lead
leaves your site and returns. When the lead registers with your website or submits an online customer
form, the lead source is saved to the record.
Setting Up Website Product Feeds
NetSuite enables you to use Product Feed search results to generate a list of items that you can upload
to various shopping comparison sites.
For example, if you sell printers in your web store, you can upload a product feed file to Google Base.
When shoppers search Google Base for printers, the printers on your web store show in the list of
results. Shoppers can see images of your printers, get pricing information and click links from the
search results to your web store.
The topics listed below provide detailed information for uploading your product feed to each search
engine:
■ Yahoo! Shopping
■ NexTag
■ Shopzilla
■ Shopping.com
■ Google Base
Important: Google Base has been retired. However, you can still create a saved item
search that you can export and use as a product feed. Visit the help page on the Google
Merchant Center website for more information about the data feed submission process and
specific requirements.
If you use NetSuite OneWorld, or the Multiple Web Sites feature, see Using Product Feeds with Multiple
Websites and OneWorld.
NetSuite's product feed results include all items that are associated with a product feed, and marked
online in your account. To add an item to a product feed, select the search engine in the Product Feed
field on the Store subtab of the item record.
Each shopping search engine requires specific information in a product feed file. NetSuite provides the
following fields on item records where you can enter this information.
■ On the Basic subtab:
□ Manufacturer
□ MPN (Manufacturer's Part Number)
□ Stock Description
■ On the Store subtab:
□ Shopping.com Category
□ Shopzilla Category
□ NexTag Category
SuiteCommerce Site Builder Guide
Setting Up Website Product Feeds
153
The following types of items are included in product feed results: Kit/Package, Non-inventory Item for
Sale, Non-inventory Item for Resale, Assembly (lot and serialized), Inventory (lot and serialized).
To create a product feed file for upload to a shopping search engine:
1. Go to Setup > Site Builder > Product Feeds
2. Select a product feed from the list. The data for your product feed displays on the results screen.
NetSuite provides the basic required fields. However, if you want to add additional fields, or you
need to provide information specific to the products you sell, such as MUZID for music, or ISBN
for books, you can edit the saved search. For specific steps describing how to add or rename
columns, see Editing Product Feed Results.
3. Click the Excel icon to export the list in CSV file format.
4. Verify that the data in the spreadsheet complies with the requirements from the search engine
to which you plan to export the product feed.
Note: Click the links at the top of this page to verify data requirements for each search
engine.
5. After you have the correct column names and your spread sheet is complete, select the Save As
option from the File menu.
6. Save the file in the file format required by the search engine to which you plan to export the list.
For most search engines, choose Text (Tab delimited) in the Save as type field. Shopping.com
gives you the option to save the file in Excel or CSV format.
7. Enter a file name based on instructions for the search engine to which you plan to upload the
product file.
For example: Yahoo! Shopping requires that the file is named data.txt.
8. If you see an alert when saving your file, indicating that your file may contain features that are
not compatible with the Text (Tab delimited) format, ignore it. Click Yes to save the file.
Note: Use Inline Editing to quickly enter product feed information on your items list. Go to
Lists > Items > Search. On the Criteria tab, add Display in Web Site, select Yes, and also add the
item type. On the Results tab, add the fields that require data for your product feeds.
Editing Product Feed Results
Each shopping search engine has requirements for formatting a product feed file. NetSuite provides
the basic required fields, but you may rename columns or add columns to the product feed results.
To edit the product feed results:
1. Go to Lists > Web Site > Product Feeds.
2. Select a comparison shopping engine from the list.
3. Click Edit This Search.
4. On the Saved Item Search page, accept the default filters on the Criteria tab.
1.
On the Results tab, add or remove columns based on the requirements from the
shopping comparison site. Click the links below for detailed information on product feed
requirements.
SuiteCommerce Site Builder Guide
Setting Up Website Product Feeds
2.
154
On the Columns subtab, in the Custom Label field, enter the column label as specified by
the comparison site where you plan to upload the product feed results.
5. In the Search Title field, accept the default value, or enter a new title for the search.
6. Click Save.
Your edited product feed now displays in the list at Setup > Site Builder > Product Feeds.
Using Product Feeds with Multiple Websites and
OneWorld
When you use the Multiple Web Sites feature, or NetSuite OneWorld, you can filter the Product Feed
Results page to show items associated with a particular site or subsidiary.
Task
Description
1.
Filter by Web Site.
2.
Filter by Subsidiary.
Product Feeds and Multiple Websites
Make a selection in the Web Site list to display only the items published to a particular site.
If you select All, then all of the items published to all sites are included in the product feed results. An
item on two different sites displays twice in the product feed—one time for each site. An item that is
available under multiple categories in one site only shows one time per site under the first category
returned in the search results.
When you choose to display uncategorized items on your website, these items appear in the product
feed. You can set the Show Uncategorized Items preference at Setup > Site Builder > Set Up Web Site
in the Preferences section on the Setup subtab.
Product Feeds and OneWorld
Web store managers who use NetSuite OneWorld can generate a product feed specific to a certain
site or subsidiary. You can also choose which items show in different markets. For example, you could
filter a product feed to only show items from your UK subsidiary and export that product feed to a UK
shopping comparison site.
In NetSuite OneWorld, each product feed includes products from all of your subsidiaries. To create a
product feed for a specific subsidiary, expand the Filters section, and then select a Subsidiary. When
SuiteCommerce Site Builder Guide
Setting Up Website Product Feeds
155
you export the product feed for a specific site and subsidiary, the exported file only includes products
from the site and subsidiary you selected.
To customize a product feed for a particular website or Subsidiary:
1. Go to Setup > Site Builder > Product Feeds.
2. Select a search engine from the list.
3. Click Edit This Search.
4. On the Criteria subtab, add Web Site or Subsidiary to the Filter list.
5. On the Results tab, select the columns you want to display.
6. In the Search Title field, accept the default title, or enter a new title for the search.
7. Click Save.
Now your custom product feed search displays in the list at Setup > Site Builder > Product Feeds.
Yahoo! Shopping
To upload a product feed file to Yahoo! Shopping, you must first create an account with the Product
Submit service, and ensure the information in your NetSuite product feed complies with the
requirements. For more information, read the topics on Product Submit in the Yahoo! Help Center.
After you have exported your product feed data from NetSuite to a spreadsheet, for successful upload
to Yahoo! Shopping, you must save the file as a Tab-Delimited Text file named “data.txt.” For more
information, see Setting Up Website Product Feeds.
To upload your product feed to Yahoo! Shopping Product Submit:
1. Log in to your Yahoo! Shopping Product Submit account.
2. Select the option to upload your file using a browser.
3. Click Browse to find the file on your computer and upload it to Yahoo! Shopping.
It may take several days to process your product feed and display your listings online. Visit
help.yahoo.com for more information.
The table below shows the fields displayed in your NetSuite product feed, and the fields that are
required or recommended by Yahoo! Shopping Product Submit. The fields that appear with an asterisk
are required. Other fields are recommended.
NetSuite
Yahoo! Shopping
Notes
Display Name/
Code
code*
Enter the item's Internal ID.
Go to Home > Set preferences, and check the Show
Internal IDs box to display the Internal ID on the
Store tab of the item record.
Item Name/
Number
name*
The value for this field comes from the Item
Name/Number field on the Item record.
Description
description*
The product feed results display the detailed
description from the Store subtab on the item
record.
SuiteCommerce Site Builder Guide
Setting Up Website Product Feeds
NetSuite
Yahoo! Shopping
Notes
Note: You must remove any control
characters and embedded HTML.
Price
price*
Product feed results in NetSuite display the online
price level as defined on Setup > Site Builder > Set
Up Web Site. If you use NetSuite OneWorld, and
you filter the list by subsidiary, the price displayed
is the default currency for the subsidiary you
selected.
For successful upload to Yahoo Shopping, the price
must be in US dollars, with a decimal point and no
currency symbol.
Product URL
product-url*
The URL displayed in product feed results is the
link to the item in your web store.
Merchant Site
Category
merchant-site-category*
The product feed results display the category on
your website for each product.
Custom Field
medium*
Create a custom field in NetSuite on your item
records for medium. For more information see,
Custom Item Fields. Then, edit the product feed
search for Yahoo!Shopping to include “medium”
as a column. For more information, see Editing
Product Feed Results.
This field is required for Music and Video products
only. Leave this field blank for all other product
types.
Image URL
image-url
The URL displayed in product feed results is the
link to the image associated with the item in your
web store.
MPN
manufacturer-part-no
The manufacturer's unique part number for the
product. Do not include your own SKU.
In NetSuite, you can enter data for this field in the
MPN field on the Basic subtab of the item record.
In-Stock
in-stock
NetSuite displays a value of yes or no based on the
On Hand Quantity of the item.
Shipping Price
shipping-price
The cost of shipping the item anywhere in the
United States in US dollars, with a decimal point
and no currency symbol.
Use 0.00 for free shipping.
You may need to add a value in this field after
exporting the NetSuite product feed results.
Shipping Weight
shipping-weight
The weight of the item in pounds, up to one
decimal place.
The NetSuite product feed results display the value
in the Item Weight field on the Basic tab of the
item record.
NexTag
You must create an account with NexTag to upload your product feed. Visit merchants.nextag.com to
set up an account.
SuiteCommerce Site Builder Guide
156
Setting Up Website Product Feeds
157
You may need to change some column names in the NetSuite product feed results to comply with
requirements from NexTag. For more information, read Editing Product Feed Results.
To upload your product feed file to NexTag:
1. Log in to your NexTag account.
2. On the Partner Dashboard, click Set Listing Options.
3. Choose the option, To display your products on NexTag.
4. For File Format, select Other File Format.
5. For Upload Method, select Upload a Product File from your computer.
6. Click Browse, and then find the file on your computer.
7. Click Update.
The table below shows the fields displayed in your NetSuite product feed, and the fields that are
required or recommended by NexTag. The fields that appear with an asterisk are required. Other fields
are recommended. Visit NexTag's product file specifications page for more information.
NetSuite
NexTag
Notes
Manufacturer
Manufacturer*
This is the brand of the product
Manufacturer's Part #
(SKU)
Manufacturer's Part #
(SKU)*
Use the manufacturer part number or your SKU.
This column displays the value in the MPN field
on item records.
If you sell books, music, or software rename this
column:
■ ISBN for books.
■ MUZE ID for music.
■ DISTRIBUTOR ID for Software products.
Product Name
Product Name*
The value for this field comes from the Item
Name/Number field on the Item record.
Nextag displays product names up to 80
characters long.
Description
Product Description*
The value for this field comes from the Detailed
Description field on the Store Subtab of the Item
record.
Do not use HTML or control characters in the
data feed you send to NexTag. Also, do not use
promotional language such as “free shipping” or
“sale item”.
Item URL
Click-Out URL*
The URL displayed in product feed results is the
link to the item in your web store.
Price
Price*
Product feed results in NetSuite display the online
price level as defined on Setup > Site Builder > Set
Up Web Site. If you use NetSuite OneWorld, and
you filter the list by subsidiary, the price displayed
is the default currency for the subsidiary you
selected.
For successful upload to Yahoo Shopping, the
price must be in US dollars, with a decimal point
and no currency symbol.
SuiteCommerce Site Builder Guide
Setting Up Website Product Feeds
NetSuite
NexTag
Notes
Category
Category: NexTag
Numeric ID*
Enter the appropriate category information in the
NexTag Category field on the Store subtab of the
item record.
Visit NexTag's category codes page for the
complete list of category names.
Image URL
Image URL*
The URL displayed in product feed results is the
link to the image associated with the item in your
web store.
158
Note: NexTag requires that each row in
your product feed file has an image URL.
Shipping
Ground Shipping
This column is used for the flat-rate ground
shipping price. The value entered here in dollars
is displayed with your product listings at NexTag.
Entering zero indicates that the product has Free
Shipping. Any rows that are left blank in your
product feed display shipping as “See Site” on
NexTag.
Stock Status
Stock Status
States whether your product is in stock or not.
Acceptable values for Stock Status:
■ In Stock
■ Out of Stock
Note that marking your products Out Of Stock
does not remove them from NexTag listings.
Weight
Weight
In NetSuite, the product feed results display the
value in the Item Weight field on the Basic tab of
the item record.
NexTag can calculate your shipping based on
weight. If you use UPS, FedEx, DHL, or USPS to
deliver your products, NexTag automatically
displays the correct cost of shipping.
Shopzilla
Use the product feed results in NetSuite to create a datafeed file for Shopzilla's Merchant Listings
Service. You must create an account with Shopzilla to upload the file. Visit merchant.shopzilla.com for
information about pricing and setup.
According to the requirements from Shopzilla, your file must not exceed 1 MB. If it does, you must
submit your product feed in multiple files. Shopzilla processes data feeds every 36 to 48 hours. For the
complete list of requirements from Shopzilla, read Shopzilla's product inventory specifications.
To upload your product feed file to Shopzilla:
1. Log in to your Shopzilla account.
2. Select the Product Listing tool and choose FullList.
3. Browse to the product feed file on your computer to upload the file to Shopzilla.
The table below shows the columns displayed in your NetSuite product feed results and the columns
that are required by Shopzilla. All 15 columns are required in the datafeed. Please note that some
columns, as indicated below, cannot be left blank.
SuiteCommerce Site Builder Guide
Setting Up Website Product Feeds
Do not delete any of the columns or change the order. This causes your datafeed to fail when you try
to submit it.
NetSuite
Shopzilla
Notes
Category
Category ID*
This column must contain data.
Data for this field is mapped from the Shopzilla
Category ID field on the Store subtab on the Item
record.
Shopzilla's category IDs are displayed on Shopzilla's
category list.
Manufacturer
Manufacturer*
Enter data in the Manufacturer field on the Basic
subtab of Item records.
Title
Title*
This column must contain data.
The value for this field comes from the Item Name/
Number field on the Item record.
Description
Description*
The value for this field comes from the Detailed
Description field on the Store Subtab of the Item
record.
Do not use HTML or control characters in the data feed
you send to shopzilla. Also, do not use promotional
language such as “free shipping” or “sale item”.
Link
Product URL*
This column must contain data.
The URL displayed in product feed results is a link to the
item in your web store.
Image
Image URL*
The URL displayed in product feed results is the link to
the image associated with the item in your web store.
SKU
SKU*
This column must contain data.
SKU stands for Stock Keeping Unit and is a unique
designator for each listing in your feed. Each product in
your feed must have a different SKU listed.
Quantity on Hand
Availability*
This field lets your consumers know if the product is
currently available on your website.
Acceptable values for Availability:
■ In Stock
■ Back-Order
■ Pre-Order
■ See Site
■ Out of Stock
■ Limited Qty
■ Special Order
Condition
Condition*
Use this field to designate the state of the product.
Acceptable values for Condition:
■ New
■ Refurbished
■ Used
■ Open Box
■ OEM
SuiteCommerce Site Builder Guide
159
Setting Up Website Product Feeds
NetSuite
Shopzilla
Notes
Shipping Weight
Ship Weight*
This field is used to designate the weight of your
product (in pounds). This field is required if your store's
shipping costs are determined based on an item's
weight.
Shipping Cost
Ship Cost*
This field is used to designate a flat shipping cost for the
product, if desired. This field is not necessary if you plan
to use the Shopzilla Shipping Tool to specify ship costs.
Note:
160
■ To designate free shipping, please use 0.00
■ Shipping cost included in the feed file will override
any rules set using the Shipping Tool on the Business
Services Web site.
Bid*
This is an optional field and recommended only for
those merchants programmatically setting their product
bids.
NetSuite's product feeds results do not include this
column by default. For more information, see Editing
Product Feed Results.
Promotional Code*
This field is used to add promotional text next to your
product.
For a detailed list of valid promotional codes, visit
Shopzilla's product inventory specifications.
NetSuite's product feeds results do not include this
column by default. For more information, see Editing
Product Feed Results.
UPC
UPC*
UPC stands for Universal Product Code. UPC numbers
have 12 digits, and are found with bar codes on product
packaging.
Price
Price*
This column must contain data.
Product feed results in NetSuite display the online price
level as defined on Setup > Site Builder > Set Up Web
Site. If you use NetSuite OneWorld, and you choose a
subsidiary in the list at the bottom of the product feeds
page, the price displayed is the default currency for the
subsidiary.
Shopping.com
You must create an account with Shopping.com to upload your product feed file. Visit
merchant.shopping.com to create an account and view the product feed file specifications.
You may need to change column names in the NetSuite product feed results to comply with
requirements from Shopping.com. For more information, read Editing Product Feed Results.
To upload your product feed file to Shopzilla:
1. Log in to your Shopping.com merchant account.
2. Select the option to upload from your desktop.
3. Click CPC program.
SuiteCommerce Site Builder Guide
Setting Up Website Product Feeds
161
4. Click Product Info.
5. Click Browse to find the product feed file on your computer.
6. Click Continue.
7. Review the conversion of your feed file columns to the columns in the Shopping.com database.
The table below shows the columns displayed in your NetSuite product feed results and the columns
that are required by Shopping.com. The column names that appear below with an asterisk are
required. Other columns are recommended.
NetSuite
Shopping.com
Notes
MPN
mpn*
The manufacturer's unique part number for the
product. Do not include your own SKU.
You can enter data for this field in the MPN field
on the Basic subtab of the item record.
Manufacturer Name
manufacturer*
Brand, manufacturer, or publisher for the product.
Product Name
product name*
The value for this field comes from the Item
Name/Number field on the Item record.
Product Description
product description*
The value for this field comes from the Detailed
Description from the Store subtab on the item
record.
Note: You must remove any control
characters and embedded HTML.
Online Client Price
price*
Product feed results in NetSuite display the online
price level as defined on Setup > Site Builder > Set
Up Web Site. If you use NetSuite OneWorld, and
you choose a subsidiary in the list at the bottom of
the product feeds page, the price displayed is the
default currency for the subsidiary.
Stock Availability
stock*
NetSuite displays a value of yes or no based on the
On Hand Quantity of the item.
Stock Description
stock description*
Use this field to designate the state of the product.
(21 characters maximum.)
For example: “Back ordered 2-3 Weeks,” or “Ships
in 2-3 Days.”
Product URL
product url*
The URL displayed in product feed results is the
link to the item in your web store.
Image URL
image url*
The URL displayed in product feed results is the
link to the image associated with the item in your
web store.
Shopping.com
Categorization
category*
Enter the appropriate category name in the
Shopping.com Category field on the Store subtab
of the item record.
Visit Shopping.com's category page to download
the taxonomy guide.
Ground Shipping
shipping rate*
NetSuite product feed results display the value
in the Shipping Cost field on the Basic tab on the
item record.
SuiteCommerce Site Builder Guide
Setting Up Website Product Feeds
NetSuite
Shopping.com
162
Notes
Note: Use 0 to denote free shipping.
Weight
shipping weight
The weight of the item in pounds.
In NetSuite, the product feed results display the
value in the Item Weight field on the Basic tab of
the item record.
Google Base
Important: Google Base has been retired. However, you can use the information below to
create a saved item search that you can export and use as a product feed. Visit the help page
on the Google Merchant Center website for more information about the data feed submission
process and specific requirements.
Use the saved search provided by NetSuite to create a product feed you can upload to Google
Shopping. You may need to create custom fields, and then customize the saved search to comply with
the latest requirements from Google Shopping. For more information about editing the saved search,
see Editing Product Feed Results.
Google Shopping requires that you enter data in the id and description columns of the product feed.
■ In NetSuite, the id column is blank by default. Enter the item's Internal ID after your product feed
has been exported to a spreadsheet and before you turn it into a tab-delimited text file. To display
the Internal ID on the Store tab of the item record, go to Home > Set preferences, and check the
Show Internal IDs box.
■ In NetSuite, the description column shows information from the Detailed Description field on the
Store subtab of item records.
The table below shows the columns in your NetSuite product feed, and some of the columns that may
be required or recommended by Google Shopping. The column names that appear below with an
asterisk are required. The other columns are recommended.
NetSuite
Google Base
Note
id
id*
Enter the item's Internal ID.
Go to Home > Set preferences, and check the Show
Internal IDs box to display the Internal ID on the Store tab
of the item record.
By default, the value for this field comes from the Item
Name/Number field on the Item record. For more
information, see Editing Product Feed Results
title
title*
The value for this field comes from the Item Name/
Number field on the Item record.
description
description*
The product feed results display the detailed description
from the Store subtab on the item record.
Note: You must remove any control characters and
embedded HTML.
product_type
product_type
The product feed displays the tab > category where you
publish the item on your website.
SuiteCommerce Site Builder Guide
Setting Up Website Product Feeds
NetSuite
Google Base
Note
link
link*
The URL displayed in product feed results is the link to the
item in your web store.
image_link
image_link*
The URL displayed in product feed results is the link to the
image associated with the item in your web store.
condition
condition*
Use this field to designate the state of the product.
price
price*
Product feed results in NetSuite display the online price
level as defined on Setup > Site Builder > Set Up Web
Site. If you use NetSuite OneWorld, and you choose a
subsidiary in the list at the bottom of the product feeds
page, the price displayed is the default currency for the
subsidiary.
brand
brand
Add the brand name of the product. This attribute is
required for some types of products.
163
Using the Sitemap Generator in Site Builder
Use the Sitemap Generator to create an XML site map file for search engine optimization (SEO) and to
create an HTML version of the site map to display on your Site Builder website.
■ The XML file lists a URL for each tab, category, and item published to your website, along with
additional information about the priority of each page and how often the site map changes. You can
also include HTML pages that are hosted in the file cabinet.
■ The HTML file displays links to each tab and category on your site. Publish the HTML site map on
your website to help visitors navigate.
NetSuite's Sitemap Generator creates your site map files and then automatically places them in the
Web Site Hosting Files folder in the file cabinet. You receive an email notification when the process is
complete.
Note: To use the Sitemap Generator, you must enable the Host HTML Files feature. An
Administrator can go to Setup > Company > Enable Features. Click the Web Presence subtab,
and then check the Host HTML Files box.
Please review the following topics for details about how to use the Sitemap Generator:
■ Learn how to generate a site map by reading Generating a Site Map in Site Builder.
■ Learn how to guide visitors around your website by displaying an HTML version of your site map.
For more information read, Displaying an HTML Site Map on Your Website.
■ Read Notifying Search Engines to understand how to inform various search engines about the
location of your site map.
■ Understand how to set the priority of certain URLs in your site map, and exclude other URLs by
reading Assigning Site Map Priority and Excluding URLs from the Site Map.
Generating a Site Map in Site Builder
For Site Builder, the Sitemap Generator can create a site map in XML and HTML file formats. After
the site map is generated, it is placed in the Web Site Hosting Files folder that you designate. If your
SuiteCommerce Site Builder Guide
Using the Sitemap Generator in Site Builder
164
website has more than 50,000 URLs, multiple site map files are created with an index file that points to
each of them.
To generate a site map:
1. Go to Setup > Site Builder > Web Site Management > Sitemap Generator.
2. Select the site in the Web Site field, if you use the Multiple Web Sites feature.
3. In the Destination Folder list, select a folder to hold your site map.
This list only includes subfolders of the Web Site Hosting Files folder. Place the site map in the
root folder (highest level folder) of your website. By default, the root folder of a NetSuite website
is Web Site Hosting Files : Live Hosting Files.
If you have multiple websites, the site map for each website belongs in each site's root folder.
4. In the File Name field, enter a name for your site map file.
5. In the Index File Name field, enter the name for your site map index file.
6. Choose a file format for your site map or check both boxes to generate the site map in both XML
and HTML format at the same time.
■ XML Format - Generates a site map in XML format to submit to search engines.
■ HTML Format - Generates a site map in HTML format for hosting on your website. Note that
only links to tabs and categories are included.
7. Check the box, Include Hosted Pages to include HTML pages displayed on your site:
■ The XML site map includes all hosted pages, tabs, and categories you display on your website.
■ The HTML site map includes your hosted home page, hosted tabs, presentation tabs, and
categories displayed on your website.
8. Use the Number of Columns in HTML Format field to designate how many columns you want to
display in the HTML version of the site map for display on your website.
9. In the XML Options section, select the appropriate attributes for your XML site map.
■ Change Frequency – Sets the attribute in the <changefreq> tag which defines how often you
change your website pages. Search engines scan for this information when they index your
site.
Note: You must click Submit on the Site Generator page to update your site map.
■ Last Modified – Sets the attribute in the <lastmod> tag which defines, for search engines, the
date each page most recently changed.
Note: The Last Modified Date attribute defines the most recent date that a change
occurred on a page. This value includes changes to items and categories on a page.
■ Priority – Sets the attribute in the <priority> tag which defines the relative importance of each
page as compared to other pages of your site. You can select a priority ranging from 0.0 to
1.0 on item, category, and tab records. For more information, see Assigning Priority to Certain
URLs.
10. In the Email Address field, enter the email address where you want to be notified after the
generator completes.
11. Click Submit.
The Sitemap Generator sends an email message after your site map files are created. The message
contains a list of the site map files that were generated and indicates where they are located in your file
cabinet.
SuiteCommerce Site Builder Guide
Using the Sitemap Generator in Site Builder
165
Also included in the email message are the links you must click to notify search engines that your site
map has changed. Note that Google, Bing, and Yahoo! require that you register with them before they
accept updates to your site map. For more information, see Notifying Search Engines.
Customizing Your Site Map
Note that after your site map files appear in the file cabinet, you can modify them. For example, you
may want to customize the HTML site map so the look and feel is consistent with the rest of your
website.
To edit a site map file, download the file on to your computer, and use your favorite XML or HTML file
editing application to modify the file. When you are finished, click Add File in the hosting root folder of
the file cabinet to replace the original site map file.
Note: For more customization options, you can use Web site attribute tags in
the HEAD element of site map files in HTML format. You can use any attribute
from the item or site category record. Use the syntax in the example below: <
%=getCurrentAttribute(‘item',‘canonicalurl')=%>
Displaying an HTML Site Map on Your Website
When you use the Sitemap Generator to create an HTML version of your site map, the file is placed in
the hosting root folder you selected on the Sitemap Generator page. You can create a hosted tab on
your website to display the HTML site map, or you can create a link to the HTML site map by adding an
href on your website, that targets the HTML file.
Note that the HTML version of your site map only shows the top three levels in the hierarchy of
categories displayed on your site. For example, the HTML site map would show:
■ the parent category
□ the first subcategory
▬ the second subcategory
Subcategories beyond the third level are not included in the HTML site map. URLs that point to all
subcategories are included in the XML version of your site map.
To display an HTML site map on a website tab:
1. Go to Lists > Web Site > TabsLists > Site Builder > Tabs.
2. Click New.
3. Click the New Hosted subtab.
4. In the Label field, enter a name for the tab.
5. In the Web Site Page list, select the HTML site map file from the hosting root folder in the file
cabinet.
After you choose a file in the Web Site Page list, the Link URL field automatically displays a
relative URL for the file.
6. Click Save.
Now you can click the new tab in your website to see the HTML page with links to each tab and
category on your site.
SuiteCommerce Site Builder Guide
Using the Sitemap Generator in Site Builder
166
To display a link to the HTML site map:
1. Go to the hosting root folder where your site map exists in the file cabinet, for example, Web Site
Hosting Files > Live Hosting Files.
2. Click Edit next to the HTML site map file.
3. Use one of the URLs that begin with http:// to create a hyperlink.
For example, <a href=”http://www.wolfeelectronics.com/Sitemap.html”>View
Sitemap</a>
To display the link to the site map in the footer on every page of your website, paste the link in the
Footer Template field of the site theme applied to your site, at Setup > Site Builder > Themes. For more
information about site themes, see Customizing Site Themes.
Notifying Search Engines
After you generate a site map, you must notify search engines that your site map has been updated.
You can use the same approach to notifying search engines with both Site Builder and SuiteCommerce
Advanced websites. Google and Bing require that you register with them before you submit the first
version of your site map. Use the following links to register your site map:
■ Google
■ Bing
Each time you generate a new site map, you can notify each search engine by clicking the links included
in the email message sent from the Sitemap Generator.
Assigning Site Map Priority and Excluding URLs from the
Site Map
You can define the relative importance of each URL in your website as compared to other URLs in your
site. In this way you can guide search engine web crawlers to the most important pages as they index
your site. Alternatively, you can exclude certain URLs from your site map, when those pages are under
construction.
Excluding Certain URLs from the Site Map
You may want to exclude a tab, category or item page from the site map while you are finalizing the
design. You can do this by checking the Exclude from Sitemap box. This check box is also available to
use with mass update and saved search, so you can update several records at the same time.
Assigning Priority to Certain URLs
Use the Sitemap Priority list to indicate the relative importance of your website URLs. You can select a
priority ranging from 0.0 to 1.0 on item, category, and tab records.
SuiteCommerce Site Builder Guide
Using the Sitemap Generator in Site Builder
167
NetSuite assigns a default priority “Auto” to all new and existing tab, category and item records in
your account. The Sitemap Generator translates the default priority into a number for the priority
attribute when you generate your site map. The priority is calculated based on the position of the item
or category in the hierarchy of your website.
For example, your website tabs automatically generate a default priority value of 1.0 because they are
top level pages. A category published to a tab gets a priority of 0.5. An item published to a category on
a tab gets a priority of 0.3.
You can select a different value in the Sitemap Priority list to override the default “Auto” priority.
NetSuite uses the value you set when you generate the site map. Sitemap Priority is also available to
use with mass update and saved search, so you can change the value on several records at the same
time.
Assigning a high priority to all of the URLs on your site is not likely to affect the ranking of your site in a
search engine's result pages. Search engines may use the priority you set when indexing URLs as they
crawl your site. Set a Sitemap Priority to increase the probability that your most important pages are
indexed.
SuiteCommerce Site Builder Guide
Site Builder Website Reports and Analytics
168
Site Builder Website Reports and Analytics
■ Page Hit Reports
■ Web Sales Reports
■ Keyword and Referrer Reports
■ Web Activity Reports
■ Internal Search Reports
■ Using Tracking Pixels for Analytics
■ Customer Web Activity
Page Hit Reports
The following reports show the number of page views you receive on your site:
■ Hosted Page Hits by Customer Report
■ Page Hits by Customer Report
■ Hosted Page Hits Detail Report
■ Hosted Page Hits Report
■ Page Hits Report
■ Page Hits by Category Report
■ Page Hits Detail Report
Hosted Page Hits by Customer Report
The Hosted Page Hits by Customer report shows you the number of hits the pages hosted in your
NetSuite File Cabinet receive by customer. This report also shows the date of each customer's last visit
to your web store. You can use this report to see how often customers visit pages you host in your file
cabinet.
When a customer visits your website, they are assigned a unique cookie that does not expire.
Whenever that same visitor visits a page on your website, a hit is counted for that visitor.
For example, the web store manager for Wolfe Electronics hosts a Weekly Ad HTML page in the
NetSuite File Cabinet. The manager uses this report to see which customers have not returned to view
this page in over a month. Then, the manager can recommend sending email to these customers that
include Wolfe's weekly advertisement.
To see the Customer Hosted Page Hits report:
Go to Reports > Web Presence > Hosted Page Hits by Customer.
Page Hits by Customer Report
The Page Hits by Customer report shows you the number of hits your web store receives by customer.
This report also shows the date of each customer's last visit to your web store. You can use this report
to see how often customers visit your website.
SuiteCommerce Site Builder Guide
Page Hit Reports
169
When a customer visits your website, they are assigned a unique cookie that does not expire.
Whenever that same visitor visits a page on your website, a hit is counted for that visitor.
To see the Customer Page Hits report:
Go to Reports > Web Presence > Page Hits by Customer..
Hosted Page Hits Detail Report
The Hosted Page Hits report shows you the number of hits the pages you host in your NetSuite File
Cabinet receive by customer. This report also shows the date of each customer's last visit to your web
store. You can use this report to see which pages specific customers hit most often.
When a customer visits your website, they are assigned a unique cookie that does not expire.
Whenever that same visitor visits a page on your website, a hit is counted for that visitor.
For example, the web store manager for Wolfe Electronics uses this report to see which customers hit
the Weekly Ad page, which is hosted in the file cabinet, most often.
To see the Hosted Page Hits Detail report:
Go to Reports > Web Presence > Hosted Page Hits Detail.
Hosted Page Hits Report
The Hosted Page Hits report shows you the number of hits the pages you host in your NetSuite File
Cabinet receive. This report also shows you the number of unique visitors hitting each page. You can
use this report to see the most often hit pages in your web store.
When a customer visits your website, they are assigned a unique cookie that does not expire.
Whenever that same visitor visits a page on your website, a hit is counted for that visitor.
For example, the web store manager for Wolfe Electronics uses this report to see how often customers
hit the Weekly Ad page, which is hosted in the file cabinet.
To see the Hosted Page Hits report:
Go to Reports > Web Presence > Hosted Page Hits.
Page Hits Report
The Page Hits report shows the number of hits your website receives by page. This report also shows
the number of unique visitors that touched each page. You can use this report to see the pages hit
most often.
When a customer visits your website, they are assigned a unique cookie that does not expire.
Whenever that same visitor visits a page on your website, a hit is counted for that visitor.
For example, a web store manager can use this report to see how often customers view the Featured
Items page on an ecommerce site.
To see the Page Hits report:
Go to Reports > Web Presence > Page Hits..
SuiteCommerce Site Builder Guide
Page Hit Reports
170
Note: This report logs hits that return 404 Not Found error responses.
Page Hits by Category Report
The Page Hits by Category report shows you the number of hits your web store items receive by
category. This report also shows you the number of unique visitors hitting each category and item. You
can use this report to see the most often viewed items in your web store.
When a customer visits your website, they are assigned a unique cookie that does not expire.
Whenever that same visitor visits a page on your website, a hit is counted for that visitor.
For example, the web store manager for Wolfe Electronics uses this report to see which items are most
often viewed on the Specials page in the Wolfe Electronics web store.
To see the Page Hits by Category report:
Go to Reports > Web Presence > Page Hits by Category.
Page Hits Detail Report
The Page Hits Detail report shows you the number of hits your website pages receive by customer. This
report also shows the date of each customer's last visit to your web store. You can use this report to
see which pages specific customers hit most often.
When a customer visits your website, they are assigned a unique cookie that does not expire.
Whenever that same visitor visits a page on your website, a hit is counted for that visitor.
For example, the web store manager for Wolfe Electronics uses this report to see which customers hit
the Specials page in the Wolfe Electronics web store most often.
To see the Page Hits Detail report:
Go to Reports > Web Presence > Page Hits Detail.
Web Sales Reports
The following reports provide you with data on the sales you receive from your website:
■ Item Orders Report
■ Item Orders by Category Report
■ Item Orders Detail Report
■ Item Page Views and Sales Summary Report
Item Orders Report
The Item Orders report shows the numbers of items ordered, the number of orders places for each
item and the number of unique customers who ordered each item.
You can use this report to know the items you sell the highest quantity of, the items customers order
most often and the number of customers who have purchased each item.
To see the Item Orders report:
Go to Reports > Web Presence > Item Orders.
SuiteCommerce Site Builder Guide
Web Sales Reports
171
Item Orders by Category Report
This report shows the numbers of items ordered, the number of orders places for each item and the
number of unique customers who ordered each item by website category.
You can use this report to know which items sell the most in each website category.
To see the Item Orders by Category report:
Go to Reports > Web Presence > Item Orders by Category..
Item Orders Detail Report
The Item Orders report shows the number of items ordered by item, the customer who ordered the
item, and the date when the item was last ordered.
To see the Item Orders Detail report:
Go to Reports > Web Presence > Item Orders Detail.
Item Page Views and Sales Summary Report
The Item Page Views and Sales Summary report shows you the number of pages views, orders, items
sold and revenue by item. Use this report to understand which pages are being visited and which items
are being sold.
To see the Item Page Views and Sales Summary report:
Go to Reports > Web Presence > Item Page Views and Sales Summary.
Keyword and Referrer Reports
The reports listed below provide information on how visitors get to your site. You must use the
Advanced Web Reports feature to see these reports.
To turn on Advanced Web Reports, an Administrator can go to Setup > Company > Enable Features.
Click the Web Presence tab, and then check the Advanced Web Reports box.
■ Keywords Detail Report
■ Keywords Summary Report
■ Referrer Detail Report
■ Referrer Summary Report
Keywords Detail Report
The Keywords Detail report tracks the search keywords and phrases your visitors used to find your
website on each of their visits. NetSuite records the exact keyword phrase used by each customer
when they find your site through a search engine.
The report tells you the number of sales for each customer using a keyword or keyword phrase
and exactly how much money was generated from each keyword per customer. This can help you
determine which keywords you might want to advertise with through a search engine.
SuiteCommerce Site Builder Guide
Keyword and Referrer Reports
172
To track paid keywords, you must create a keyword marketing campaign. You can then include the
campaign ID parameter in the URL you provide to the search engine service.
Note: The Keywords Detail report includes both natural and paid keywords. To filter this
report by natural or paid keywords, you must customize the report to include the Campaign ID
component. Only paid keywords have a campaign ID.
To see the Keywords Detail report:
Go to Reports > Web Presence > Keywords Detail.
Keywords Summary Report
The Keywords Summary report tracks the search terms your visitors used to find your website.
NetSuite records both the referring URL and the exact search keyword phrases your customers used
each time they visited your site.
The report tells you exactly how much money was generated from each keyword, how many visitors
submitted information that created lead records, and how many visitors made purchases. It then
calculates revenue per visitor and revenue per customer, which provides ROI analysis.
Note: Data for this report may differ from data you receive using Google Analytics. Instead
of counting hits for the exact keyword phrase, Google reports hits for the phrase and for each
keyword in the phrase.
For example, John Rogers searches for printer cartridges in Google. From his search results, Rogers
navigates to Wolfe Electronics. The Wolfe Electronics' Keywords Summary reports show this customer
searched for the keywords printer cartridge one time he visited your site, and he searched for hard
drive on another visit.
For optimal usage, you can filter this report by referrer. This lets you display revenue and conversion
information related to each keyword by referrer.
To track paid keywords, you must create a keyword marketing campaign. You can then include the
campaign ID parameter in the URL you provide to the search engine service.
Note: The Keywords Detail report includes both natural and paid keywords. To filter this
report by natural or paid keywords, you must customize the report to include the Campaign ID
component. Only paid keywords have campaign IDs.
To see the Keywords Summary report:
Go to Reports > Web Presence > Keywords Summary.
The table below displays the Keywords Summary report columns and their descriptions:
Column Name
Description
Keywords
Search keyword used to find your site.
Last Visit
Date of last visit with a keyword.
Visits
Number of visits to the site.
Number of Visitors
Number of visitors who searched with a keyword.
Number of Leads
Number of registered visitors who used the keyword.
SuiteCommerce Site Builder Guide
Keyword and Referrer Reports
Column Name
Description
Number of Purchasers
Number of visitors who placed orders on the site.
Total Revenue
Total sales that resulted from a keyword.
Revenue per Visitor
Calculated by dividing revenue by the number of visitors.
Revenue per Purchaser
Calculated by dividing revenue by the number of visitors who made a
purchase.
Conversion
Calculated by dividing number of visitors by the number of
purchasers.
173
Referrer Detail Report
This report shows the domain of the website each visitor navigated from to get to your site. This lets
you understand which websites lead the most customers to you, helping you to better manage your
marketing efforts.
To see the Referrer Detail report:
Go to Reports > Web Presence > Referrer Detail.
Referrer Summary Report
This report shows the domain of the websites your visitors navigated from to get to your site. This lets
you understand which websites lead the most customers to you, helping you to better manage your
marketing efforts.
This report displays revenue and conversion information related to each referrer. The report tells you
exactly how much is generated by each referrer and how many visitors were converted to customers. It
also calculates revenue per visitor and revenue per customer, providing ROI analysis.
The table below displays the Referrer Summary report columns and their descriptions:
Column Name
Description
Referrer
Domain of the referrer site.
Last Visit
Date of the last visit from the referrer site.
Visits
Number of visits from the referrer site.
Number of Visitors
Number of visitors from the referrer site.
Number of Leads
Number of registered visitors from the referrer site.
Number of Purchasers
Number of visitors who have placed orders on your site.
Total Revenue
Amount of paid sales transactions on your site.
Revenue per Visitor
Revenue/Number of visitors
Total = average of lines above
Revenue per Purchaser
Revenue/Number of visitors who placed an order on your site
Total = average of lines above
Conversion
Number of visitors/Number of purchasers
Total = average of lines above
SuiteCommerce Site Builder Guide
Keyword and Referrer Reports
174
To see the Referrer Summary report:
Go to Reports > Web Presence > Referrer Summary.
Web Activity Reports
The following reports show data on the actions performed by individual site visitors:
■ Visitor Activity Summary Report
■ New Visitor Report
■ Lead Conversion Report
■ Visitor Activity Detail Report
■ Shopping Activity Analysis Report
■ Shopping Activity Analysis by Category Report
■ Shopping Cart Abandonment Report
■ Customer Web Activity
Visitor Activity Summary Report
The Visitor Activity Summary report shows how many visitors viewed your site, how often each visited
and how many pages each visitor viewed. You must use the Advanced Web Reports feature to see this
report.
To turn on Advanced Web Reports, an Administrator can go to Setup > Company > Enable Features.
Click the Web Presence tab, and then check the Advanced Web Reports box.
Data is separated into new visitors, returning visitors and total visitors. For each visitor group (new or
returning), you can view the following:
■ How many visited more than one time
■ The average number of visits per day
■ The average number of visits per person
■ The number of page views
■ The average number of page views per person
Note: Site visitors who do not have cookies enabled are counted as new visitors for every page
they view on your site. This can result in a large discrepancy with other site analytics tools you
may be using, which do not count visitors with cookies disabled.
To see the Visitor Activity Summary report:
Go to Reports > Web Presence > Visitor Activity Summary.
New Visitor Report
The New Visitor report distinguishes first time visitors from return visitors and provides separate
information for each. This shows you the visitor's first visit during a time frame and if it is his or her
first visit overall. You must use the Advanced Web Reports feature to see this report.
SuiteCommerce Site Builder Guide
Web Activity Reports
175
To turn on Advanced Web Reports, an Administrator can go to Setup > Company > Enable Features.
Click the Web Presence tab, and then check the Advanced Web Reports box.
Note: Site visitors who do not have cookies enabled are counted as new visitors for every page
they view on your site. This can result in a large discrepancy with other site analytics tools you
may be using, which do not count visitors with cookies disabled.
To see the New Visitor report:
Go to Reports > Web Presence > New Visitor.
Lead Conversion Report
The Lead Conversion report shows the percentage of new and returning website visitors who register
with you and are converted to customers. You must use the Advanced Web Reports feature to see this
report.
To turn on Advanced Web Reports, an Administrator can go to Setup > Company > Enable Features.
Click the Web Presence tab, and then check the Advanced Web Reports box.
This report includes the following columns:
■ Visitors (V) – this column shows the total number of new and returning website visitors.
■ Leads (L) – this column shows the number of new and returning visitors who registered with your
website but have not yet purchased from you. These visitors have lead records.
■ Customers (C) – this column shows the number of new and returning website visitors that have
purchased from you. These visitors have customer records.
■ L/V Conversion – this column shows the percentage of visitors who registered on your website but
have not yet purchased.
■ C/V Conversion – this column shows the percentage of website visitors have purchased from you.
■ C/L Conversion – this column shows the percentage of leads have purchased and been converted
to customers.
Note: Site visitors who do not have cookies enabled are counted as new visitors for every page
they view on your site. This can result in a large discrepancy with other site analytics tools you
may be using, which do not count visitors with cookies disabled.
To see the Lead Conversion report:
Go to Reports > Web Presence > Lead Conversion.
Visitor Activity Detail Report
The Visitor Activity Detail report distinguishes first time visitors from return visitors, listing the names of
registered leads or customers. You must use the Advanced Web Reports feature to see this report.
To turn on Advanced Web Reports, an Administrator can go to Setup > Company > Enable Features..
Click the Web Presence tab, and then check the Advanced Web Reports box.
The date of last visit is given, and the number of visits and page views displays per registered visitor.
Unregistered customer data is totaled under -No Entity-.
SuiteCommerce Site Builder Guide
Web Activity Reports
176
Note: Site visitors who do not have cookies enabled are counted as new visitors for every page
they view on your site. This can result in a large discrepancy with other site analytics tools you
may be using, which do not count visitors with cookies disabled.
To see the Visitor Activity Detail report:
Go to Reports > Web Presence > Visitor Activity Detail.
Shopping Activity Analysis Report
The Shopping Activity Analysis report shows you how many times your items have been added to
a shopping cart from the item list view and item view, how many items total have been placed in a
shopping cart from the item list view and item view, and how many orders you've received by item.
Use this report to decide what items your customers are placing in their shopping carts but not
purchasing and what area of your site customers use to place items in the cart.
The following abbreviations are used in column headings for this report:
■ LV – List View
■ IV – Item View
To see the Shopping Activity Analysis report:
Go to Reports > Web Presence > Shopping Activity Analysis.
Shopping Activity Analysis by Category Report
The Shopping Activity Analysis report shows you how many times your items have been viewed, how
many have been placed in shopping carts and how many orders you've received by category. Use this
report to decide what items your customers are placing in their shopping carts but not purchasing.
To see the Shopping Activity Analysis by Category report:
Go to Reports > Web Presence > Shopping Activity Analysis by Category..
Shopping Cart Abandonment Report
This report helps you analyze the effectiveness of your checkout process and alerts you to changes in
buying patterns. The cart abandonment report shows accurate data in each column for a time span up
to one month. Data for carts that did not convert into checkout are deleted after one month.
This report includes the following columns:
■ Carts Created – The total number of times a shopper placed at least one item to the shopping cart.
■ Checkouts Created – The total number of times a shopper began the checkout process by clicking
the Proceed to Checkout button.
■ Orders – The number of times a shopper submitted an order.
■ Qty. Added to Cart – The total number of items added to shopping carts.
■ Qty. Added to Checkout – The total number of items in shopping carts that begin the checkout
process.
■ Qty. Ordered – The number of items ordered in the report time frame.
SuiteCommerce Site Builder Guide
Web Activity Reports
177
■ Pct Qty Ordered/Cart Additions – The number of items in orders submitted, divided by the number
of items added to shopping carts.
■ Pct Qty Ordered/Checkout Additions – The total number of items successfully ordered through
checkout divided by the number of items that begin the checkout process.
■ Pct Checkout Abandonment – The number of checkouts created minus orders submitted, divided
by the number of checkouts created.
■ Pct Cart Abandonment – The number of carts created minus orders submitted, divided by carts
created.
To see the Shopping Cart Abandonment report:
Go to Reports > Web Presence > Shopping Cart Abandonment.
Customer Web Activity
You can monitor how customers use your website on their individual customer records. This helps you
sell to customers by knowing the different items they have viewed and purchased, as well as knowing
how they were referred to your store. The following information appears on the Web Activity subtab of
the customer record:
■ Referring website and search engine keywords
■ Shopping cart contents
■ Customer's click-stream navigation of your site
■ Last page visited
■ Number of visits
■ Date of first and last visit
■ Page hits
■ Hosted Page hits
■ Items your customer has ordered
To work with customer records, go to Contacts > Contacts > Customers.
Internal Search Reports
The Internal Search Summary and Detail reports show data for the items visitors searched for while
viewing your site. You must use the Advanced Web Reports feature to view these reports.
To turn on Advanced Web Reports, an Administrator can go to Setup > Company > Enable Features.
Click the Web Presence tab, and then check the Advanced Web Reports box.
■ Internal Search Summary Report
■ Internal Search Detail Report
Internal Search Summary Report
This report lets you see which keywords site visitors are using to search within your site and what
search results are being returned. When a search returns no results, the keyword is highlighted in your
report.
In addition, this report calculates the conversion rate of searching site visitors who make purchases.
SuiteCommerce Site Builder Guide
Internal Search Reports
178
To see the Internal Search Summary report:
Go to Reports > Web Presence > Internal Search Summary.
Internal Search Detail Report
This report lets you see which keywords site visitors are using to search within your site and what
search results are being returned. The detailed report itemizes shoppers that use each keyword and
how many queries each shopper submitted with a keyword.
You can click a shopper's name to view that person's lead, prospect or customer record. Internal search
queries are saved on the Web subtab of these records.
To see the Internal Search Detail report:
Go to Reports > Web Presence > Internal Search Detail..
Using Tracking Pixels for Analytics
You can use tracking pixels on your website pages to gather data from visitors and customers on your
site. This enables you to use third-party analytics tools for analyzing visitor traffic.
NetSuite web store merchants most commonly use Google Analytics as an external reporting tool.
Read the following topics for more information:
■ Working with Google Analytics
■ Web Analytics and Online Forms
Working with Google Analytics
Google Analytics is a third party analytics solution that can help you evaluate traffic on your website
using data based on visitor tracking information. You can use this information to optimize your site
content and ad campaigns.
Important: Procedures for setting up and using Google Analytics as described in this section
do NOT apply when configuring Google Analytics for Advanced SuiteCommerce Web Sites using
the Reference Implementations. For information on using Google Analytics in these sites, see
Google Analytics for Reference Implementations.
To integrate your NetSuite website with Google Analytics:
1. Prerequisite steps:
1.
Create your own account with Google Analytics. For more information, visit the Google
Analytics Web site.
2.
In Google Analytics, add a profile for the domain you want to track.
3.
On the Standard tab, select multiple top-level domains.
4.
Copy the tracking pixel code provided for you by Google Analytics.
5.
Click Save and Finish.
6.
In the Website Profiles list, click Edit next to the profile you want to enable.
7.
On the Profile Settings page, click Edit next to Main Website Profile Information.
8.
Set the E-Commerce Website radio button to Yes.
SuiteCommerce Site Builder Guide
Using Tracking Pixels for Analytics
9.
179
Click Save Changes.
2. Log in to NetSuite.
3. Go to Setup > Site Builder > Set Up Web Site. Click the Analytics subtab to enter your tracking
snippet, along with HTML code and website tags for tracking analytics data.
Important: If you have a hosted site, paste your Google Analytics tracking snippet in
your hosted HTML pages. Then, enter custom analytics tracking code in the Analytics
Click Attributes, Analytics Submit Attributes, and Order Tracking Script HTML fields.
When you do this, website tags you use to create links to forms and checkout pages will
collect tracking data across domains.
1.
Addition to <head> – Paste your Google Analytics tracking snippet in this field. Your
tracking code is then added to every page of your NetSuite-generated site.
For example:
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-12345678-9]);
_gaq.push(['_setDomainName', 'none']);
_gaq.push(['_setAllowLinker', true]);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google
-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
SuiteCommerce Site Builder Guide
Using Tracking Pixels for Analytics
180
</script>
2.
Analytics Click Attributes – Add attributes for the Add To Cart button. The code in this
field modifies link URLs by adding your tracking pixel. This applies to links for registration,
checkout, and any other links that go to checkout pages. Use this syntax:
onclick="if(typeof(_gaq._getAsyncTracker) == 'undefined') { return true; } else { _gaq.push(['_
link', this.href]); return false; }"
3.
Analytics Submit Attributes – Add attributes for the Proceed to Checkout button. Code
in this field captures analytics data when shoppers go to checkout from the shopping
cart, and when they submit forms on your website. Use this syntax:
onsubmit="_gaq.push(['_linkByPost', this]); return true;"
4.
Order Tracking Script HTML – Code in this field, is applied to the order confirmation
page, or Thank You page, that displays after a shopper submits a Web order on your site.
You can use the sample code provided below to get started. Replace the account number
in the sample, with your own Google Analytics account number:
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-12345678-9']);
_gaq.push(['_setDomainName', 'none']);
_gaq.push(['_setAllowLinker', true]);
_gaq.push(['_addTrans',
"<%=getCurrentAttribute('confirmation','ordernumber')%>",
"<%=getCurrentAttribute('site','name')%>",
"<%=getCurrentAttribute('confirmation','subtotal')%>",
"<%=getCurrentAttribute('confirmation','tax')%>",
"<%=getCurrentAttribute('confirmation','shipping')%>",
"<%=getCurrentAttribute('confirmation','shiptocity')%>",
"<%=getCurrentAttribute('confirmation','shiptostate')%>",
"<%=getCurrentAttribute('confirmation','shiptocountry')%>"]);
var itemsInOrder = "<%=getCurrentAttribute('confirmation','orderitems')%>";
var lineItem = itemsInOrder.split("||");
for(var inum = 0; inum < lineItem.length; inum++)
{
var itemAttributes = lineItem[inum].split("|");
_gaq.push(['_addItem',
"<%=getCurrentAttribute('confirmation','ordernumber')%>",
itemAttributes[0],
itemAttributes[1],
itemAttributes[2],
itemAttributes[3],
itemAttributes[4]]);
}
_gaq.push(['_trackTrans']);
SuiteCommerce Site Builder Guide
Using Tracking Pixels for Analytics
181
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google
-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
For more information on the website tags you can use in this field, see Order
Confirmation Attributes.
4. Check the Enable Google Analytics Integration box.
Check this box to pass Google tracking cookies from shopping to checkout. This along with
the fields on the Analytics subtab are required for cross-domain analytics tracking to integrate
NetSuite with your Google Analytics account. Clear this box if Google Analytics Integration
interferes with a custom solution you have already implemented for cross-domain tracking.
5. Click Save.
After adding your tracking code to the site, you can verify data is being captured on the order
confirmation page. Place a test order, and then on the Thank You page, select View Source from the
View menu in the browser. You should see values for each tag included in the script you added to the
Order Script Tracking HTML field.
You can also use website tags for tracking visitor information on the checkout tab. For more
information, see Checkout Attributes.
Web Analytics and Online Forms
NetSuite lets you SCIS does not support the Remove Item when out of stock option. SCIS follows the
same rules as SCA for Out of Stock Behavior options. For more information, read , and . capture web
analytics from visitors who use online forms published on your website.
Use the getOnlineFormLinkHtml() tag in an href attribute to display a link to the online form on your
website. Using the tag ensures the web analytics data is tracked properly. Note that the form's internal
ID is passed in the tag. In the example below, the internal ID is 2.
<%=getOnlineFormLinkHtml(2)%>Click here for online form</a>
For more information about using the getOnlineFormLinkHtml() tag, in addition to other tags on your
website, see Tags for Use in HTML Pages and Site Templates.
For information on finding the internal ID, see How do I find a record's internal ID?
SuiteCommerce Site Builder Guide
Scriptable Cart
182
Scriptable Cart
Web store merchants and SuiteScript developers can use SuiteScript to invoke client scripts on the
sales order form used for web orders. Note, that SuiteScript is not available for use in web store
registration. You can use an SSP application to customize a website registration page. For more
information, see the help topic SSP Application Overview.
To use Scriptable Cart, an administrator must enable the following features: Advanced Site
Customization, and Client SuiteScript.
Getting Started with Scriptable Cart
To get started with Scriptable Cart:
1. First determine what you want to achieve in the shopping cart.
The topic, Sample Scripts for Scriptable Cart includes several sample scripts for various web
store shopping scenarios. You can use the sample scripts provided and substitute data from
your account.
2. Write the script.
Read SuiteScript for Scriptable Cart for information regarding the client and user event
functions you can use in scripts deployed in the web store shopping cart.
Read Creating Customer-Facing Messages from Scriptable Cart to understand options for
communicating with visitors on your website using website tags created specifically for
Scriptable Cart.
3. Test your script.
NetSuite recommends that you test your script thoroughly before releasing it onyour web store
shopping cart. For more information, see Testing and Debugging Scriptable Cart.
4. Deploy your script to the shopping cart.
For more information, see Deploying and Running Scriptable Cart.
SuiteScript for Scriptable Cart
SuiteScript can only be executed from sales order forms on your website. This is because Web store
shoppers are working exclusively with the sales order record type and the items sublist on the sales
order when they add items to the shopping cart or enter a coupon code.
Note: SuiteScript is not supported on registration forms.
Only a subset of the SuiteScript client event functions are available for use in Scriptable Cart. If you
have not used SuiteScript before, read the topics, User Event Scripts and Client Scripts in the NetSuite
Help Center.
For code samples you can use to link events to functions in the shopping cart, see Creating Custom
Functions for Scriptable Cart.
For tips on using field change events in the Scriptable Cart, see Working with Field Changed Client
Events.
SuiteCommerce Site Builder Guide
SuiteScript for Scriptable Cart
See Deploying and Running Scriptable Cart for a code sample you can use when changing values in
ship method and shipping address fields.
For sample code you can use to display messages for customers, see Creating Customer-Facing
Messages from Scriptable Cart.
To use the Scriptable Cart, you must first customize a sales order form by attaching your script. Next,
select your customized forms at Setup > Site Builder > Set Up Web Site. Then, customers on your
website can use the sales order forms you customized for the shopping cart. For details, see Getting
Started with Scriptable Cart.
Client Events Supported in Scriptable Cart
The following table lists each client event type that you can use in Scriptable Cart. The functions
executed on these events do not have to be called recalc(), validateLine(), pageInit(), and so on.
However, it is best practice to indicate the client event type in the function name, for example:
recalcCartItems(), validateLineOnItemAdd(), or pageInitOnLogin().
Client Event/
Sample Custom Function Name
Parameters
Triggering Actions
Field Changed
Example: customFieldChanged(t
ype,name, linenum)
type : item (or blank).
name : the internal ID of
the field that is changing.
linenum : item sublist line
number.
If type is blank, then
linenum should also be
blank. Note that line
numbers start at 1, not 0.
See also, Working with
Field Changed Client
Events.
Event occurs when a field is changed
by the shopper or by another client
call.
Example actions:
Page Init
Example: customPageInit(type)
type : create
In the context of the
web store, the value for
this parameter must be
create.
Event occurs when a shopper logs in
to the web store.
postSourcing
Example:
postSourcing(type,name)
type : the sublist internal
ID
name : the field internal ID
Event occurs following a field change
after all the field's child field values
are sourced from the server. Enables
fieldChange style functionality to
occur after all dependent field values
have been set.
For more information, see Working
with Field Changed Client Events.
Recalc
Example: customRecalc(type,
action)
type : item
action : commit,
batchcommit, insert, or
remove
Event occurs after the shopping cart
changes.
Example actions:
SuiteCommerce Site Builder Guide
■ when a shopper changes the
Address field, the ‘fieldChanged'
event occurs and additional logic
in the script is processed
■ when there is a change to
the Coupon Code field, the
‘fieldChanged' event occurs and
additional logic in the script is
processed
■ when a shopper adds an item
to the shopping cart, the ‘recalc'
183
SuiteScript for Scriptable Cart
Client Event/
Sample Custom Function Name
Parameters
184
Triggering Actions
event is triggered, and the order
amount is recalculated (commit)
■ when a shopper deletes an item
from the cart, the ‘recalc' event is
triggered and the order amount is
recalculated (remove)
■ when the quantity of an item
changes in the shopping cart,
the ‘recalc' event is triggered and
the order subtotal is recalculated
(commit)
saveRecord
Event occurs when the submit button
is pressed but prior to the form being
submitted. You should always return
a Boolean value, either true or false,
from a saveRecord event. A return
value of false suppresses submission
of the form.
The function associated with the
‘saveReacord' event should return
false to reject the shopper's attempt
to submit the order.
Example actions:
■ shopper submits the order, and
a ‘saveRecord' event occurs. This
event triggers a script that throws
an alert notifying the shopper
additional information is needed
for the order to be submitted.
■ shopper submits the order, and
a ‘saveRecord' event occurs.
This event triggers a script that
shows an alert so the shopper can
confirm she wants to submit the
order.
Validate Line
Example:
customValidateLine(item)
type : item
Note: This client
event function
must return a
value of true or
false.
Event occurs prior to another item
being added to the shopping cart.
For example: Return false to reject the
addition of the new item.
Creating Custom Functions for Scriptable Cart
By creating custom functions, you can link events to functions that are only applicable to the shopping
cart. Because your script is running against a sales order form, other events related to a sales order
transaction also execute along with the events you specify in your script for the shopping cart. This
could adversely impact performance.
SuiteCommerce Site Builder Guide
SuiteScript for Scriptable Cart
185
The main reason for creating custom functions is to filter out events that do not apply to the web store.
Sample custom functions are listed below:
function customInit(type)
Use this custom function to call any functions related to login.
function customInit(type)
{
//call any functions related to login here.
}
function customOnChange(type, name, linenum)
Use this custom function to link to the FieldChanged event and filter out non-Web store events.
function customOnChange(type, name, linenum)
{
if (name == 'promocode')
{
// call any functions that are triggered by promocode here
sample();
}
function customRecalc(type, action)
Use this custom function to link to the Recalc client event. In Scriptable Cart, the action can only be
'commit' or 'remove.' Note that only events related to items are applicable to Scriptable Cart.
function customRecalc(type, action)
{
if (type == 'item')
{
// call any functions related to recalc here
sample1(action);
sample2(action);
}
}
function customValidateLine(type)
Use this custom function to link to the ValidateLine event. Note that all validations occur in the item list
on the shopping cart page. For best results, filter out any events that are not executed against items.
The return value of each function called from customValidateLine must be tested. If any function
returns false, processing must stop and return false.
function customValidateLine(type)
SuiteCommerce Site Builder Guide
SuiteScript for Scriptable Cart
186
{
if (type != 'item')
{
return true;
}
if (!sample())
{
return false;
}
if (!bar())
{
return false;
}
// All validations passed, so return true
return true;
function customBeforeSubmit()
This custom function will execute before a sales order is saved. Scripts that include the beforeSubmit()
gateway function must be attached to a script record of type User Event.
function customBeforeSubmit()
{
return sample();
}
function customAfterSubmit()
This custom function will be run after a sales order is saved. Scripts that include the afterSubmit()
gateway function must be attached to a script record of type User Event.
function customAfterSubmit()
{
return sample();
}
Note: You can combine the deployment for both the customBeforeSubmit() function and the
customAfterSubmit() functions on the same script deployment record when necessary. For more
information, see Deploying and Running Scriptable Cart.
Working with Field Changed Client Events
Sometimes, a change to one field triggers an automatic update to another field. For example, a change
to a shipping address can trigger a change in the list of shipping methods available. In this example, the
shipping address field is the controlling field, and the field that shows the list of shipping methods is
the dependent field.
When working with controlling and dependent fields, be careful when using the Field Changed client
event.
SuiteCommerce Site Builder Guide
SuiteScript for Scriptable Cart
187
In NetSuite, field change events on a controlling field are triggered before a dependent field is
automatically updated. If you modify the value in a dependent field using a field change script, the
post-field change automatic update can override your changes.
Note that the post sourcing event handler is triggered only after the dependent field is updated by the
system. Using this event will guarantee that your field changes are not overridden. Also note that the
post sourcing event handler is triggered only if a dependent field exists.
For more information, see Client Script Best Practices.
For more information about controlling fields and dependent fields, see Multiple Dependent Dropdowns.
Creating Customer-Facing Messages from
Scriptable Cart
Use Web Site Tags with Scriptable Cart to create messages that display in your web store. The content
for your message is captured in a custom field, or any field on your Scriptable Template sales order,
and then displayed on your site wherever you use Scriptable Cart Message Tags.
Scriptable Cart Message Tag
Notes
<%=getField( fieldname )%>
■ Replace fieldname with the ID of a custom field or any
field on your Scriptable Template sales order.
■ Include this tag in custom HTML and in scripts to create
messages that display on website pages.
<%=setField( fieldname, value )%>
■ Replace fieldname with the ID of a custom field or any
field on your Scriptable Template sales order.
■ Use the value parameter to designate a value for the
custom field where appropriate.
■ Use the setField() tag with the getField() tag in custom
HTML and in scripts to create popups and alerts.
<%=getCartLineField( fieldname )%>
■ Replace fieldname with the ID of a custom field.
■ Can only be used in the Cart Line Message field in site
themes.
You can combine these tags to communicate with your customers using either page-level or cart-level
messages. The getField() and setField() tags display messages on any page of your site. The
getCartLineField() tag displays a message on the cart page, or on a specific line in the shopping
cart.
You can also customize an error message triggered by a failure in the validateLine event. For more
information, see Custom Error Messages for ValidateLine Events.
To create a Scriptable Cart message, follow these general steps:
1. Create a custom field for displaying your message, or for page-level messages, choose an
existing field from your Scriptable Template sales order.
2. Customize your Scriptable Template sales order form to include the custom field for the
message. Or, if you choose to use an existing field, note the field's internal ID.
SuiteCommerce Site Builder Guide
Creating Customer-Facing Messages from Scriptable Cart
188
3. Write the script you will use to generate the message, including Scriptable Cart message tags.
4. Attach your script to the sales order form attached to the scriptable cart.
5. Add HTML along with Scriptable Cart message tags to the appropriate fields in NetSuite based
on the type of message you plan to display on your site.
Page-Level Messages
Use the getField() tag to display a message on any page of your site, including item pages, the
shopping cart, and all pages in the checkout process. Show any content you want, such as a graphic or
a customized popup. You can even use this tag to open another browser window.
Note: You can create a custom field for your Scriptable Cart message, or use any field that
exists on your Scriptable Template sales order. In both cases, you must pass the field's internal
ID in the getField() tag. To find the internal ID of an existing field, see How do I find a field's
internal ID?
Read the basic examples below to get you started:
■ Creating a Basic Page-Level Message
■ Creating a Popup Message
■ Creating Messages for Checkout Pages
Creating a Basic Page-Level Message
You can write HTML to position a page-level message on any website page.
The script attached to the cart determines the content of the message. The steps below describe how
to create a message that will remain on the page.
To create a page-level message using Scriptable Cart:
1. Determine whether you need to create a custom field for your Scriptable Cart message, or use a
field that exists on your Scriptable Template sales order.
■ If you choose to use a field that exists on your Scripting Template sales order, note the field's
internal ID, and go to Step 3.
■ If you choose to create a Custom field for your message, go to Step 2.
2. Go to Customization > Lists, Records, & Fields > Transaction Body Fields > New.
Enter values in the following fields:
■ Label – Name the custom field.
SuiteCommerce Site Builder Guide
Creating Customer-Facing Messages from Scriptable Cart
189
■ ID – Enter a short and descriptive name for the ID.
You will use this ID in a Scriptable Cart message tag. This sample tag displays the message in
bold text:
<b><%=getField('custbody_bannermsg')=%></b>
■ Type – Select Free-Form Text.
■ On the Applies To subtab, check the Sale box, and clear the Web Store box. The custom field
is not intended to display on forms in the website, so that shoppers cannot change the values
you set.
■ Clear the Store Value field.
3. Go to Customization > Forms > Transaction Forms. Customize a sales order form to include the
custom field you created in Step 1.
4. Write the script you will use to generate the message.
Note: If you already have a script that is working properly in Scriptable Cart, save a
backup version.
5. Use the tag in custom HTML where you want the message to display.
■ To display the message on multiple site pages, add it to a site theme, or an item/category
template.
■ To display the message on a specific page, add the tag in one of the description fields on a
tab or category record.
6. Save your changes.
7. Update your Scriptable Template to use the sales order form with the custom fields you created
for Scriptable Cart messaging. To update your Scriptable Template, go to the Web Site Setup
page, and select the sales order form as a Scripting Template.
The code sample below displays a page-level message. You can add it to the Greeting field on a tab
record to display a message on a specific page in your website. Advanced web developers can use
HTML techniques to change the look and feel.
<center><tr>
<td width="100%" valign=top>
<table id='banner' border=0 cellspacing=0 cellpadding=5><tr>
<td>
<img src='/images/icons/store/icon_exclamation2c.gif' width=12 height=12 border=0>
</td>
<td class='banner'>
<%=getField("custbody_bannermsg")%>
</td></tr>
</center>
<script>
var txt = '<%=getField("custbody_bannermsg")%>';
if (!txt)
{
// Hide element if no banner is there
document.getElementById('banner').style.visibility = "hidden";
}
</script>
SuiteCommerce Site Builder Guide
Creating Customer-Facing Messages from Scriptable Cart
190
Creating a Popup Message
To display a message only one time, such as a popup or an alert message, use both the getField()
and setField() tags together.
To create a basic popup:
1. Determine whether you need to create a custom field for your Scriptable Cart message, or use a
field that exists on your Scriptable Template sales order.
If you choose to use a field that exists on your Scripting Template sales order, note the field's
internal ID, and go to Step 3.
If you choose to create a Custom field for your message, do the following:
1.
Go to Customization > Lists, Records, & Fields > Transaction Body Fields > New.
2.
Enter values in the following fields:
■ Label – Name the custom field.
■ ID – Enter a short and descriptive name for the ID.
You will use this ID in a Scriptable Cart message tag, for example:
<%=getField(‘custbody_popupmsg')%>
■ Type – Select Free-Form Text.
■ On the Applies To subtab, check the Sale box, and clear the Web Store box. The
custom field is not intended to display on forms in the website, so that shoppers
cannot change the values you set.
■ Clear the Store Value field.
3.
Click Save.
2. Go to Customization > Forms > Transaction Forms. Customize a sales order form to include the
custom field you created in Step 1.
3. Write the script you will use to generate the message.
Note: If you already have a script that is working properly in Scriptable Cart, save a
backup version.
4. Go to Setup > Site Builder > Themes.
5. Click Edit next to a theme.
6. On the General subtab, in the <body> tag attributes field, enter the following:
SuiteCommerce Site Builder Guide
Creating Customer-Facing Messages from Scriptable Cart
191
onload="page_init(); showPopup();"
Note: page_init(); is a NetSuite function.
To create a popup, you must use the BODY onload attribute in a site theme to wait until the
entire page loads before showing the popup. Otherwise writing a simple alert script, such as:
<script> alert('...'); </script>, will result in your popup message displaying before
the browser finishes rendering the rest of the page.
7. Add the script to any of the fields in the Theme template.
Note that the getField() tag retrieves content from the custom field, while the setField()
tag clears the message content. The JavaScript below prevents the alert box from displaying
continuously.
<script>
function showPopup()
{
var msg = '<%=getField("custbody_popupmsg")%>';
if (msg)
{
alert(msg);
}
}
<%=setField( 'custbody_popupmsg ', '')%>
</script>
8. Click Save.
9. Update your Scriptable Template to use the sales order form with the custom fields you created
for Scriptable Cart messaging.
Creating Messages for Checkout Pages
Use the getField() tag to display a message on checkout pages.
For example, you can communicate specific shipping instructions to customers placing orders online.
Create a message on the page where a shopper on your site chooses a shipping method for an order.
To create messaging for the shipping methods page using Scriptable Cart:
1. Determine whether you need to create a custom field for your Scriptable Cart message, or use a
field that exists on your Scriptable Template sales order.
■ If you choose to use a field that exists on your Scripting Template sales order, note the field's
internal ID, and go to Step 3.
■ If you choose to create a Custom field for your message, go to Step 2.
2. Create a custom field for your message.
1.
Go to Customization > Lists, Records, & Fields > Transaction Column Fields > New.
2.
Enter values in the following fields:
■ ID – Enter a short and descriptive name for the ID.
SuiteCommerce Site Builder Guide
Creating Customer-Facing Messages from Scriptable Cart
192
You will use this ID in a Scriptable Cart message tag, for example:
<%=getField('custbody_shipinfo')%>
■ Type – Select Free-Form Text.
■ On the Applies To subtab, check the Sale box, and clear the Web Store box. The
custom field is not intended to display on forms in the website, so that shoppers
cannot change the values you set.
■ Clear the Store Value field.
3.
Click Save.
3. Go to Customization > Forms > Transaction Forms. Customize a sales order form to include the
custom field you created in Step 1.
4. Write the script you will use to generate the message.
Note: If you already have a script that is working properly in Scriptable Cart, save a
backup version.
5. Go to Setup > Site Builder > Customize Text.
6. Click the Headings subtab.
7. Find Shipping Method on this page.
Note: There are two Shipping Method headings on this page. The first one is the
heading that appears in bold at the top of the page. The second is the heading that
appears at the top of the bulleted list of shipping options.
8. Add the getField() tag to the field in the Customization column.
9. Click Save.
10. Make sure to update your scriptable template to use the sales order form with the custom fields
you created for Scriptable Cart messaging.
The message you create will display on the Shipping Methods page based on the logic in your script.
Cart Line Messages
Use the getCartLineField() tag in the Cart Line Message field on a Site Theme template to
display a message on any line of an order in the shopping cart.
SuiteCommerce Site Builder Guide
Creating Customer-Facing Messages from Scriptable Cart
193
Note that the cart line message always displays under the description field in the shopping cart.
Consider using color attributes and other HTML techniques to differentiate the message from the
typical descriptive text associated with an item in the cart.
The site theme template applies your message to all lines in the cart. However, you can modify your
script to create different messages on different lines of the cart. To do this, use your script to set values
in the custom field associated with the getCartLineField() tag. The per-line customization occurs
on the script level, not on the template level.
To create a message that displays inline on the shopping cart:
1. Create a custom field for your message.
1.
Go to Customization > Lists, Records, & Fields > Transaction Column Fields > New.
2.
Enter values in the following fields:
■ ID – Enter a short and descriptive name for the ID.
You will use this ID in a Scriptable Cart message tag, for example:
<%=getCartLineField('custcol_msg1')%>
■ Type – Select Free-Form Text.
■ On the Applies To subtab, check the Sale box, and clear the Web Store box. The
custom field is not intended to display on forms in the website, so that shoppers
cannot change the values you set.
■ Clear the Store Value field.
3.
Click Save.
2. Go to Setup > Site Builder > Themes. Click Edit next to the site theme on your website.
3. Enter the getCartLineField() tag in the Cart Line Message field on the Tabs & Buttons
subtab.
Here, you can also add custom HTML to make your message consistent with the look and feel of
your website.
4. Click Save.
5. Update your Scriptable Template to use the sales order form with the custom fields you created
for Scriptable Cart messaging.
Custom Error Messages for ValidateLine Events
When shoppers on your site generate an error in a validateLine event, you can customize the error
message on your site using customized website text, and a JavaScript alert.
Custom website text is applied to the bold text in the screenshot above. Use a JavaScript alert in your
script to print the text in the second line.
SuiteCommerce Site Builder Guide
Custom Error Messages for ValidateLine Events
194
To create a custom error message for validateLine events:
1. Add the logic for conditions that will trigger the error in your script attached to the scriptable
template sales order form.
Include the alert in your script. Note the code sample below:
alert(“Sorry—this item is on-hold due to safety issues.”);
return false;
2. Go to Setup > Site Builder > Customize Text.
3. Click the Headings subtab. Find the field containing the text, “There is a problem with your
order.”
4. Edit the text by adding content for the error message you want to display on your site.
5. Click Save.
Deploying and Running Scriptable Cart
Scriptable Cart runs customized sales order forms you select as Scripting Templates. These sales order
forms contain the order while customers are shopping on your web store. Your custom SuiteScript is
attached to these forms.
To run SuiteScript in the shopping cart, an administrator must enable the following features: Advanced
Site Customization, Client SuiteScript.
Note that creating a script record is the first step when using SuiteScript in the shopping cart, however
it is the fourth step when creating a script in a non-web store context. For general information about
creating a script record, see Step 4: Create Script Record .
To deploy a script in the shopping cart:
1. Go to Customization > Forms > Transaction Forms.
Customize a sales order form for use in the shopping cart by attaching SuiteScript. If you use
terms for your customers, you must attach your script to both types of sales order forms: cash
sale and invoice. For more information read the FAQ topic, Q: Note: It is important that the fields on the custom sales order form correspond with
features you have enabled in your account. For example: If you use a script that reads
revenue recognition fields, you must include these fields on your custom sales order
form.
2. Go to Setup > Set Up Web Site.
If you use the Multiple Web Sites feature, click Edit next to a website.
3. Click the Setup tab.
4. In the Preferences section, check the Scriptable Cart and Checkout box.
5. Set the Scripting Templates for your site:
■ Scripting Template (Credit Card) - Select your customized Sales Order - Cash Sale form.
■ Scripting Template (Invoice) - Select your customized Sales Order - Invoice form.
6. Click Save.
Now, based on the sales order form you select as a Scripting Template, your custom script executes
against data in the shopping cart.
SuiteCommerce Site Builder Guide
Deploying and Running Scriptable Cart
195
Important: When you set a script deployment record to Released, you must select the correct
customer center role for the script to execute in the shopping cart. The role you select on the
script deployment must be the same customer center role you have selected in the Default
Role for New Customers field at Setup > Company > General Preferences.
Before you deploy a script to run in the shopping cart, NetSuite recommends you test your script
thoroughly. For more information, see Testing and Debugging Scriptable Cart.
For more information about the client events available in the Scriptable Cart, see SuiteScript for
Scriptable Cart.
Testing and Debugging Scriptable Cart
Use the topics below as guidelines for testing and debugging the scripts you create to customize the
shopping cart:
■ Testing Scriptable Cart
■ Resolving Permission Errors in Scriptable Cart
■ Debugging Your Shopping Cart Scripts Using Firebug
■ Debugging Your Scriptable Cart with SuiteScript
Testing Scriptable Cart
NetSuite recommends that you test your shopping cart scripts thoroughly before using them in the
web store. You have the following options for testing:
■ Use a sandbox account.
■ Use a testdrive account.
■ Use the Multiple Web Sites feature to create a secondary website for testing purposes.
■ Use a record-level script that runs only for certain user roles, by setting permissions on the script
deployment. For more information, see Deploying and Running Scriptable Cart.
If you want to test a form-level script deployment, create an additional custom form that available only
to your role as the tester. This way, the script would only run for you or someone in your organization
with your role.
The test cases listed below will help you verify your script is running correctly:
■ Visit the home page ofyour web store, log in with a customer role, and verify checking out using the
web store shopping cart.
■ Go to the My Accounts tab onyour web store, log in with the customer role, click Enter Sales Orders,
and verify the workflow for customers who may enter orders there.
Resolving Permission Errors in Scriptable Cart
When you use custom records with Scriptable Cart, you may encounter permission errors when adding
items in the shopping cart, or when attempting to check out. In most cases, careful review of the
custom record you created, and the code in your script can resolve the problem.
SuiteCommerce Site Builder Guide
Testing and Debugging Scriptable Cart
196
For example, a common mistake is to code the script to use the current entity ID, and then test the
script without logging in. Ensure that your script handles the case where the shopper is not logged in.
Use the guidelines listed below to help resolve any permission errors you may observe.
■ Check the custom record carefully:
□ Verify that the Use Permissions box is marked.
□ Clear the Include Name Field box on the Custom Record Type page for custom records that are
created by your script.
□ Clear the following boxes: Allow Attachments , Show Notes, Enable Mail Merge.
□ On the Permissions subtab, set Level to Full for the following roles: Administrator, Customer
Center, Shopper.
■ Review your script to verify that the record type ID you reference in your script matches the record
type ID on the custom record in NetSuite.
■ Verify that the column IDs you reference in your script match the column IDs on the custom record
in NetSuite.
■ Verify that you are correctly handling the true or false value returned in validation scripts. You must
return either a true or false value in every case.
■ Ensure that you use the correct search operators when creating a search filter for custom records in
your script.
For example, you may need to use “anyOf” instead of “equals.” Note that the type of column you
are searching may only support a specific set of search filters. For more information, see Supported
Search Operators, Summary Types, and Date Filters in the Help Center.
If you are still observing permission errors, try simplifying the script to its most basic components.
Wrap each call in a try-catch statement, and then log any errors. See also, Scriptable Cart FAQ.
Debugging Your Shopping Cart Scripts Using Firebug
Most of the scripts you write for Scriptable Cart are client scripts. To debug your shopping cart scripts,
use firebug to verify that your script runs properly in the NetSuite application. After you have verified
your script works in the application, you can use SuiteScript to verify it functions properly in the web
store. For more information, see Debugging Your Scriptable Cart with SuiteScript.
For debugging in the application, NetSuite recommends using Firebug which integrates with the Firefox
browser. Firebug is a free client application that includes a JavaScript debugger. Use Firebug to set
breakpoints in your script for investigating your code.
To debug shopping cart scripts:
1. Go to Customization > Forms > Transaction Forms. Attach your script to a Standard Sales Order Invoice or Standard Sales Order - Cash Sale form.
2. Download Firebug.
3. Launch Firebug.
In the Tools menu of the Firefox window, select Firebug, then open Firebug.
4. Log in to NetSuite.
5. Go to Customization > Forms > Transaction Forms. Select the custom sales order form that has
your script attached.
6. Verify your script is running on the sales order form.
SuiteCommerce Site Builder Guide
Testing and Debugging Scriptable Cart
197
1.
In the Firebug console, click Script, choose Enabled. Notice several scripts are listed in
bold in the console. These are all the scripts NetSuite runs on this transaction form page.
2.
Click the path to your script. Your script displays the path that ends with /core/media.nl.
You can set break points to help you step through the code. Read the Firebug help
documentation for more information on using Firebug.
7. Enter data in the sales order and submit.
Debugging Your Scriptable Cart with SuiteScript
To obtain debug messages, typically you must use record-level deployments. The steps below describe
how to use a form-level deployment to generate debugging messages.
1. Go to Customization > Forms > Transaction Forms.
a.
Customize a Standard Sales Order - Invoice, and a Standard Sales Order - Cash Sale
form. Do not include custom code on either form. You will use these for testing.
b.
After you create the two new forms, make a note of their Internal IDs.
2. Create an alternate version of your scriptable cart script. Keep your original script as your
backup.
At the top of each event function, add the following code:
if (nlapiGetFieldValue('customform') != '[InternalID of Sales Order - Invoice from Step 1]'
&& nlapiGetFieldValue('customform') != '[InternalID of Sales Order - CashSale from Step 1]'
{
return;
}
This code ensures that the script only fires for the sales order forms you are using on the web
store.
Note: Use an nlapiLogExecution() call each time you want to output a debugging
message.
3. Create a new client script, and then deploy it for all sales order forms.
a.
Go to Customization > Scripting > Scripts > New > Client Script.
b.
Enter event functions, and attach any library scripts.
c.
On the Deployments subtab, in the Applies to column, select Sales Orders.
d.
Click Save & Deploy.
e.
On the Audience subtab of the script deployment record, make sure that Customer
Center is selected.
4. Select the newly created sales order forms as the Scriptable Template for your web store.
a.
Go to Setup > Site Builder > Set Up Web Site.
b.
In the Preferences section, set the Scripting Templates for your site:
■ Scripting Template (Credit Card) – Select your customized Sales Order - Cash Sale
form.
■ Scripting Template (Invoice) – Select your customized Sales Order - Invoice form.
To view execution logs, go to the script or the script deployment record, and click the Execution Log tab.
SuiteCommerce Site Builder Guide
Scriptable Cart FAQ
198
Scriptable Cart FAQ
How do I turn on the Scriptable Cart?
To use the scriptable cart, an administrator must enable the following features: Advanced Site
Customization, and Client SuiteScript.
After you have turned on the required features, you can check the Scriptable Cart and Checkout box,
and set the Scripting Template fields at Setup > Site Builder > Set Up Web Site.
Are there sample scripts available for testing?
Yes. for more information, see Sample Scripts for Scriptable Cart.
What is the best way to test scripts for the shopping cart?
Test your scripts in a Sandbox account before you deploy the Scriptable Cart in your live production
website.
Can I use SuiteScript on forms that I use for the Customer Center?
Yes. You must customize a Standard Online Sales Order - Invoice (External) or Standard Online Sales
Order - Cash Sale (External) form and then attach a client script.
Can I use SuiteScript on website registration forms?
No. SuiteScript is not compatible with online registration forms. You can use Suite Script Server Pages
(SSP) for customizing the registration form. for more information, see the help topic SSP Application
Overview.
Should I use form-level or record-level scripts for Scriptable Cart?
Using Form-Level Scripts in the Shopping Cart
A form-level script provides the most flexibility for multiple websites. Using a form-level script, you can
create different Invoice and Cash Sale forms for use on different websites.
Note that attaching a form to a script record is the first step when using SuiteScript in the shopping
cart, however it is the third step when creating a script in a non-web store context. For general
information about using form-level scripts, see Step 3: Attach Script to Form.
Using Record-Level Scripts in the Shopping Cart
A record-level script can run on all sales orders in the application and on the web store. When using a
record-level script in the shopping cart, you are not required to maintain more than one Sales Order Invoice and Sales Order - Cash Sale form.
The sample scripts for Setting Quantity Limits for Customers and Setting Default Location for
Web Orders, both use a script of type, User Event which requires a record-level script and a script
deployment.
What type of sales order forms can I use for the Scriptable Cart?
You can customize any of the sales order transaction forms listed below by attaching a client script, and
then entering the functions on the Custom Code subtab:
■ Standard Sales Order - Invoice
■ Standard Sales Order - Cash Sale
SuiteCommerce Site Builder Guide
Scriptable Cart FAQ
199
■ Standard Online Sales Order - Invoice (External)
■ Standard Online Sales Order - Cash Sale (External)
Next, go to Set Up > Web Site > Setup Web Site and select the forms, you want to use in the Scripting
Template (Credit Card), and Scripting Template (Invoice) fields.
Note: It is important that the fields on the custom sales order form correspond with
features you have enabled in your account. For example: If you use a script that reads revenue
recognition fields, you must include these fields on your custom sales order form.
What are the differences between a shopping and a checkout form?
Shoppers onyour web store must use a shopping form and a checkout form during web store
checkout. You can use the same transaction form for both purposes.
The shopping form is transitory. It contains the order while customers are shopping on your site. Your
custom SuiteScript is attached to the shopping form, and then used as a Scripting Template. However,
when customers submit orders into NetSuite, they do so on a checkout form. The checkout form
remains in the system.
During a web store sale, data is passed from the shopping form to the checkout form. The checkout
form is then saved in the database, so you must ensure that fields on the shopping form correspond to
fields on the checkout form.
To set up your shopping and checkout forms:
1. Go to Setup > Transactions > Transaction forms.
a.
Set up your shopping form for the Scriptable Cart: Customize a sales order form by
attaching a client script, and then entering the functions on the Custom Code subtab. If
you use terms for invoicing some customers, you must attach your script to both types
of sales order forms: cash sale and invoice.
b.
Set up your checkout form: Identify an existing sales order form or create a customized
internal sales order form for use as the checkout form.
Note: If the same custom fields do not exist on both the shopping and
checkout forms, then the data that was collected by the shopping form is
discarded. Also note that any client scripts attached to the checkout form do not
run. The only scripts that can run on the checkout form are user-event scripts.
2. Go to Set Up > Web Site > Setup Web Site to specify the forms you want to use onyour web
store for both shopping and checkout.
a.
Specify the shopping form: On the Setup subtab, select the sales order form with your
script attached in one or both of the Scripting Template fields.
b.
Specify the checkout form: Click the Shopping subtab. In the Checkout Preferences
section, select the sales order form (or forms) you created in Step1b.
3. Click Save.
For more information, see Deploying and Running Scriptable Cart.
On which type of form do shoppers submit web orders?
Shoppers on your website submit orders on internal sales order forms.
The forms you select on the Shopping subtab of the Setup Web Site page in the Checkout Preferences
section determine the forms on which shoppers submit their web orders. You cannot select external
forms for this purpose.
SuiteCommerce Site Builder Guide
Scriptable Cart FAQ
200
For more information, see the help topic Shopping Cart and Checkout Set Up.
Can I use Scriptable Cart to change the workflow of the checkout process in a web
store?
No. You cannot use SuiteScript to skip pages or change the order in which checkout pages are
displayed. SuiteScript is only supported in the web store shopping cart.
Does a change to the Payment Method field or any custom field on the Order Summary
page trigger the Field Changed event in a scriptable cart?
Yes. The client event model is supported. For more information, see Client Events Supported in
Scriptable Cart.
Can I use a Field Changed event to display an alert to the shopper?
For information about creating alerts foryour web store customers, see Creating Customer-Facing
Messages from Scriptable Cart.
Note that you must use a custom body field for the message you want to display to shoppers on your
site. This type of custom field is updated in place without requesting a browser refresh. You must use
client-side Javascript to create an alert box.
Can I use SuiteScript to create a button on a Sales Order form that launches a Suitelet
in a new window to add or update line item values in the cart?
Yes. Create a button or a link that opens the Suitelet using window.open. After the Suitelet finishes
processing, you can write a response like this one:
response.write('<html><head><script>window.opener.sampleFunction();
self.close();</script></head><body></body></html>');
Can I give away a $100 gift certificate for free with the purchase of other goods?
Yes. You can look at the sample script provided for Creating Buy-One-Get-One-Free Coupons, and then
revise it to meet your specific business needs.
Why does my script give an Invalid Field Reference error?
Invalid field errors can indicate a problem with the form you selected as the Scripting template. This
error might be returned if you are using a form that does not expose fields referenced by the script
on the form. Note that not all fields are exposed on the Sales Order (External) form. If you observe an
error on submitting a web order, try using a customized Standard Sales Order - Invoice or Standard
Sales Orders - Cash Sale form for your Scripting Template.
For example: Your script refers to a price level field, but your scripting template form does not expose
the Price Level field. The web store shopper will generate an Invalid price reference key error when
submitting an order.
Sample Scripts for Scriptable Cart
You can use the sample scripts listed below, substituting data from your account, for various web store
shopping scenarios.
SuiteCommerce Site Builder Guide
Sample Scripts for Scriptable Cart
201
■ Using a Third-Party Tax Calculator
■ Creating Buy-One-Get-One-Free Coupons
■ Dynamic Discounts
■ Offering Gift Wrap on the Web Store
■ Setting Quantity Limits for Customers
■ Creating Time-Based Promotions
■ Setting Default Location for Web Orders
■ Accepting Charitable Donations
Using a Third-Party Tax Calculator
Using SuiteScript, you can send order information to a third-party remote server, and then override the
tax settings on the sales order based on calculations returned by a third-party.
Setup
The only setup required for this sample script is to replace the sample URL in the script with the actual
URL provided by your third-party tax calculator.
Create the Code
//BEGIN CUSTOM FUNCTIONS FOR THIRD-PARTY TAX
function customOnChange(type, name, linenum)
{
// With third-party tax calculations, it is important to capture and override any tax setting.
// The if statement below ensures that tax settings are overridden, but use this technique with
// care, as the setTaxAmount() function also sets the tax. It is critical not to trigger a
// changeField event in this function, so note that the nlapiSetFieldValue is called with the
// appropriate flags.
if (name == 'promocode' || name == 'taxrate')
{
//alert('Onchange called for '+name);
setTaxAmount();
}
}
function customRecalc(type, action)
{
// In SuiteScript for the web store, action can only be 'commit' or 'remove.'
if (type == 'item')
{
setTaxAmount();
}
SuiteCommerce Site Builder Guide
Sample Scripts for Scriptable Cart
202
}
// END CUSTOM FUNCTIONS FOR THIRD-PARTY TAX
// BEGIN THIRD PARTY TAX
function setTaxAmount()
{
// Construct an array of values needed by the third-party tax provider to calculate tax.
var postArgs = new Array();
postArgs['zipCode'] = nlapiGetField('shipzip');
postArgs['saleTotal'] = nlapiGetField('subtotal');
//Replace the URL below with your third-party tax provider.
var response = nlapiRequestURL("http://www.thirdpartytaxcalculator.com", postArgs, null, nul
l);
var body = response.getBody();
// Parse tax amount from the body. Your approach depends on the format of your third-party
// tax provider.
// The current script only sets the tax rate of the sales order and does not change the taxable
// status of either the customer or any of the items in the order. But, even though the taxable
// flags are not overridden by this sample script, you can override these settings if necessary.
var taxRate = body;
// Note here not to use a field-changed event. Firing a field-changed event may cause an infinite
// loop since a change to tax-rate will alter itself.
nlapiSetFieldValue('taxrate', taxRate, false /*fire field change*/, true /*synchronous*/);
}
// END THIRD-PARTY TAX
Deploy Your Script to the Shopping Cart
NetSuite recommends that you test your script thoroughly before running it in the shopping cart. You
must follow a series of steps to load the script into your NetSuite account, and then run the script for
testing purposes.
For details, see Deploying and Running Scriptable Cart.
Creating Buy-One-Get-One-Free Coupons
Use the Scriptable Cart to create a buy-one-get-one-free sales promotion for the web store.
You can use SuiteScript to add a free item to the order when the shopping cart contains an item you
identify as the trigger item. By entering the coupon code you specify in the script, the shopper triggers
SuiteCommerce Site Builder Guide
Sample Scripts for Scriptable Cart
203
the addition of the free item to the shopping cart. The script becomes inactive when the coupon
expires, or when the item is out of stock.
Setup
Use the steps below to create the promotion code and set up the item records required to run the
sample script.
This sample script is triggered to add a free computer mouse to the order, when the shopper enters
BOGO as the coupon code, and the impressivo computer system exists in the shopping cart.
To use the code sample successfully, you must complete the following setup steps.
1. Create a promotion code named BOGO. Entering the coupon code will trigger the script to run.
Go to Lists > Marketing > Promotion Codes. For more information about entering promotion
codes, see the help topic Promotions.
2. Select the item that must be in the shopping cart to receive the free item.
Go to Lists > Items. Click Edit next to an item.
This item's internal ID must be referenced in the script. In the code sample below, this is the
Impressivo System (internal ID 5).
3. Select an item to offer free of charge when the Impressivo System is added to the cart.
Go to Lists > Items. Click Edit next to an item.
Reference the internal ID for the free item in the script. The free item in the sample is a
computer mouse (internal ID 59)
Note: When you use SuiteScript to set quantity and price, you must set quantity first, and then
set the price.
Create the Code
// BEGIN CUSTOM FUNCTIONS FOR BOGO
function customInit(type)
{
//nlapiLogExecution('ERROR', 'Logging is working', 'Message from script using new execute log A
PI');
return;
}
// Note that the customOnChange function will trigger on a FieldChanged client event.
function customOnChange(type, name, linenum)
{
if (name == 'promocode')
{
bogo('commit');
}
}
function customRecalc(type, action)
{
// In SuiteScript for the web store, action can only be 'commit' or 'remove.'
SuiteCommerce Site Builder Guide
Sample Scripts for Scriptable Cart
if (type == 'item')
{
bogo(action);
}
}
// END CUSTOM FUNCTION FOR BOGO
// BEGIN BOGO
function bogo(action)
{
var mouseId = 59;
var impressivoId = 5;
var promoEnabled = isNotEmpty(nlapiGetFieldText('promocode')) && nlapiGetFieldText('promocod
e') == 'BOGO';
// Verify the computer (Impressivo) and the free mouse exist in the list of items in the order.
var freeMouseLine = -1;
var freeMouseQty = 0;
var impressivoLine = -1;
var impressivoQty = 0;
var numItems = nlapiGetLineItemCount('item');
// Do not do any processing if adding a free mouse.
if (nlapiGetCurrentLineItemValue('item', 'item') == mouseId &&
nlapiGetCurrentLineItemValue('item', 'rate') == 0 && action == 'commit')
{
debug('Adding free mouse - no processing');
return;
}
// Search the sales order for the trigger item and the free item.
for (var line = 1; line <= numItems; line++)
{
var itemId = nlapiGetLineItemValue('item','item',line);
var itemQty = parseInt(nlapiGetLineItemValue('item', 'quantity', line));
// If a mouse is found with a rate of 0.00, this is the free mouse.
if (itemId == mouseId && nlapiGetLineItemValue('item','rate',line) == 0)
{
freeMouseLine = line;
freeMouseQty = freeMouseQty + itemQty;
}
// If an Impressivo is found, remember the line number and quantity.
if (itemId == impressivoId)
SuiteCommerce Site Builder Guide
204
Sample Scripts for Scriptable Cart
{
impressivoLine = line;
impressivoQty = impressivoQty + itemQty;
}
}
debug('Action '+action+' mouse line='+freeMouseLine+' qty='+freeMouseQty+' impressivo line='
+impressivoLine+' qty='+impressivoQty);
// If the shopper enters the BOGO coupon, and the Impressivo is in the shopping cart, and the
// free mouse is not in the shopping cart, add the mouse to the shopping cart free of charge.
if (promoEnabled && impressivoLine > 0 && freeMouseLine < 0 && action == 'commit')
{
debug('Adding free mouse');
// Insert the mouse
nlapiSelectNewLineItem('item');
nlapiSetCurrentLineItemValue('item', 'item', mouseId, true, true);
nlapiSetCurrentLineItemValue('item', 'quantity', impressivoQty, true, true);
setCurrentLineRate(0);
var desc = nlapiGetCurrentLineItemValue('item','description');
nlapiSetCurrentLineItemValue('item','description', desc+' (FREE)', true, true);
desc = nlapiGetCurrentLineItemValue('item','description');
debug('New description is '+desc);
nlapiCommitLineItem('item');
}
// If the BOGO coupon is no longer valid, and the shopping cart contains the free mouse and
// the Impressivo computer, remove the free mouse.
if (!promoEnabled && action == 'commit' && impressivoQty > 0 && freeMouseLine > 0)
{
debug('Selecting free mouse line');
nlapiSelectLineItem('item', freeMouseLine);
debug('Deleting free mouse on line '+freeMouseLine+' because of change in promo code');
nlapiRemoveLineItem('item', freeMouseLine);
}
// If the trigger item (Impressivo computer) is deleted from the cart, then remove the free
// mouse form the shopping cart.
if (action == 'remove' && impressivoLine < 0 && freeMouseLine > 0)
{
debug('Selecting free mouse line');
nlapiSelectLineItem('item', freeMouseLine);
debug('Deleting free mouse on line '+freeMouseLine+' because of deletion of the impressiv
o');
nlapiRemoveLineItem('item', freeMouseLine);
}
// If the trigger item quantity does not match the free item quantity in the cart, then update
SuiteCommerce Site Builder Guide
205
Sample Scripts for Scriptable Cart
// free item quantity to match the trigger item quantity.
if (action == 'commit' && impressivoLine > 0 && freeMouseLine > 0 && impressivoQty != freeMouse
Qty)
{
debug('Updating mouse quantity to '+impressivoQty);
nlapiSelectLineItem('item', freeMouseLine);
nlapiSetCurrentLineItemValue('item', 'quantity', impressivoQty, true, true);
nlapiCommitLineItem('item');
}
debug('Bogo script complete');
}
function debug(msg) { alert(msg); }
// END BOGO
// BEGIN UTILITY FUNCTIONS
function isEmpty(val)
{
return (val == null || val == '');
}
function isNotEmpty(val)
{
return !isEmpty(val);
}
function getVal(colName, linenum)
{
return nlapiGetLineItemValue('item',colName,linenum);
}
// This function updates the rate and also recalculates the correct value for amount.
function setCurrentLineRate(rate)
{
nlapiSetCurrentLineItemValue('item', 'rate', rate, true, true);
var qty = parseInt(nlapiGetCurrentLineItemValue('item', 'quantity'));
var amount = qty * rate;
nlapiSetCurrentLineItemValue('item', 'amount', amount, true, true);
}
// This function returns a map with the internal ID for the item as the key and the total
// quantity for that item in the value. It sums items when the same item appears on different
// lines on the sales order. If passed a non-null filter value, item types that match the filter are
// excluded.
function getItemMap(excludeFilter)
{
if (isNotEmpty(excludeFilter))
{
debug('getItemMap called with filter '+excludeFilter);
}
var itemMap = new Array();
var numLines = nlapiGetLineItemCount('item');
for (var i=1; i<= numLines; i++)
SuiteCommerce Site Builder Guide
206
Sample Scripts for Scriptable Cart
207
{
// Include only items that match the filter.
var itemType = nlapiGetLineItemValue('item','itemtype',i);
if (isNotEmpty(excludeFilter) && itemType == excludeFilter)
{
debug('Ignoring line '+i+', itemType '+itemType+' excluded');
continue;
}
var itemId = nlapiGetLineItemValue('item','item',i);
var nextQty = parseInt(nlapiGetLineItemValue('item','quantity',i));
debug('Item'+itemId+' of type '+itemType+' added to item map');
if (itemId in itemMap)
{
// Add the quantities if other lines in the sublist include the same item.
nextQty = nextQty + parseInt(itemMap[itemId]);
}
debug('Item Id '+itemId+' has updated quantity to '+nextQty+' because of line #'+i);
itemMap[itemId] = nextQty;
}
return itemMap;
}
// This function rounds the input to two decimal places.
function roundOff(amount)
{
return Math.round(amount*100000)/100000;
}
// END UTITLITY FUNCTIONS
Deploy Your Script to the Shopping Cart
NetSuite recommends that you test your script thoroughly before running it in the shopping cart. You
must follow a series of steps to load the script into your NetSuite account, and then run the script for
testing purposes.
For details, see Deploying and Running Scriptable Cart.
Dynamic Discounts
Use SuiteScript to apply a discount to an order when the total in the shopping cart reaches or exceeds
the threshold order amount that you set for each currency you use online.
There are two different approaches you can use:
■ Create a discount item for applying the discount to web orders.
You will reference this discount item in your script. The advantage of using this approach is that the
discount is subtracted from the total amount in the cart, so the order subtotal is consistent between
SuiteCommerce Site Builder Guide
Sample Scripts for Scriptable Cart
208
the cart and the order confirmation page. Also, the shopper can override the discount by entering a
promotion code. This approach is used in the sample script provided here.
■ Create a promotion code to use in your script for applying the discount.
Based on the total order amount in the shopping cart, your script will change whatever promotion
code the shopper entered to the promotion code you created. Note that the promotion code that
triggers the discount will be visible to shoppers, so they may be able to share it.
Setup
Use the steps below to create the discount item and the custom records required to run the sample
script.
1. Create a discount item record. The value you enter in the Rate field is the discount amount
applied to all orders that reach or exceed the threshold amount you set.
■ Go to Lists > Accounting > Items > New.
■ Select Discount.
■ Enter a name for the discount, select an Account, and enter a value in the Rate field.
■ Click Save.
2. Create a new custom record type to track the order amount required to receive a discount for
each currency you use on your web store.
a.
Go to Customization > Lists, Records, & Fields > Record Type > New.
b.
In the Label field, enter a name for this custom record.
c.
In the ID field enter _threshold.
Note: After you save the custom record, the value for ID automatically changes
to custrecord_threshold. The sample script depends on this value for ID.
d.
Check the following boxes on the Custom Record Type page: Include Name, Use
Permissions, and Show Notes. Clear all other check boxes.
e.
On the Permissions subtab set permissions as described below. Note that your script
will rely upon the permissions you set here to access information in the custom records.
■ Select Shopper in the Role column; set the Level column to View. Click Done.
■ Select Customer Center in the Role column; set the Level column to View. Click
Done.
3. Click Save.
4. On the Fields subtab, click New Fields to add two new fields to this custom record.
a.
The first field is Threshold Currency this is a list field where you can select each
currency exposed in your web store. Later, you will link this field to the threshold
amount an order must exceed to receive the discount.
■ In the Label field, enter Threshold Currency.
■ In the ID field, enter _currencyid.
Note: After you save the new field, the value for ID automatically changes to
custrecord_currencyid. The sample script depends on this value for ID.
■ In the Type list, select List/Record.
■ For List/Record, select Currency.
SuiteCommerce Site Builder Guide
Sample Scripts for Scriptable Cart
209
Note: Currency only displays as an option in this list if you use the Multiple
Currencies feature.
■ Check the Store Value box and the Show in List box.
■ On the Validation & Defaulting subtab, check the Mandatory box.
■ On the Access subtab, set Default Access Level to Edit. Also set the Default Level for
Search/Reporting to Edit.
■ Click Save.
b.
The second field on the custom record is Discount Threshold. This field will contain the
order total amount required in the shopping cart to receive the discount.
■ In the Label field, enter Discount Threshold.
■ In the ID field, enter _discount_threshold.
Note: After you save the new field, the value for ID automatically changes to
custrecord_discount_threshold. The sample script depends on this value for
ID.
■ In the Type list, select Currency.
■ Check the Store Value box and the Show in List box.
■ On the Validation & Defaulting subtab, check the Mandatory box.
■ On the Access subtab, set Default Access Level to Edit. Also set the Default Level
for Search/Reporting to Edit.
■ Click Save.
5. Go to Customization > Lists, Records, & Fields > Record Types. Click on the custom record you
created in Step 1.
6. On the Custom Record Type page, click View Records.
7. Click New at the bottom of the page to enter records for each currency available on your
website.
For example, if you use two currencies, USA and Euro, create two records for this custom record
type each named for a different currency. On each record, select the appropriate currency in
the Threshold Currency list. Next, in the Discount Threshold field, enter the amount shoppers
must reach or exceed to receive the discount.
Create the Code
// BEGIN CUSTOM FUNCTIONS FOR DYNAMIC DISCOUNT
function customOnChange(type, name, linenum)
{
if (name == 'promocode')
{
calculateDiscount();
SuiteCommerce Site Builder Guide
Sample Scripts for Scriptable Cart
}
}
function customRecalc(type, action)
{
// On the web store, action can only be 'commit' or 'remove'.
if (type == 'item')
{
calculateDiscount();
}
}
// END CUSTOM FUNCTIONS FOR DYNAMIC DISCOUNT
// DYNAMIC DISCOUNT
function calculateDiscount()
{
// ID of the discount that will be applied.
var discountId = 383;
var currencyId = nlapiGetFieldValue('currency');
var customerId = nlapiGetFieldValue('entity');
if (isEmpty(currencyId) || isEmpty(customerId) || customerId == '0')
{
return;
}
//Load custom threshold record for this currency
debug('Loading threshold record for currency id '+currencyId);
var filter = new nlobjSearchFilter('custrecord_currencyid', null, 'is', currencyId);
var column = new nlobjSearchColumn('custrecord_discount_threshold');
var searchresults = nlapiSearchRecord('customrecord_threshold', null, filter, column);
var subtotal = parseFloat(nlapiGetFieldValue('subtotal'));
debug('Subtotal is '+subtotal);
// If there is no value for threshold associated with a currency or discount, remove the
// discount line.
if (isEmpty(searchresults))
{
debug('No threshold for this currency, removing discount');
nlapiSetFieldValue('discountitem', '');
}
if (isNotEmpty(searchresults))
{
// Get the threshold value and current subtotal.
SuiteCommerce Site Builder Guide
210
Sample Scripts for Scriptable Cart
211
var threshold = searchresults[0].getValue('custrecord_discount_threshold');
debug('Threshold for this currency is '+threshold);
// If a threshold exists, and the promotion code does not exist, then add a promocode when the
// threshold is exceeded.
if (subtotal >= threshold)
{
debug('Our subtotal '+subtotal+' is over the threshold of '+threshold+' - adding disco
unt');
nlapiSetFieldValue('discountitem', discountId);
}
// If a threshold value exists, and the promotion code exists, then remove the discount line
// when the order total is below the threshold.
if (subtotal < threshold)
{
debug('Subtotal below threshold of '+threshold+' - removing discount');
nlapiSetFieldValue('discountitem', '');
}
}
}
// BEGIN UTILITY FUNCTIONS
function isEmpty(val)
{
return (val == null || val == '');
}
function isNotEmpty(val)
{
return !isEmpty(val);
}
function getVal(colName, linenum)
{
return nlapiGetLineItemValue('item',colName,linenum);
}
function debug(val)
{
nlapiLogExecution('DEBUG', val);
}
// END UTILITY
Deploy Your Script to the Shopping Cart
NetSuite recommends that you test your script thoroughly before running it in the shopping cart. You
must follow a series of steps to load the script into your NetSuite account, and then run the script for
testing purposes.
SuiteCommerce Site Builder Guide
Sample Scripts for Scriptable Cart
212
For details, see Deploying and Running Scriptable Cart.
Offering Gift Wrap on the Web Store
The code sample below depends on a custom item field you create that contains the gift wrap price.
When the shopper in the web store checks a box on an item record, the script adds a line item for gift
wrap to the sales order.
Important: Per line item taxing must be disabled to use scriptable cart for offering gift wrap
in the web store. Note that when the charge for gift wrap is inserted into the sales order, a tax
code is not specified for per line item taxing.
Setup
Use the steps below to create the custom fields, and the gift wrap item record required to run the
sample script.
1. Create a custom field on item records for giftwrap pricing.
a.
Go to Customization > Lists, Records, & Fields > Item Fields > New.
b.
In the Label field, enter Gift Wrap Price.
c.
On the Applies To subtab, check the boxes for the item types you offer for sale online.
d.
In the Type list, select Currency.
e.
Click Save.
2. Create a transaction item option on item records to show the value you enter in the Gift Wrap
Price field.
a.
Go to Customization > Lists, Records, & Fields > Transaction Item Options > New.
b.
In the Label field, enter Gift Wrap Cost.
c.
In the ID field, enter giftwrapcost.
Note: After you save the transaction item option, the value for ID automatically
changes to custcolgiftwrapcost. The sample script depends on this value for ID.
d.
In the Type list, select Currency.
e.
On the Applies To subtab:
■ Check the Sale box.
■ Check the Web Store box.
■ In the Items list, select the items for which you offer gift wrap
f.
On the Display subtab, set Display type to disabled. This step prevents shoppers on the
web store shopper from changing the gift wrap price you set.
g.
On the Sourcing & Filtering subtab:
■ Set the Source List to Item.
■ Select Gift Wrap Price in the Source From list.
h.
Click Save.
3. Create a second transaction item option to display a check box on the web store where
shoppers can trigger the script by flagging an item for gift wrap.
a.
Go to Customization > Lists, Records, & Fields > Transaction Item Options > New.
SuiteCommerce Site Builder Guide
Sample Scripts for Scriptable Cart
b.
In the Label field, enter Gift Wrap.
c.
In the ID field, enter giftwrapped.
213
Note: After you save the transaction item option, the value for ID automatically
changes to custcolgiftwrapped. The sample script depends on this value for ID.
d.
Set the Type list to Check box.
e.
On the Applies to subtab:
■ Check the Sale box.
■ Check the Web Store box.
■ Select the items for which you offer gift wrap in the Items list.
f.
Click Save.
4. Create the gift wrap item record to be added to orders where the shopper checked the Gift
Wrap box.
a.
Go to Lists > Accounting > Items > New.
b.
Select a Non-inventory Item type.
c.
In the Item Name/Number field, enter Gift Wrap.
d.
Check the Display in Web Site box. This is required so the gift wrap item can be added
to the cart along with the item to be gift wrapped.
e.
Enter a price on the item record.
f.
Click Save.
Note: Remember the internal ID number for this gift wrap item. You will use it
in the Scriptable Cart code sample.
5. Create a third transaction item option for the script to capture the internal ID for the gift wrap
item record. This field is not visible to shoppers.
a.
Go to Customization > Lists, Records, & Fields > Transaction Item Options > New
b.
In the Label field, enter Gift Wrap Item ID.
c.
In the ID field, enter giftwrapitemid.
Note: After you save the transaction item option, the value for ID automatically
changes to custcolgiftwrapitemid. The sample script depends on this value for
ID.
d.
Set the Type list to Free-Form Text.
e.
On the Applies to subtab:
■ Check the Sale box.
■ Check the Web Site box.
■ Check the Hidden box.
f.
On the Display subtab, set Display Type to Hidden.
g.
Click Save.
6. Create a transaction body field to detect recursion of the recalc function. Using this flag allows
new lines to be inserted into the item machine without triggering the script to run multiple
times.
a.
Customization > Lists, Records, & Fields > Transaction Body Field > New.
SuiteCommerce Site Builder Guide
Sample Scripts for Scriptable Cart
b.
In the Label field, enter processing.
c.
In the ID field, enter processing.
214
Note: After you save the transaction item option, the value for ID automatically
changes to custbodyprocessing. The sample script depends on this value for ID.
d.
On the Applies to subtab, check the Sale box.
e.
On the Display subtab, set Display Type to Hidden.
f.
Click Save.
Create the Code
//BEGIN CUSTOM FUNCTIONS FOR GIFT WRAP
function customRecalc(type, action)
{
// In Scriptable Cart, action can only be 'commit' or 'remove'.
if (nlapiGetFieldValue('custbodyprocessing') == "T") {return;}
nlapiSetFieldValue('custbodyprocessing', "T");
if (type == 'item')
{
try
{
recalcGiftWrap(action);
}
finally
{
nlapiSetFieldValue('custbodyprocessing',"F");
}
}
//END CUSTOM FUNCTIONS FOR GIFT WRAP
//BEGIN GIFT WRAP
function recalcGiftWrap(action)
{
debug('Giftwrap recalc called for '+action);
// Substitute the internal ID for the gift wrap item you created in your account.
var giftwrapId = 386;
// Array of gift wrapped items and their quantities.
var wrappedItemsQty = new Array();
// Array of internal item IDs and their associated gift wrap prices and their corresponding gift
// wrap line numbers.
SuiteCommerce Site Builder Guide
Sample Scripts for Scriptable Cart
var wrapCost = new Array();
var itemDesc = new Array();
var wrapLines = new Array();
var numlines = nlapiGetLineItemCount('item');
debug('numlines = '+numlines);
for (var i=1; i <= numlines; i++)
{
var itemId = getVal('item', i);
// If a line with gift wrap is found, then note the line and go to the next line.
if (itemId == giftwrapId)
{
var relatedItemId = getVal('custcolgiftwrapitemid', i);
wrapLines[relatedItemId] = i;
continue;
}
if (isEmpty(getVal('custcolgiftwrapcost', i)))
{
// Ignore any items with no gift wrap cost.
debug("ignoring line "+i+", giftwrapcost is "+getVal('custcolgiftwrapcost', i));
continue;
}
// Store the gift wrap cost and description for this item.
wrapCost[itemId] = getVal('custcolgiftwrapcost', i);
// This item has a gift wrap cost, so accumulate it in our map.
var lineQty = parseInt(getVal('quantity', i));
// Count this row as zero if the gift wrap check box is false and remove any gift wrap items that
// are not needed.
if (getVal('custcolgiftwrapped',i) == 'F') { lineQty = 0; }
if (itemId in wrappedItemsQty)
// Accumulate the quantity.
{
wrappedItemsQty[itemId] = wrappedItemsQty[itemId] + lineQty;
}
else
{
wrappedItemsQty[itemId] = lineQty;
// Initialize.
SuiteCommerce Site Builder Guide
215
Sample Scripts for Scriptable Cart
}
debug('Accumulated giftwrap qty for item '+itemId+' is '+wrappedItemsQty[itemId]);
}
// Look at each giftwrapped item and make sure that the quantities are correct.
for (var nxtItem in wrappedItemsQty)
{
var numWrapsNeeded = wrappedItemsQty[nxtItem];
debug(numWrapsNeeded+' wraps needed for item '+nxtItem);
// If a row exists for an item that includes gift wrap, check if it needs to be updated.
if (nxtItem in wrapLines)
{
var giftWrapLineNum = wrapLines[nxtItem];
var numWrapsCurrent = getVal('quantity', wrapLines[nxtItem]);
// Update the quantity on the gift wrap item if needed.
if (numWrapsCurrent != numWrapsNeeded)
{
debug('Update to '+numWrapsNeeded+ ' giftwraps needed for item ID '+nxtItem+' line
'+giftWrapLineNum);
nlapiCommitLineItem('item');
nlapiSelectLineItem('item',giftWrapLineNum);
nlapiSetCurrentLineItemValue('item', 'quantity', numWrapsNeeded,true);
debug('Current Gift Wrap Quantity is ' + nlapiGetCurrentLineItemValue('item','quantity'));
nlapiCommitLineItem('item');
}
}
else if (numWrapsNeeded > 0)
// If a gift wrap item does not exist, but it is needed, insert it.
{
debug('Insert '+numWrapsNeeded+' giftwraps found for item ID '+nxtItem);
nlapiSelectNewLineItem('item');
nlapiSetCurrentLineItemValue('item', 'item', giftwrapId, true , true);
// Set quantity first, and rate second, because changing quantity automatically updates the rate.
nlapiSetCurrentLineItemValue('item', 'quantity', numWrapsNeeded, false , true);
setCurrentLineRate(wrapCost[nxtItem]);
nlapiSetCurrentLineItemValue('item', 'custcolgiftwrapitemid', nxtItem, false, true);
nlapiCommitLineItem('item');
}
}
// Finally, look for orphan gift wrap items and delete them.
for (var nxtItem in wrapLines)
{
SuiteCommerce Site Builder Guide
216
Sample Scripts for Scriptable Cart
if (!(nxtItem in wrappedItemsQty))
{
var line = wrapLines[nxtItem];
debug('Orphan giftwrap found for item '+nxtItem+' on line '+line);
nlapiSelectLineItem('item', line);
nlapiRemoveLineItem('item', line);
}
}
}
// END GIFT WRAP
// BEGIN UTILITY FUNCTIONS
function isEmpty(val)
{
return (val == null || val == '');
}
function isNotEmpty(val)
{
return !isEmpty(val);
}
function getVal(colName, linenum)
{
return nlapiGetLineItemValue('item',colName,linenum);
}
// This function updates the rate and also recalculates the correct value for amount.
function setCurrentLineRate(rate)
{
nlapiSetCurrentLineItemValue('item', 'rate', rate, true, true);
var qty = parseInt(nlapiGetCurrentLineItemValue('item', 'quantity'));
var amount = qty * rate;
nlapiSetCurrentLineItemValue('item', 'amount', amount, true, true);
}
// This function returns a map with the internal ID for the item as the key and the total
// quantity for that item in the value. It sums items when the same item appears on different
// lines on the sales order. If passed a non-null filter value, item types that match the filter are
// excluded.
function getItemMap(excludeFilter)
{
if (isNotEmpty(excludeFilter))
{
debug('getItemMap called with filter '+excludeFilter);
}
var itemMap = new Array();
var numLines = nlapiGetLineItemCount('item');
for (var i=1; i<= numLines; i++)
{
// Include only items that match the filter.
SuiteCommerce Site Builder Guide
217
Sample Scripts for Scriptable Cart
218
var itemType = nlapiGetLineItemValue('item','itemtype',i);
if (isNotEmpty(excludeFilter) && itemType == excludeFilter)
{
debug('Ignoring line '+i+', itemType '+itemType+' excluded');
continue;
}
var itemId = nlapiGetLineItemValue('item','item',i);
var nextQty = parseInt(nlapiGetLineItemValue('item','quantity',i));
debug('Item '+itemId+' of type '+itemType+' added to item map');
if (itemId in itemMap)
{
// Add the quantities if other lines in the list machine include the same item.
nextQty = nextQty + parseInt(itemMap[itemId]);
}
debug('Item Id '+itemId+' has updated quantity to '+nextQty+' because of line #'+i);
itemMap[itemId] = nextQty;
}
return itemMap;
}
// This function rounds the input to two decimal places.
function roundOff(amount)
{
return Math.round(amount*100000)/100000;
}
function debug(msg) { alert(msg); }
// END UTITLITY FUNCTIONS
Deploy Your Script to the Shopping Cart
NetSuite recommends that you test your script thoroughly before running it in the shopping cart. You
must follow a series of steps to load the script into your NetSuite account, and then run the script for
testing purposes.
For details, see Deploying and Running Scriptable Cart.
Setting Quantity Limits for Customers
Use SuiteScript to restrict the quantity of an item that can be purchased over the lifetime of the
customer.
The sample script provided here restricts the quantity of items based on the value in a custom field
that you add to the item record. When a shopper adds an item that has an allotment amount to the
cart, a custom record is created to track the quantity sold .
SuiteCommerce Site Builder Guide
Sample Scripts for Scriptable Cart
219
Note: You must create a User Event script deployment record for the customAfterSubmit()
function. All other custom functions can exist on a Client Event script record if you are working
with record-level scripts. If you are working with form-level scripts enter the custom functions
on the Custom Code subtab on the custom transaction record, and create a User Event script
for the AfterSubmit function. For more information, see Using Record-Level Scripts in the
Shopping Cart.
Setup
Use the steps below to create custom fields and custom records required to run the sample script.
1. Create a custom field to hold the allotment value on item records.
a.
Go to Customization > Lists, Records, & Fields > Item Fields > New.
b.
In the Label field, enter a name for the custom field. For example, Item Allotment.
c.
In the Type field, select Integer Number.
d.
Check the Store Value box.
e.
On the Applies To subtab, select Inventory Item.
f.
Click Save.
2. Create custom transaction column field for displaying the Allotment value for each item on the
transaction record.
a.
Go to Customization > Lists, Records, & Fields > Transaction Column Fields > New.
b.
In the Label field, enter a column name. For example, Default Allotment.
c.
In the Type field, select Integer Number.
d.
Check the Store Value box.
e.
On the Applies To subtab, check the following boxes: Sale Item, Store Item, and
Hidden.
f.
On the Sourcing & Filtering subtab,
■ Set the Source List to Item
■ In the Source From field, select the custom field you created in Step 1.
g.
On the Access subtab:
■ Set Default Access Level to Edit.
■ Set Default Level for Search/Reporting to Edit.
h.
Click Save
3. Create a custom record for tracking customer allotments.
a.
Go to Customization > Lists, Records, & Fields > Record Types > New.
b.
In the Name field, enter a name for this record. For example, Allotments.
c.
In the ID field, enter _allotments.
Note: After you click save, the value for ID automatically changes to
custcol_allotments. The sample script depends on this value for ID.
d.
Clear the Include Name Field box.
e.
On the Permissions subtab, set the following values:
■ In the Role column, select Customer Center, and then set Level to Full. Click Add.
■ In the Role column, select Shopper, and then set Level to Full. Click Add.
SuiteCommerce Site Builder Guide
Sample Scripts for Scriptable Cart
220
■ In the Role column, select Administrator, and then set Level to Full (for testing in the
application). Click Add.
■ Click Save.
4. Create three new fields on the custom record.
Go to Customization > Lists, Records, & Fields > Record Types. Click the Custom Record you
created in Step 3.
a.
On the Fields Subtab, click New Field to create a field for capturing the customer record
internal ID.
■ In the Label field, enter Customer ID.
■ In the ID field, enter _ customer.
Note: After you click Save, the value for ID automatically changes to
custrecord_customer. The sample script depends on this value for ID.
■ In the Type field, select List/Record.
■ Check the Store Value box.
■ Check the Show in List box.
■ Click Save.
b.
Click New Fields again to create a field for the item record internal ID.
■ In the Label field, enter Item ID.
■ In the ID field, enter _ item.
Note: After you click save, the value for ID automatically changes to
custrecord_item. The sample script depends on this value for ID.
■ In the Type field, select List/Record.
■ In the List/Record field, select Item.
■ Check the Store Value box and the Show in List box.
■ On the Validation & Defaulting subtab, check the Mandatory box.
■ Click Save.
c.
On the Fields Subtab, click New Field to create a field for keeping track of the number
remaining in each customer's allotment.
■ In the Label field, enter Number Remaining.
■ In the ID field, enter _remaining.
Note: After you click save, the value for ID automatically changes to
custrecord_remaining. The sample script depends on this value for ID.
■ In the Type field, select Integer Number.
■ Check the Store Value box.
■ Check the Show in List box.
■ Click Save.
Create the Code
// BEGIN CUSTOM FUNCTIONS FOR ALLOTMENTS
SuiteCommerce Site Builder Guide
Sample Scripts for Scriptable Cart
function customValidateLine(type)
{
// In web store scripts line inputs only needed to be validated on the item sublist.
if (type != 'item')
{
return true;
}
// Note that validation routines are called in a different way than other events because the
// return value of each function must be tested before going on to the next function. If any
// function returns false, then stop processing and return false.
if (!verifyAllotments())
{
return false;
}
// All validations passed. Return true.
return true;
}
// This custom function will be run after a sales order is saved. Because only User Event scripts
// have an afterSubmit event, you must create a separate User Event script record.
function customAfterSubmit()
{
return updateAllotmentsOnSave();
}
//END CUSTOM FUNCTIONS FOR ALLOTMENTS
//BEGIN ALLOTMENTS
function verifyAllotments()
{
// Get current item and customer.
var custId = nlapiGetFieldValue('entity');
var itemId = nlapiGetCurrentLineItemValue('item', 'item');
debug('Customer ID: '+custId+', Item Id: '+itemId);
// First, check to see if this item has a value for the allotment custom field. If not, ignore the
// validation and allow the line item to be entered. Not all items will have a value for allotment.
var allotmentDefault = nlapiGetCurrentLineItemValue('item','custcol_allotmentdefault');
debug('Allotment default for item '+itemId+' is '+allotmentDefault);
if (isEmpty(allotmentDefault))
{
SuiteCommerce Site Builder Guide
221
Sample Scripts for Scriptable Cart
debug('Empty allotment default - ignore validation');
return true;
}
// If the shopper has not logged in, the allotment record cannot be found. Set the value for the
// number remaining in the allotment to the value in the Allotment custom field on the item.
// Note that this sample script does not include an alert for shoppers about the allotment
// quantity.
var remaining = allotmentDefault;
var allotmentRec = getAllotmentRecord(custId, itemId, allotmentDefault);
if (allotmentRec != null)
{
// When the shopper logs in, find the allotment record. Get the number remaining in the
// allotment for this customer.
remaining = allotmentRec.getFieldValue('custrecord_remaining');
}
// Calculate the current total quantity for this item to check if it exceeds the customer's
// allotted quantity.
var qty = parseInt(nlapiGetCurrentLineItemValue('item','quantity'));
var currentIndex = nlapiGetCurrentLineItemIndex('item');
// Because the order can contain multiple line items for the same line, look for the items in
// other lines and add the quantities together to get an accurate count.
var numLines = nlapiGetLineItemCount('item');
for (var i=1; i<= numLines; i++)
{
// Skip the line currently selected because it was already counted.
if (i == currentIndex) { continue; }
var nxtItemId = nlapiGetLineItemValue('item','item',i);
if (nxtItemId == itemId)
{
qty = qty + parseInt(nlapiGetLineItemValue('item','quantity',i));
}
}
debug('Current quantity for item '+itemId+' is '+qty);
if (qty > remaining)
{
// If quantities are added that exceed the current allotments, refuse the entry.
alert('You are only allotted '+remaining+' of this item - please reduce your order');
SuiteCommerce Site Builder Guide
222
Sample Scripts for Scriptable Cart
return false;
}
return true;
}
// This function is called when the sales order is saved.
function updateAllotmentsOnSave()
{
var custId = nlapiGetFieldValue('entity');
var numLines = nlapiGetLineItemCount('item');
var allottedItemQty = new Array();
debug('Allotment update called for customer '+custId);
// First, get the total item count for each item.
var itemMap = getItemMap();
// Then construct a map of the current allotments for each item.
var allottedMap = new Array();
for (var i=1; i<= numLines; i++)
{
var defaultAllotment = nlapiGetLineItemValue('item', 'custcol_allotmentdefault', i);
// If this item doesn't have allotments, then skip it.
if (isEmpty(defaultAllotment))
{
debug('Line '+i+' has no default allotments. Skipping.');
continue;
}
var itemId = nlapiGetLineItemValue('item','item',i);
if (!(itemId in allottedMap))
{
// If this item ID does not exist in the map, then load the allotment record.
debug('Getting allotment rec for item ID '+itemId);
var rec = getAllotmentRecord(custId, itemId, nlapiGetLineItemValue('item','custcol_all
otmentdefault', i));
allottedMap[itemId] = rec;
}
}
// Now, update each custom record with the new value for the allotted number remaining.
for (itemId in allottedMap)
{
SuiteCommerce Site Builder Guide
223
Sample Scripts for Scriptable Cart
rec = allottedMap[itemId];
var remaining = rec.getFieldValue('custrecord_remaining');
var qty = itemMap[itemId];
if (qty > remaining)
{
alert('You are only allotted '+remaining+' of this item - please reduce your order');
return false;
}
// Set the record with the new quantity, and then save it.
var newQty = remaining - qty;
rec.setFieldValue('custrecord_remaining', newQty);
debug('Updating custom record to new qty = '+newQty+' for item ID '+itemId);
nlapiSubmitRecord(rec, true);
}
return true;
}
// This function returns a custom record for allotments for this customer-item
// combination. If an allotment record does not exist for this customer and item combination, it
// will create one with the original allotment specified on the item record. If the
// customer ID is null or zero (0), the shopper has not logged in, and should not be given a
// record. Instead, restrict the shopper to the default value until they log in.
function getAllotmentRecord(custId, itemId, allotmentDefault)
{
// Before doing anything else, check for anonymous shoppers. If an anonymous shopper is
// detected, return null for an allotment record. Any script that calls this function should check
// for null values before proceeding to read the outgoing record.
if (isEmpty(custId) || custId == '0')
{
return null;
}
// Define two filters, one for item and one for the customer.
var filters = new Array();
filters[0] = new nlobjSearchFilter('custrecord_customer', null, 'anyOf', custId);
filters[1] = new nlobjSearchFilter('custrecord_item', null, 'anyOf', itemId);
try
{
var searchresults = nlapiSearchRecord('customrecord_allotments', null, filters, null);
}
catch (err)
{
debug('Error during allotment record retrieval: '+err.description);
}
SuiteCommerce Site Builder Guide
224
Sample Scripts for Scriptable Cart
var rec;
if (isEmpty(searchresults))
{
debug('No record found for item '+itemId+' and customer ID '+custId+' - creating a new on
e');
// If no records are found, then create a new record to track this customer-item combination.
rec = nlapiCreateRecord('customrecord_allotments');
rec.setFieldValue('custrecord_customer', custId);
rec.setFieldValue('custrecord_item', itemId);
rec.setFieldValue('custrecord_remaining', allotmentDefault);
nlapiSubmitRecord(rec);
}
else
{
// The record was found. Get the remaining quantity.
rec = nlapiLoadRecord(searchresults[0].getRecordType(), searchresults[0].getId());
debug('Custom record found; remaining '+rec.getFieldValue('custrecord_remaining')+' found
for item '+itemId+' and customer ID '+custId);
}
return rec;
}
// UTILITY FUNCTIONS
function isEmpty(val)
{
return (val == null || val == '');
}
function isNotEmpty(val)
{
return !isEmpty(val);
}
function getVal(colName, linenum)
{
return nlapiGetLineItemValue('item',colName,linenum);
}
// This function returns a map with the internal ID for the item as the key and the total
// quantity for that item in the value. It sums items when the same item appears on different
// lines on the sales order. If passed a non-null filter value, item types that match the filter are
// excluded.
function getItemMap(excludeFilter)
{
if (isNotEmpty(excludeFilter))
SuiteCommerce Site Builder Guide
225
Sample Scripts for Scriptable Cart
226
{
debug('getItemMap called with filter '+excludeFilter);
}
var itemMap = new Array();
var numLines = nlapiGetLineItemCount('item');
for (var i=1; i<= numLines; i++)
{
// Include only items that match the filter.
var itemType = nlapiGetLineItemValue('item','itemtype',i);
if (isNotEmpty(excludeFilter) && itemType == excludeFilter)
{
debug('Ignoring line '+i+', itemType '+itemType+' excluded');
continue;
}
var itemId = nlapiGetLineItemValue('item','item',i);
var nextQty = parseInt(nlapiGetLineItemValue('item','quantity',i));
debug('Item '+itemId+' of type '+itemType+' added to item map');
if (itemId in itemMap)
{
// If other line items exist with the same item, then add the quantities together.
nextQty = nextQty + parseInt(itemMap[itemId]);
}
debug('Item Id '+itemId+' has updated quantity to '+nextQty+' because of line #'+i);
itemMap[itemId] = nextQty;
}
return itemMap;
}
function debug(val)
{
nlapiLogExecution('DEBUG', val);
}
//END UTILITY FUNCTIONS
Deploy Your Script to the Shopping Cart
NetSuite recommends that you test your script thoroughly before running it in the shopping cart. You
must follow a series of steps to load the script into your NetSuite account, and then run the script for
testing purposes.
For details, see Deploying and Running Scriptable Cart.
SuiteCommerce Site Builder Guide
Sample Scripts for Scriptable Cart
227
Creating Time-Based Promotions
You can offer items online for a special sale price that is valid only for a set amount of time. The script
you create recognizes the date and time when the sale price is no longer valid, and reverts the price
displayed online back to the original.
Setup
Follow the setup steps below to create three custom item fields and three corresponding item option
fields that display information about the discount to shoppers onyour web store.
1. Create three custom item fields.
Go to Customization > Lists, Records, & Fields > Item Fields > New. In the sample script, custom
item fields were created as follows:
a.
Discount Price
■ In the Label field, enter Discount Price.
■ In the ID field, enter _discountprice.
Note: After you save the custom item field, the value for ID automatically
changes to custitem _discountprice. The sample script depends on this value
for ID.
■ Set Type to Currency
■ Check the Store Value box.
■ On the Applies To subtab, check the boxes next to the item type for which you will
offer this discount.
■ Click Save.
b.
Discount Expiration Date
■ In the Label filed, enter Discount Expiration Date.
■ In the ID field, enter _discountexpirationdate.
Note: After you save the custom item field, the value for ID automatically
changes to custitem _discountexpirationdate. The sample script depends on
this value for ID.
■ Set Type to Date.
■ Check the Store Value box.
■ On the Applies To subtab, check the boxes next to the item type for which you will
offer this discount.
c.
Discount Expiration Time
■ In the Label field, enter Discount Expiration Time.
■ In the ID field, enter _discountexpirationtime.
Note: After you save the custom item field, the value for ID automatically
changes to custitem _discountexpirationtime. The sample script depends on
this value for ID.
■ Set Type to Time of Day.
SuiteCommerce Site Builder Guide
Sample Scripts for Scriptable Cart
228
■ On the Applies To subtab, check the boxes next to the item type for which you will
offer this discount.
2. Create three transaction item options at Customization > Lists, Records, & Fields > Transaction
Item Options.
Note: Shoppers on your web store will see the fields you create below. Create field
labels for these transaction item options and set the order in which they display so that
they make sense to online shoppers.
a.
Discount Price Column
■ In the Label field, enter Special Sale Price.
■ In the ID field, enter _discountprice.
Note: After you save the custom item option, the value for ID automatically
changes to custcol _discountprice. The sample script depends on this value
for ID.
■ Set the Type field to Currency.
■ Check the Store Value box.
■ On the Applies to subtab, check the Sale and Web Store boxes.
■ On the Display tab, set Display Type to Disabled.
■ On the Sourcing & Filtering subtab, set Source List to Item, and Source From to
Discount Price.
■ Click Save.
b.
Discount Expiration Date
■ In the Label field, enter Special sale ends on.
■ In the ID field, enter _discountexpirationdate.
Note: After you save the custom item option, the value for ID automatically
changes to custcol _discountexpirationdate. The sample script depends on
this value for ID.
■ Set Type to Date.
■ Check the Store Value box.
■ On the Applies to subtab, check the Sale box, and the Web Store box.
■ On the Display tab, set Display Type to Disabled.
■ On the Sourcing & Filtering subtab, set Source List to Item, and Source From to
Discount Expiration Date.
■ Click Save.
c.
Discount Expiration Time
■ In the Label Field, enter Discount expires at.
■ In the ID field, enter _discountexpirationtime.
SuiteCommerce Site Builder Guide
Sample Scripts for Scriptable Cart
229
Note: After you save the custom item option, the value for ID automatically
changes to custcol _discountexpirationtime. The sample script depends on
this value for ID.
■ Set the Type field to Time of Day.
■ On the Applies to subtab, check the Sale box and the Web Store box.
■ On the Display tab, set Display Type to Disabled.
■ On the Sourcing & Filtering subtab, set Source List to Item, and Source From to
Discount Expiration Time.
■ Click Save.
Create the Code
// BEGIN CUSTOM FUNCTIONS FOR TIME BASED DISCOUNT
function customValidateLine(type)
{
// All validations occur in the item tab.
if (type != 'item')
{
return true;
}
// Note that validation routines are called differently from other events, because the return
// value of each function must be tested before going on to the next function. If any function
// returns false, stop processing and return false.
if (!applyTimedDiscount())
{
return false;
}
// All validations passed, so return true
return true;
}
// END CUSTOM FUNCTIONS FOR TIME BASED DISCOUNT
//BEGIN TIME BASED DISCOUNT
function applyTimedDiscount()
{
// First get the current date and time.
SuiteCommerce Site Builder Guide
Sample Scripts for Scriptable Cart
var now = new Date();
// Next, get the expiration date and time from the current line.
var expDate = nlapiGetCurrentLineItemValue('item','custcol_discountexpirationdate');
var expTime = nlapiGetCurrentLineItemValue('item','custcol_discountexpirationtime');
var discountPrice = nlapiGetCurrentLineItemValue('item','custcol_discountprice');
if (isEmpty(expDate) || isEmpty(expTime) || isEmpty(discountPrice))
{
// If the information is incomplete, do not give a discount for this item.
return true;
}
var expDateTime = new Date(expDate+' '+expTime);
alert('Expiration date time is '+expDateTime);
if (now.getTime() < expDateTime.getTime())
{
// Override the current price with the discount price.
alert('Discount applies - set the new price of '+discountPrice);
setCurrentLineRate(discountPrice);
}
// If the promotion has ended, do not to throw an error. Instead, add the item at regular price
// to the order.
return true;
}
// UTILITY FUNCTIONS
function isEmpty(val)
{
return (val == null || val == '');
}
function isNotEmpty(val)
{
return !isEmpty(val);
}
// This function will update the rate and also recalculate the correct value for amount.
function setCurrentLineRate(rate)
{
SuiteCommerce Site Builder Guide
230
Sample Scripts for Scriptable Cart
231
nlapiSetCurrentLineItemValue('item', 'rate', rate, true, true);
var qty = parseInt(nlapiGetCurrentLineItemValue('item', 'quantity'));
var amount = qty * rate;
nlapiSetCurrentLineItemValue('item', 'amount', amount, true, true);
}
Deploy Your Script to the Shopping Cart
NetSuite recommends that you test your script thoroughly before running it in the shopping cart. You
must follow a series of steps to load the script into your NetSuite account, and then run the script for
testing purposes.
For details, see Deploying and Running Scriptable Cart.
Setting Default Location for Web Orders
You can set a default location on web store orders to offer accurate shipping estimates online. The
sample script provided below assigns a location to each order based on the items available in stock.
The sample script uses a function that implements a basic algorithm to determine which location
should appear on the sales order. The quantities available in each location are compared to the
quantities requested for the items on the sales order. If there are no locations with enough quantity
available, then the location you specify in the script is selected for the order.
Note: You must create a User Event script deployment record for the customBeforeSubmit()
function. All other custom functions can exist on a Client Event script record if you are working
with record-level scripts. If you are working with form-level scripts enter the custom functions
on the Custom Code subtab on the custom transaction record, and create a User Event script
for the BeforeSubmit function. For more information, see Using Record-Level Scripts in the
Shopping Cart.
Setup
The sample script does not require any custom fields or records. This script requires that you create a
record-level script of type User Event to define the BeforeSubmit function.
Create the Code
// BEGIN CUSTOM FUNCTIONS FOR SETTING LOCATIONS FOR WEB ORDERS
// This custom function is run immediately before a sales order is saved.
function customBeforeSubmit()
{
debug('Before Submit is called');
return chooseLocation();
}
//END CUSTOM FUNCTIONS FOR SETTING LOCATION
//BEGIN LOCATION
SuiteCommerce Site Builder Guide
Sample Scripts for Scriptable Cart
function chooseLocation()
{
// Get entire quantities of all inventoried items in the sales order. Note that optional filtering
// criteria is used when calling the getItemMap() function to exclude noninventory items.
var
var
var
var
itemMap = getItemMap('NonInvtPart');
numLines = nlapiGetLineItemCount('item');
goodLocations = new Array();
badLocations = new Array();
// Get available quantities for each location of each item on the order.
for (itemId in itemMap)
{
debug('Loading record for item id '+itemId);
var rec = nlapiLoadRecord('inventoryitem', itemId);
debug('Item record '+itemId+' loaded - getting location count');
var locCount = rec.getLineItemCount('locations');
debug('Starting loop for '+locCount+' locations');
for (var i=1; i <= locCount; i++)
{
var locId = rec.getLineItemValue('locations', 'location', i);
var onhand = rec.getLineItemValue('locations', 'quantityavailable', i);
// Current quantity of item is stored under itemMap[itemId] if there is enough quantity
// available for this order at this location, add it to the good location list.
if (itemMap[itemId] <= onhand)
{
debug('Location '+locId+' has '+onhand+' available - added to good list');
goodLocations[locId] = true;
}
// If there is not enough quantity for the item, then add this location to the bad location list.
if (itemMap[itemId] > onhand)
{
debug('Location '+locId+' has '+onhand+' available - added to bad list');
badLocations[locId] = true;
}
}
}
// Take any bad locations out of the good list.
for (locId in badLocations)
{
delete goodLocations[locId];
}
var finalLocation = 1;
// default in the case of no good locations found
SuiteCommerce Site Builder Guide
232
Sample Scripts for Scriptable Cart
for (goodLoc in goodLocations)
{
debug('Location '+goodLoc+' can provide for all items in the sales order - setting locati
on to this');
finalLocation = goodLoc;
break;
}
nlapiSetFieldValue('location', finalLocation, true, true);
return true;
}
// END LOCATION
// BEGIN UTILITY FUNCTIONS
function isEmpty(val)
{
return (val == null || val == '');
}
function isNotEmpty(val)
{
return !isEmpty(val);
}
// This function will return a map with the internal IDs for the item as the key and the total
// quantities for that item in the value. It will sum up any items in the items sublist on the sales
// order. If passed a non-null filter value, will exclude item types that match the filter.
function getItemMap(excludeFilter)
{
if (isNotEmpty(excludeFilter))
{
debug('getItemMap called with filter '+excludeFilter);
}
var itemMap = new Array();
var numLines = nlapiGetLineItemCount('item');
for (var i=1; i<= numLines; i++)
{
// Include only items that match the filter.
var itemType = nlapiGetLineItemValue('item','itemtype',i);
if (isNotEmpty(excludeFilter) && itemType == excludeFilter)
{
debug('Ignoring line '+i+', itemType '+itemType+' excluded');
continue;
}
var itemId = nlapiGetLineItemValue('item','item',i);
var nextQty = parseInt(nlapiGetLineItemValue('item','quantity',i));
SuiteCommerce Site Builder Guide
233
Sample Scripts for Scriptable Cart
234
debug('Item '+itemId+' of type '+itemType+' added to item map');
if (itemId in itemMap)
{
// Add the quantities together if other line items in the items sublist on the sales order exist
// with the same item.
nextQty = nextQty + parseInt(itemMap[itemId]);
}
debug('Item Id '+itemId+' has updated quantity to '+nextQty+' because of line #'+i);
itemMap[itemId] = nextQty;
}
return itemMap;
}
function debug(val)
{
nlapiLogExecution('AUDIT', val);
}
// END UTILITY FUNCTIONS
Deploy Your Script to the Shopping Cart
NetSuite recommends that you test your script thoroughly before running it in the shopping cart. You
must follow a series of steps to load the script into your NetSuite account, and then run the script for
testing purposes.
For details, see Deploying and Running Scriptable Cart.
Accepting Charitable Donations
Use SuiteScript to accept charitable contributions on your website.
Create an item record for display on the web store as a charitable donation item. The shopper adds
this item to the shopping cart and enters the amount of donation he or she wants to make. After
the item is added to the cart, the total amount of the order is recalculated to include the non taxable
donation.
Setup
Use the steps below to create the charitable donation item record, and custom item options required
to run the sample script. Note that you must complete the following setup steps to use the code
sample successfully.
1. Create a non-inventory item for sale. This will be the Charitable Contribution item displayed on
the web store.
a.
Go to Lists > Items > New. Click Non-inventory For Sale.
b.
Check the Display in Web Site box.
SuiteCommerce Site Builder Guide
Sample Scripts for Scriptable Cart
c.
On the Pricing subtab, set the base price to 0.00.
d.
On the Store subtab, select a Site Category to display the item on your website.
235
Note: By default, items that do not have a price specified on the item record,
display a default message on the web store. To change this message, go to Setup
> Site Builder > Customize Text.
On the Messages subtab, enter a custom message to replace the value in the Default
Text column.
2. Create a transaction item option custom field linked to the Charitable Contribution item you
created in Step1.
a.
Go to Customization > Lists, Records, & Fields > Transaction Item Options.
b.
In the Label field, enter a name for this item option.
c.
In the ID field, enter _contribution.
Note: After you save the transaction item option, the value for ID automatically
changes to custcol_contribution. The sample script depends on this value for ID.
d.
On Applies To subtab, check the Web Store box, and the Sale box.
e.
In the Items multiple select list, choose the item created in Step 1.
Create the Code
// BEGIN CUSTOM FUNCTIONS FOR CHARITABLE CONTRIBUTIONS
function customValidateLine(type)
{
// All validations occur in the item tab.
if (type != 'item')
{
return true;
}
// Note that validation routines are called differently from other events, because the return
// value of each function must be tested before going on to the next function. If any function
// returns false, stop processing and return false.
if (!charity())
{
return false;
}
// All validations passed. Return true.
return true;
}
//END CUSTOM FUNCTIONS FOR CHARITY CONTRIBUTION
SuiteCommerce Site Builder Guide
Sample Scripts for Scriptable Cart
///CHARITY CONTRIBUTION
function charity()
{
// Internal ID of the charity item record.
var charityId = 384;
// Ignore any items other than the charity item record.
if (charityId != nlapiGetCurrentLineItemValue('item', 'item'))
{
return true;
}
debug('Charity item detected');
// Validate that the amount in the custom field is greater than zero.
var contribAmount = nlapiGetCurrentLineItemValue('item','custcol_contribution');
debug('Contribution '+contribAmount+' read in');
if (isEmpty(contribAmount) || contribAmount <= 0)
{
alert('You must contribute an amount that is greater than zero!');
return false;
}
debug('Contribution valid - setting the item rate');
// Set the price of the line item to the contribution amount.
setCurrentLineRate(contribAmount);
return true;
}
///END CHARITY CONTRIBUTION
//BEGIN UTILITY FUNCTIONS
function isEmpty(val)
{
return (val == null || val == '');
}
function isNotEmpty(val)
{
return !isEmpty(val);
}
// This function updates the rate and recalculates the value for amount.
SuiteCommerce Site Builder Guide
236
Sample Scripts for Scriptable Cart
237
function setCurrentLineRate(rate)
{
nlapiSetCurrentLineItemValue('item', 'rate', rate, true, true);
var qty = parseInt(nlapiGetCurrentLineItemValue('item', 'quantity'));
var amount = qty * rate;
nlapiSetCurrentLineItemValue('item', 'amount', amount, true, true);
}
//END UTILITY FUNCTIONS
Deploy Your Script to the Shopping Cart
NetSuite recommends that you test your script thoroughly before running it in the shopping cart. You
must follow a series of steps to load the script into your NetSuite account, and then run the script for
testing purposes.
For details, see Deploying and Running Scriptable Cart.
SuiteCommerce Site Builder Guide
Download PDF