Sca Admin Guide

Download as pdf or txt
Download as pdf or txt
You are on page 1of 58

SuiteCommerce Advanced Administrator’s Guide

April 26, 2017 2016.2


General Notices
Sample Code

NetSuite Inc. 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.

NetSuite 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, customers may not use the
Service in excess of limits or thresholds that NetSuite considers commercially reasonable for the
Service.  If NetSuite reasonably concludes that a customer’s use is excessive and/or will cause
immediate or ongoing performance issues for one or more of NetSuite’s other customers, NetSuite
may slow down or throttle such customer’s excess use until such time that the customer’s use stays
within reasonable limits. If a 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.

Integration with Third Party Applications

NetSuite may make available to Customer certain features designed to interoperate with third party
applications. To use such features, Customer may be required to obtain access to such third party
applications from their providers, and may be required to grant NetSuite access to Customer’s
account(s) on such third party applications. NetSuite cannot guarantee the continued availability of
such Service features or integration, and may cease providing them without entitling Customer to
any refund, credit, or other compensation, if for example and without limitation, the provider of a
third party application ceases to make such third party application generally available or available
for interoperation with the corresponding Service features or integration in a manner acceptable to
NetSuite.

Copyright

This document is the property of NetSuite Inc., and may not be reproduced in whole or in part without
prior written approval of NetSuite Inc. For NetSuite trademark and service mark information, see
www.netsuite.com/portal/company/trademark.shtml.

© 2017 NetSuite Inc.


Table of Contents
SuiteCommerce Advanced Setup ............................................................................................. 1
Creating a Website ............................................................................................................ 1
Enabling SCA Features ........................................................................................................ 1
Item Configuration for Web Stores ....................................................................................... 2
Item Setup for SCA ........................................................................................................ 2
Item Search Index ......................................................................................................... 3
Item Inventory in Web Stores .......................................................................................... 4
SCA Item Search Settings .................................................................................................... 7
Search Fields ................................................................................................................. 8
Search Results ............................................................................................................... 9
Sort Fields for Search Results ........................................................................................ 13
Facet Fields ................................................................................................................. 16
Field Sets .................................................................................................................... 17
The Item Search Index Process ...................................................................................... 20
SCA Domains and Touch Points ......................................................................................... 24
SCA Product Images ......................................................................................................... 26
Renaming Image Files with an Item Identifier .................................................................. 27
Setting the SuiteCommerce Advanced Image Domain and the Image Folder ......................... 28
Uploading Images to the File Cabinet for SuiteCommerce Advanced ................................... 29
Setting Up Image Resizing for SuiteCommerce Advanced .................................................. 29
Viewing Images on Item Records with SuiteCommerce Advanced ........................................ 31
SCA Web Site Preferences ................................................................................................. 32
SuiteCommerce Advanced Installation .................................................................................... 33
Initial Installation ............................................................................................................. 36
Migration to New Releases ................................................................................................ 38
Minimum Setup Requirements .......................................................................................... 41
Field Set Setup Script ................................................................................................... 47
Touch Points ................................................................................................................... 50
Diff and Patch Files .......................................................................................................... 51
How to Apply Diff Files ................................................................................................. 52
Diff File Structure ......................................................................................................... 53
SuiteCommerce Advanced Setup 1

SuiteCommerce Advanced Setup

Creating a Website
To create a SuiteCommerce Advanced website, you must first enable features, and then set up item
records, create custom fields, and configure item search settings. Follow the steps below to create a
SuiteCommerce Advanced website:

1. Contact your NetSuite account representative to provision SuiteCommerce Advanced in your


account, and then turn on the SuiteCommerce Advanced feature. For more information, see
Enabling SCA Features.
2. Prepare item records for use in your SuiteCommerce Advanced website. See Setting Up Item
Records for SuiteCommerce Advanced.
3. Go to the SuiteCommerce Advanced website Setup page to complete the tasks listed below:
a. Set up preferences for the Item Search API. For more information, see SCA Item Search
Settings.
b. Enter custom shopping domains, and associating those domains with SSP application
touch points. For more information, see SCA Domains and Touch Points.
c. Map image files to item records, and image resizing. For more information, see SCA
Product Images.
d. Set general preferences for your site such as, email templates, payment options,
shipping preferences, and languages. For more information, see SCA Web Site
Preferences.
4. To optimize your site and decrease website load time, configure caching. See the help topic
Caching.
5. Use the Item Search API for product presentation, faceted navigation, and product keyword
search. See the help topic Item Search API Overview.
6. Set up your local environment to download the source code and deploy your initial site. See the
help topic SCA Developer Tools.

Enabling SCA Features


The first step in creating a SuiteCommerce Advanced site is to contact your account representative
for provisioning the appropriate modules in your account. Note that some features you need for
SuiteCommerce Advanced are associated with Site Builder.
Next, an Administrator can turn on the features you will need to get started. The list below includes all
the features you need to create a SuiteCommerce Advanced website.

1. Go to Setup > Company > Enable features.


a. Click the SuiteCloud subtab, enable the following features:
■ Client SuiteScript
■ Server SuiteScript
■ SuiteScript Server Pages
■ Web Services
b. Click the Web Presence subtab, enable the following features:
■ Web Site
Enabling SCA Features 2

■ Web Store
■ Advanced Site Customization
■ Descriptive URLs
■ Host HTML Files
■ SuiteCommerce Advanced
■ Online Ordering

Note: If you are using the My Account reference implementation and you do
not have the Online Ordering feature enabled, Sales Order details can not be
viewed in the web store.

After you finish enabling features, go to the next step, Setting Up Item Records for SuiteCommerce
Advanced.

Item Configuration for Web Stores


To set up item records for SuiteCommerce Advanced, you must complete general NetSuite item record
setup tasks. In addition to setting up item records for your website, you must also complete a set of
tasks to prepare items for the search index.

Step Task Description

Step 1 Set Up Item Records for SCA This section provides instructions for displaying
an item on your SCA website.
Item Setup for SCA

Step 2 Set Up Item Records for the This section details how to set up the search
Search Index index for item records on the web store.
Item Search Index

Step 3 Set Up Item Inventory for This section details how to set up the item
web store inventory for the web store.
Item Inventory in Web Stores

Step 4 Improve SEO Ranking for web This section provides tips on optimizing search
(If necessary) store engine results for the web store.
SCA Search Engine Optimization (SEO)

Step 5 Create Commerce Categories This section details how to use commerce
(If necessary) categories.
Commerce Categories

Item Setup for SCA


This section details how to make items which are already created available to site visitors for viewing
and purchase on your web store. If your item is not yet created, see the help topic Creating Item
Records. To make your item available for display on your web store, you must complete the following
tasks in the item record:

To make your item available for display on your web store:


1. Go to Lists > Accounting > Items.
Item Configuration for Web Stores 3

2. Use the Sales/Pricing subtab to enter a price for the item.


3. On the Web Store subtab under Web Store Display, check the Display in Web Store box.
4. In the Page Title field, enter the text you want to appear as the page’s title for that item. This text
appears in the browser tab. Use a descriptive title for the item page, this can help achieve better
results with search engine ranking.
5. In the Web Store Display Name field, enter the name to show in the Website for this item.
6. In the Web Store Description field, enter a brief description of this item.
7. In the Detailed Description field, enter the details about the item to display when a site visitor
views the item.
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.
8. In the Featured Description field, if this is displayed on the home page of your Website, 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. You can enter up to 999 characters including basic HTML code. Enter and format text using
the formatting options, or click the HTML Source Code link to enter HTML.
9. Attach and display images with the items in the web store. See SCA Product Images.
10. Enable Commerce Categories as required. See the help topic Commerce Categories.
11. Click Save.

Item Search Index


On a SuiteCommerce Advanced site, item records published to your website are indexed to a search
server. After the search index process is complete, fields from item records are available for display on
your site. A web developer can use the Item Search API to query the server and return data from any
field on the item record.

Field sets also play an important role in product display. Field sets are a collection of fields that you
select from item records to display on your site. A web developer can use API calls to field sets to
display product information on your site.

While setting up item records, consider which item record attributes you want to use on your site.

Note: Search fields, facet fields, sort fields, and Field Sets exposed to your website can be any
combination of standard item record fields, and custom item record fields.

For example, two facets that are commonly used on e-commerce sites are: price and brand. In
NetSuite, price is a standard field on item records. Brand would be a custom field that you create.
Include both fields in the field sets so price and brand information can be displayed on your
SuiteCommerce Advanced site.

The search index plays a key role in product display. The search index picks up the item attributes that
you want to expose on your site including fields used for search, faceted navigation, sorting, and field
sets. Item records must be indexed to the search server before data from item record fields can be
used. For more information, see The Item Search Index Process.

Another consideration is how you want item records to be indexed. You can index all item records
in NetSuite by setting the Show Uncategorized Items preference, or you can select the item records
you want indexed. For more information, see Guidelines for Using the Show Uncategorized Items
Preference.
Item Configuration for Web Stores 4

To set up item records for the search index:


1. Go to Lists > Web Site > Items.
2. Determine which standard fields you want to use as search fields, facet fields and sort fields.
Make sure there is data in each of the fields you plan to access with the Item Search API.
Consider the list of supported API calls. For more information, see the help topic Item Search API
Input Parameters.
3. Determine the fields on the item record you will use to create field sets.
For example, for SEO purposes, you can use descriptive URL components in an item template.
To do this, you must enter a value in the URL Component field on item records, and then include
the URL Component field in a Field Set.
For more information, see Field Sets.
4. Create custom fields for use as search fields, facet fields and sort fields. For example, you can
create a custom item field named Brand.

Note: Only certain field types are supported as facet and sort fields. For more
information, see Field Set Reference.

5. Enter information in the custom fields you created. For example, if you created the custom field
Brand, enter the brand on each item record for display on your site.
6. Check the Display in Web Site box on the item record.
7. Clear the Inactive check box. Items marked Inactive will not be included in the search index.
8. Choose whether to index all item records marked to display in the website by checking the
Show Uncategorized Items preference, or index only the items published to the site. For more
information, see Including Item Records in the Search Index.
9. Click Save on the item record when you have finished entering data.

Ensure the item record has data in all the standard and custom fields that you want to use on your site.

Note: Saving an item record triggers a search index update, not an index rebuild. After you
have completed setting up item records, then you can configure search settings. You will need to
use the fields you set up on your item records to configure search settings properly.

Select your item search settings at Setup > SuiteCommerce Advanced > Set Up Web Site. Use the
Search Index subtab to set search preferences, and the Field Sets subtab to select all the fields you
want to show on your website. For more information, see SCA Item Search Settings

Item Inventory in Web Stores


SuiteCommerce Advanced relies on multiple fields to determine on-hand inventory visibility in your
web store. How you set up the following fields determines what and how items display. Some fields
take precedence over others.

Setting Precedence

Precedence Field Location in NetSuite

1 Make Inventory Available in Web Store Store Record


Item Configuration for Web Stores 5

Precedence Field Location in NetSuite

2 Drop Ship Item Inventory Item Record

Special Order Item Inventory Item Record

Drop Ship/Special Order Items are Web Site Setup Record


Always in Stock

3 Out of Stock Behavior Inventory Item Record

4 Include Out of Stock Items in Web Store Web Site Setup Record

The following diagram details the logic behind NetSuite’s inventory visibility based on these field
settings:

Make Inventory Available in Web Store


This setting takes precedence over all other inventory visibility settings. If any location is not set up
to display inventory in the web store, that store’s inventory does not appear, regardless of any other
settings.

Drop Ship Item, Special Order Item, and Drop Ship/Special


Order Items are Always in Stock
Assuming a location’s inventory is available in the web store, these settings take the next level of
precedence. If an inventory item is marked as a Drop Ship or Special Order item and the Drop Ship/
Item Configuration for Web Stores 6

Special Order Items are Always in Stock field is checked, the item is considered in stock and appears
in the web store.

Out of Stock Behavior


If an inventory item is out of stock, this setting determines the next level of precedence. Keep the
following in mind when setting this field:

■ If you set this field to Default, the Site Setup Record’s Include Out of Stock Items in Web Store field
takes precedence.
■ If you set this field to Remove Item When Out of Stock, NetSuite does not index the item for
availability on your web site and ignores the Site Setup Record’s Include Out of Stock Items in Web
Store field.
■ If you set this field to any other option, NetSuite indexes the item for availability on your site and
ignores the Site Setup Record’s Include Out of Stock Items in Web Store field.
■ This setting is not available for Sub Items.

Include Out of Stock Items in Web Store


This field takes precedence only if the Inventory Item’s Out of Stock Behavior field is set to Default.

Example:

You have two store locations with on-hand inventory, and you want your web store to function in the
following ways:

■ You want Store Location A’s inventory to be available in your web store.
■ You do not want Store Location B’s inventory to be available in your web store.
■ You do not want any out-of-stock items to appear in your web store.
■ You want drop-ship items to always be listed as in stock.

Your NetSuite set up will look like this:

Location in NetSuite Field Setting

Store Record for Location A Make Inventory Available in Checked


Web Store

Store Record for Location B Make Inventory Available in Unchecked


Web Store

Inventory Item Record (for any items Drop Ship Item Checked
to be listed as drop ship items)

Web Site Setup Record Drop Ship/Special Order Items Checked


are Always in Stock

Inventory Item Record Out of Stock Behavior Remove item


when out-of-stock

Based on these settings, the Site Setup Record’s Include Out of Stock Items in Web Store field does
not apply.
SCA Item Search Settings 7

SCA Item Search Settings


SuiteCommerce Advanced provides enhanced item search capabilities for your website. On the Web
Site Setup page, you can configure the item search settings for your site using the subtabs, Search
Index and Field Sets.

After you complete the setup tasks listed below, click Save on the Web Site Setup page to trigger the
search index process. When the index process is complete, a web developer can start Item Search API
Overview.

Task Before you begin Goal

1. Search Fields Identify the item record fields that contain key words Define relevance ranking
shoppers will use when searching for products on your of search results on your
site. site.

2. Sort Fields Determine the item fields you want to use as sorting Influence the order in
for Search options on your site. which products are listed
Results For example, you may want to allow shoppers to sort in search results.
their search results by brand or online price.

3. Facet Fields Make sure you have set up your item records correctly. Enable a web developer
Determine the item attributes that shoppers can use to use the Item Search
to filter their searches for products on your site. API for designing faceted
navigation.

4. Field Sets Determine different collections of fields that are Define the item record
appropriate for different product views. fields exposed to site
For example, you can create one field set that contains templates.
only the product name and description. Use this field Enable a web developer to
set for the search results template. Create another use the Item Search API to
field set that includes more data, such as price and access field sets.
brand. Use the second field set for an item detail view
template.
SCA Item Search Settings 8

For information about search settings, such as details about fields exposed in field sets, field types
supported by facets and sorting, as well as details about the search index process, see Field Set
Reference.

Search Fields
Use the Search Fields subtab to select item attributes that shoppers use to search for products on
your site. Here, you can also boost the relevance ranking of each field by organizing the list in order of
relevance. The fields used for most relevant matches should appear at the top of the list.

Note: Avoid adding excessive search fields as it can have performance implications and result
in less relevant search results.

The list on the Search Fields subtab defines the relevance ranking of search results. The top row shows
the item field and the type of match that results in highest relevance ranking. Each subsequent row
results in lesser relevance ranking. For example, put exact matches at the top of the list to get the
highest relevance ranking for exact matches.

NetSuite provides default settings to get you started. However, you can drag and drop rows to
rearrange the list. You can also add or remove fields to customize your Search. For more information,
see Best Practice for Controlling the Order of Search Results.

Note: For items to be searchable on your website, item fields that you add under Search Fields
should have values assigned to them in the item record.

Observe the following definitions for each type of match as it would be applied to the item attribute
text "wifi router":

Type of Match Description

Keyword Appears anywhere in the text. For example, the shopper types “router” in the
search box. The search matches “wifi router."

Exact Matches the exact text of the item field contents. For example, the shopper types
“wifi router” in the search box. The search matches “wifi router.”

Starts With Exact Matches the exact text from the beginning of a field but only up to the first 20
characters. For example, the shopper types “wifi” or “wifi rou” in the search box.
The search matches “wifi router.”

Fuzzy Matches similar text or misspellings up to two characters different. For example,
the shopper types “mifi” in the search box. The search matches “wifi router.”

Starts with Behaves the same as Keyword search but only for the first 20 characters of every
word in a field. For example, the shopper types "wifi" in the search box. The
search matches "wifi router."
SCA Item Search Settings 9

By default, the standard full-phrase search is enabled for your SuiteCommerce Advanced website.
With the full-phrase search, the entire search query (consisting of multiple terms separated by spaces)
is treated as a single phrase, and only exact matches are returned. For example, with the “mini wifi
router” search query, items containing only the exact phrase “mini wifi router” are returned.

An alternative search mechanism is the multi-term search. With the multi-term search enabled, all
items containing at least two of the specified terms ("mini", "wifi", or "router") are returned for the “mini
wifi router” search query.

Important: If you wish to enable the multi-term search feature for your SuiteCommerce
Advanced website, you should contact NetSuite Technical Support.

After you have selected the fields you want shoppers to be able to search on, and you have
reorganized the list in your preferred order of relevance, go to the next step in configuring
SuiteCommerce Advanced item search settings, Sort Fields for Search Results.

You can also refer the Field Set Reference topic, which includes a spreadsheet of all fields available for
search, facets, sorting and field sets.

Search Results
The search returns results based on your search setup, item data, and search query. This section
describes an example search setup, sample data set, and several use cases that illustrate expected
results for a search based on this setup.

Example Search Setup


Following is an example search setup with detailed expected results.

Entry # Field Search

1 Online Name Exact Match

2 Online Name Keyword

3 Item Name/Number Exact Match

4 Item Name/Number Fuzzy

5 Product Description Keyword

Note: On the Search Fields subtab, the Item Name/Number field is displayed as Name in the
Search dropdown list.

The following table details the relative weights of searches based on all parameters.

Entry # Search Type of Match Weight (Hidden)

1 Online Name Exact Match 5

2 Online Name Keyword 4

3 Item Name/Number Exact Match 3

4 Item Name/Number Fuzzy 2


SCA Item Search Settings 10

Entry # Search Type of Match Weight (Hidden)

5 Product Description Keyword 1

Sample Searches
To clarify expected search results based on the search algorithm described above, consider the
following product data set and example use cases.

Note: Use cases assume that the information in the product data set is available in the item
record and only these items are in the account and active on the website.

■ Use Case 1 — Search Term: Jacket


■ Use Case 2 — Search Term: Waterproof Pants
■ Use Case 3 — Search Term: FMHJ-B-40

Product # Item Name/Number Online Name Description

1 FMBT-B-40 Filament Miler Blue Blue is the trendy fall color. A


Tight perfect spark to your workout is
found in these Filament Tights!

2 WCB-U-M Way2Cool Stylish bandana or neck and face


Bandana gaiter.

3 FMS-S-40 Flannel Mojo Shirt Trends come and go, but flannel
is forever. And since all Mojo
shirt patterns are uniquely Sports
Gear, you won't ever bump into
your twin.

4 CWP-B-30 Convertible Light and quick to dry, this is


Waterproof Pants great for hiking. Zip off the legs
for shorts.

5 OWP-B-30 Outdoor Light and quick to dry, these


Waterproof Pants hiking waterproof pants deliver.
The Mesa seems like an old
favorite from the moment you
put it on.

6 PSG-B-06 Power Stretch Snug fitting Polartec® Power


Glove Stretch® keeps hands warm and
allows them to breathe. Can be
worn alone or as a liner.

7 FB-OC-10 Fenite Beanie Stylish outdoor cap that is warm


and cozy.

8 BDB-AL-40 Barn Door Belt 40 mm cotton webbing belt with


an extruded aluminum buckle.
Buckle also functions as a bottle
opener. Logo screenprinted on
buckle for extra style points.

9 FMHJ-R-40 Flannel Miler A stylish warm flannel look.


Reversible Hooded These jackets give you the
Jacket warmth you need from jackets
ready for the wilderness.
SCA Item Search Settings 11

Product # Item Name/Number Online Name Description

10 FMHJ-B-40 Flannel Miler Bluff Oh the places you will go in these


Hooded Jacket hooded jackets!

Use Case 1 — Search Term: Jacket


Product # Search Type of Products # that Matching term
Match match

1 Online Name Exact Match - -

2 Online Name Keyword 9, 10 9 - Flannel Miler


(9 & 10 have Reversible Hooded Jacket
equal weight) 10 - Flannel Miler Bluff
Hooded Jacket

3 Item Name/ Exact Match - -


Number

4 Item Name/ Fuzzy - -


Number

5 Product Keyword 9, 10 9 - A stylish warm flannel


Description (9 has higher look. These jackets give
weight since you the warmth you need
the search term from jackets ready for
appeared more the wilderness.
frequently) 10 - Oh the places
you will go in these
hooded jackets!

Search Results are returned to the customer in the following order:

Product # Item Name/Number Online Name Description

9 FMHJ-R-40 Flannel Miler A stylish warm flannel look.


Reversible Hooded These jackets give you the
Jacket warmth you need from jackets
ready for the wilderness.

10 FMHJ-B-40 Flannel Miler Bluff Oh the places you will go in


Hooded Jacket these hooded jackets!

Use Case 2 — Search Term: Waterproof Pants


Product # Search Type of Products # that Matching term
Match match

1 Online Name Exact Match - -

2 Online Name Keyword 4, 5 4 - Convertible


(4 & 5 have equal Waterproof Pants
weight) 5 - Outdoor Waterproof
Pants

3 Item Name/ Exact Match - -


Number
SCA Item Search Settings 12

Product # Search Type of Products # that Matching term


Match match

4 Item Name/ Fuzzy - -


Number

5 Product Description Keyword 5 5 - Light and quick to dry,


these hiking waterproof
pants deliver. The
Mesa seems like an
old favorite from the
moment you put it on.

Search Results are returned to the customer in the following order:

Product # Item Name/Number Online Name Description

5 OWP-B-30 Outdoor Light and quick to dry, these


Waterproof Pants hiking waterproof pants deliver.
The Mesa seems like an old
favorite from the moment you
put it on.

4 CWP-B-30 Convertible Light and quick to dry, this is


Waterproof Pants great for hiking. Zip off the legs
for shorts.

Use Case 3 — Search Term: FMHJ-B-40

Product # Search Type of Match Products # that Matching term


match

1 Online Name Exact Match - -

2 Online Name Keyword - -

3 Item Name/Number Exact Match 10 10 - FMHJ-B-40

4 Item Name/Number Fuzzy 1, 9, 10 1 - FMBT-B-40


(all have equal 9 - FMHJ-R-40
weight) 10 - FMHJ-B-40

5 Product Description Keyword - -

Search Results are returned to the customer in the following order:

Product # Item Name/Number Online Name Description

10 FMHJ-B-40 Flannel Miler Bluff Oh the places you will go in


Hooded Jacket these hooded jackets!

1 FMBT-B-40 Filament Miler Blue is the trendy fall color. A


Blue Tight perfect spark to your workout is
found in these Filament Tights!

9 FMHJ-R-40 Flannel Miler A stylish warm flannel look.


Reversible Hooded These jackets give you the
Jacket
SCA Item Search Settings 13

Product # Item Name/Number Online Name Description


warmth you need from jackets
ready for the wilderness.

Sort Fields for Search Results


You can influence the order in which products are listed in search results on your site. First, identify
item record fields that contain keywords that customers may use to find products. Then select those
fields on the Search Fields subtab. The default Relevance setting on the Sort Fields subtab is affected by
your settings on the Search Fields subtab. You can mark Search Fields for exact match to improve the
relevance score.

Note that the relevance score is based on how the search index scores query term matching, and the
order of the fields on the Search Fields subtab. To have more control of the sort order of search results,
select more sort fields in addition to using the default Relevance setting.

To define sort fields for search results:


1. Go to Setup > SuiteCommerce Advanced/Site Builder > Set Up Web Site.
2. Click Edit next to your SuiteCommerce Advanced site.
3. Click Search Index, and then Sort Fields.
Note that Relevance is selected by default. You cannot remove Relevance from the list. You can
select other item fields to use as sorting options for your site. For more information, see Best
Practice for Controlling the Order of Search Results.
■ Field Name — (Required) Select an item record field. Select item attributes that you want
shoppers to use for sorting search results.

Note: Only certain fields on item records are available as sorting options based on
the field type. For more information, see Field Set Reference.

■ Field ID — (View only field) Displays the field's internal ID.


■ Sort Order — Choose ascending or descending order. This is the order in which products are
sorted in search results.

Note: If you have set up multiple price levels for items, ensure that you add all the price
level fields as sort fields. However, you need not configure these additional price level
fields as sort fields as described in the next step.

4. Configure the sort field.


1. Select the domain to configure at Setup > SuiteCommerce Advanced > Configuration.
2. In the SuiteCommerce Configuration record, navigate to the Search tab and the Result
Sorting subtab.
3. Define your sort options. For details, see the help topic Result Sorting Subtab.
For example, if a custom field, custitem41 has been configured as a sort field in the
web site record, a line item for that field must be added to the Desktop, Phone, and
Tablet sections before the selection is available on the web store in the applicable
browser.
SCA Item Search Settings 14

Note that to configure sort fields for pre-Vinson implementations, the sortOptions array in
the SC.Shopping.Configuration.js configuration file must be extended to include the new sort
field. For guidance on extending your implementation, see the help topic Customize and Extend.
For example, if a custom field, custitem41 has been configured as a sort field in the web site
record, a line item for that field must be added to the sortOptions array before the selection is
available on the web store.

sortOptions: [
{id: ­'relevance:asc', name: _('Sort by relevance').translate(), isDefault: true}
, {id: ­'onlinecustomerprice:asc', name: _('Sort by price, low to high').translate()}
, {id: ­'onlinecustomerprice:desc', name: _('Sort by price, high to low ­').translate()}
, {id: ­'custitem41:desc', name: _('Sort by best seller, low to high ­').translate()}
]

Note: By default, the onlinecustomerprice field is added as a sort option. SuiteCommerce


Advanced is pre-configured to display two pricing options: Sort by price, low to high and Sort by
price, high to low. No additional configuration is needed to support price sorting.

After you have selected sort fields for search results, go to the next step in configuring SuiteCommerce
Advanced item search settings, Facet Fields.

Combine Sort Fields Using Item Search API


Even if the default sort order is by the relevance score, you can manipulate the sort order by using
a custom item field along with the relevance field. This is beneficial when two or more items in the
search results have the same relevance score, and you want to use another parameter as a tie breaker
to display the search results. For example, you could use Most Popular or Best Seller as another
parameter.

Since API calls override default settings in NetSuite, you can use an Item Search API request to combine
multiple sort fields and display the search results.

For example, suppose you add a custom field, Best Seller (custitem_best_seller), to your item
record to record the best selling item. Enter a value in the custom field on item records, assigning
numbers 1 – 10, with 10 being the best selling item. Then, use an Item Search API request to sort by
Relevance and Best Seller.

/api/items?sort=relevance,custitem_best_seller:desc

For information on Item Search API, see the help topics Item Search API Overview, and for the complete
list of parameters supported by the Item Search API, see Item Search API Input Parameters.

Sort Options and Matrix Items


When working with Matrix items, ensure that sorting values are consistent between the child and
parent records. For fields defined as sortable, define those fields in child items with the same values as
defined for the parent items. If values differ, you will see inconsistent sorting results.

For example, suppose you have added a custom field, Best Seller, to your item record. If the value for
Best Seller is set on the parent record but the same value is not set on the child records, sorting on
Best Seller may not return the parent records in the expected order.

Note that parent items are assigned a sort value defined as the lowest sort field value from amongst
their children. The parent items are then sorted according to those selected sort values.
SCA Item Search Settings 15

Best Practice for Controlling the Order of Search Results


Use a combination of Search Fields and Sort Fields that are appropriate for your site. Your settings on
the Search Fields tab influence the sort order of search results. The top row on the Search Fields list
shows the item field and the type of match that result in highest relevance ranking. Ranking is based on
the sequence of search terms. For best results, define exact matches at the top of the list.

For example, to rank keywords in the Online Name field on item records first, make sure the field is
selected at the top of the list. Put fuzzy matches at the bottom of the list, or remove them. If your
intention is to return accurate ordering of search results (for example, return all items that match
Shirt at the top of list), then do not include fuzzy match fields at the top of the list of Search Fields.
Because the list of search fields is ranked in order, top to bottom, fuzzy matches near the top of the
list can return irrelevant items (short vs. shirt) at the top of the search results list. To further control the
sequence of search results, use the Item Search API to specify values for the sort parameter.

To control sorting and sorting sequence:


1. Click the Search Fields subtab.
a. Determine the item attribute fields whose relevance score you want to improve.
b. Select these fields first on the Search Fields subtab.
c. Set the type of match to Exact.

Note: Select an appropriate type of match based on the type of field that you
select. For example, for a product description field that has lot of text, Keyword
might be a better type of match.

2. Click the Sort Fields subtab.


3. Select the fields you want to use for sorting search results on your site.
4. Click Save.
5. Make Item Search API calls to the same fields you defined on the Sort Fields subtab to further
refine the sort order.

Note that API calls override default settings in NetSuite. For example, you can create a custom field
called, Most Popular. Enter a value in the custom field on item records, assigning numbers 1 – 10.
Then, use an Item Search API request to sort by Most Popular.

http://www.mystore.com/api/items?sort=mostpopular:asc

For the complete list of parameters supported by the Item Search API, see the help topic Item Search
API Input Parameters

Additional Notes on Sorting


■ Adding a related items group to an item does not affect ranking. The related items are loaded and
included in the response but any sorting behavior applied to the top-level items is not applied to the
list of related items.
SCA Item Search Settings 16

■ At a high level, ranking is related to the frequency with which a term appears on item records. For
example, if the term Shirt appears in four fields on an item record, then this item will have a higher
relevancy score than an item where the term only appears in one field.

Facet Fields
Select the facets, or item attributes, that shoppers can use to filter their searches for products on your
site.

After you have selected Facet Fields, a web developer can use the Item Search API to query for
products with a certain facet value.

For more information, see the help topic Item Search API Input Parameters.

Best Practice:

■ Before selecting facets on the Web Site Setup page, make sure you have set up your item records
correctly. For more information, see Setting Up Item Records for SuiteCommerce Advanced.
■ Only certain fields on item records are supported for faceted navigation based on the field type. For
more information, see Field Set Reference. This topic includes a spreadsheet of all fields available
for search, facets, sorting and field sets.
■ Avoid adding excessive Facets or Facet Values. For more information, see the help topic SEO Page
Generator Best Practices.
■ You must limit the length of facet field values to 200 characters. If the facet field value exceeds the
maximum character length, the search index fails to rebuild.

To select facet fields for the search index:


1. Go to Setup > SuiteCommerce Advanced/Site Builder > Set Up Web Site.
2. Click Edit next to your SuiteCommerce Advanced site.
3. Click Search Index, and then Facet Fields.
1. Facet Field Name — (Required) Select the fields that shoppers can use to filter product
searches and browse products on your website. Typically, a variety of product attributes
are used as facets, for example: Brand, color, or gender.
2. Field ID — (View only field) Displays the field's internal ID. You can use this ID in calls to
the Item Search API. The Field ID also appears in JSON response data.

After you have completed the task of selecting facet fields, go to the next step in configuring
SuiteCommerce Advanced item search settings, Field Sets.

Facet Options and Matrix Items


When working with Matrix items, ensure that you have set values on all of the child matrix items along
with the parent matrix item for the custom item fields used as facets. If the facet value is set on the
parent matrix item but not on all the child matrix items, and you search for items with this facet value,
the search results may not have strict ordering.
SCA Item Search Settings 17

Note: The child matrix items need not have the same facet value as defined for the parent
matrix item.

For example, suppose you have added a custom field, Color, to your item record, and its value is set
to Red on the parent record but is not set on any of the child records. Now if you search for this item
just by entering the facet value Red in the search query, the item will not be returned even if the parent
record matches the search query.

Note: When you are using a CSV import for populating the facet field values, ensure that the
facet field values are not missing for the child matrix items. If the facet field values are missing
for the child matrix items, the facet filter might not work as expected. This issue is observed only
when you use non-matrix options as facet fields.

Field Sets
Field sets define the item data exposed to site templates. Field sets include real-time data from item
records in your NetSuite account. A web developer can use the Item Search API to access field values in
the field sets you define here.

For example, you might create a field set that includes fields from the item record that contain product
details. This field set might include fields that display matrix items and their options, product images,
product descriptions, and price. You could also create a different field set for search results. In addition
to the matrix item information and price, this field set might also include a thumbnail image and
product availability.

Note: Field Sets are made public on the internet. Any field type can be selected for use in field
sets, so consider which fields you choose to expose.

You can run a script to create field sets. For more information, see Field Set Setup Script. The Field
Set to return item details is typically named details. If a different name is used, you must update the
searchApiMasterOptions property. See the help topic Search Results Subtab for more details on
configuring this property.

Defining Your Own Field Sets


When extending SuiteCommerce Advanced, you can define your own field sets on the Web Site Setup
page. To access a complete list of fields available to use in field sets, see Field Set Reference.

To define fields sets:


1. Go to Setup > SuiteCommerce Advanced/Site Builder> Set Up Web Site.
If you use multiple websites, click Edit next to the site you are working with.
2. Click the Field Sets subtab.
3. Enter data in the fields described below:
a. Name – (Required) Enter a name for the new Field Set. This name is only displayed
internally on the Field Sets list page and in dropdown lists on the Web Site Setup page.
SCA Item Search Settings 18

Name each Field Set based on the product views you will create for your site. For example,
a field set named Multiple Item View might consist of a few fields, such as name, online
price, and rating. Another field set, Item Detail View might include the store description,
shipping information, and price.
b. Field Set ID – (Required) You create this ID for use with the Item Search API to specify the
field set.
The Field Set ID is displayed internally, on the Field Sets list page and in dropdown lists on
the Web Site Setup page.

Important: Note the following requirements when creating a Field Set ID: It must
be alphanumeric, lowercase, and contain no spaces or special characters.

c. Record Type – (Required) Only item records are supported.


d. Description – (Optional) Enter a description of this field set. The description only shows on
Field Set records, the Field Set list page, and on the Web Site Setup page.
e. Click the icon in the lower right of the field in the Fields Included in Field Set column.

■ Field Name – (Required) Select from a list of fields on item records in your NetSuite
account.
■ Field ID – Shows the internal ID for each field you select in a Field Set.
You can use this ID to refer to specific fields when writing SuiteScript. This is also the
field ID returned in the JSON response when using the Item Search API.
■ Field Type – Shows the NetSuite field type. Field types provide information about
the type of data web developers can expect in the JSON response to Item Search API
queries.
4. Click Save after you have selected fields for this field set.
5. Click Add.
6. Click Save on the Web Site Setup page to Save your changes.

Defining field sets is the final task in configuring SuiteCommerce Advanced item search settings. When
you click Save on the Web Site Setup page after defining field sets, the item search indexing process is
triggered. For more information, see The Item Search Index Process. See also, Checking Search Index
Job Status.
SCA Item Search Settings 19

Field Set Reference


This section includes reference information you can use as you complete the task of defining field sets.
Defining field sets is how you expose information from item records in NetSuite to your website.

We have provided a Microsoft Excel worksheet listing all the fields available for field sets. You can
use this list to find information such as, field IDs and field types. The list also identifies fields that
are available for facets, sorting and keyword search. In addition to fields on item records, there are
additional fields that include derived values. These fields are identified on the worksheet as Synthetic
fields.

To access the worksheet, click this link: FieldSetsList.xls

Note: Depending on the features enabled in your account, some of the fields in the
spreadsheet may or may not appear in your account.

You can also run a script to create field sets. This script contains all field set required to use
functionality that ships by default with SuiteCommerce Advanced. For more information, see
Field Set Setup Script.

Synthetic Fields for Field Sets


In addition to the fields on supported records, there are additional fields that include derived values.
You can use these synthetic fields in field sets. The table below contains detailed descriptions of
synthetic fields.

Synthetic Field Field ID Description


Name

* Price (Formatted) pricelevel*_formatted Each price field has a formatted counterpart.


and * Price Level For example, the field, Base Price has the field
(Formatted) ID, pricelevel1. The synthetic field, Base Price
(Formatted) has the field ID, pricelevel1_formatted.
The plain field value returns a numeric value. The
*_formatted variant returns the price formatted
with a currency symbol and the appropriate
number of decimal places based on regional
rounding conventions.

Price for Current onlinecustomerprice_ Returns a JSON object with all available information
Customer (Detail) detail about the item's current price. If a customer is
logged in, the price displayed on the website
applies to the logged-in customer, including
special pricing and quantity pricing. If the item has
quantity pricing, the price schedule is returned. If
the item is a donation item, information defining
the donation parameters such as minimum and
default amount are included.

Item Options itemoptions_detail If the item has item options, this returns all the
(Detail) item options, their values (if list-type options) and
their default values.

Matrix Child Items matrixchilditems_detail Gives information on the matrix child items that
(Detail) exist for the matrix parent item, including which
item option values define each child item. Specific
fields for each child item can be retrieved by
defining a field set called ‘matrixchilditems'.
SCA Item Search Settings 20

Synthetic Field Field ID Description


Name

Related Items relateditems_detail Lists the related items of an item. Specific fields for
(Detail) each matrix child item can be retrieved by defining
a field set called ‘relateditems.’

Correlated Items correlateditems_detail Lists the correlated items of each item. Specific
(Detail) fields for each matrix child item can be retrieved by
defining a field set called ‘correlateditems.’

Item Images itemimages_detail Lists the images associated with an item. Provides
(Detail) the default URL for each image (not resized).

Default Category defaultcategory_detail Returns the default category of each item.


(Detail) These are special, reserved field set names that can
contribute sub-fields to the individual entries for
field set field values that return item lists.
- matrixchilditems
- relateditems
- correlateditems

Note: The price level field name appears in the Field Name select list, but the field's internal
ID is displayed in the JSON response (for example, “pricelevel1” or “pricelevel5” will show in JSON
response data). For information about creating a field set to expose item quantity by location,
see the help topic Accessing Item Quantity Per Location with the Item Search API

The Item Search Index Process


When you use SuiteCommerce Advanced, NetSuite indexes your item record data on a search server.
The search index process prepares your item records for use with the Item Search API. The search
index is first built when you click Save on the Web Site Setup page after selecting Search Index settings
for the first time. Certain changes you make in NetSuite will cause the search index to rebuild.

For more information, see Including Item Records in the Search Index, Events that Trigger Rebuilding
the Search Index, Events that Trigger Search Index Update, and Manually Rebuilding the Search Index.

Use the Job Status page to check the status of the search index process. For more information, see
Checking Search Index Job Status.

Note: The search index fails to rebuild if you take your website offline for maintenance. For
more information on taking your website offline, see the help topic Taking your Web Site Offline
for Maintenance.

Including Item Records in the Search Index


Items in your account are indexed on a search server, so that data on item records can be queried
using the Item Search API. Item records are only indexed in accounts that use the SuiteCommerce
Advanced feature.

The settings below represent the basic conditions that must be met for item records to be included in
the search index. To ensure that item records are included in the search index:

■ Check the Display in Web Site box.


■ Do not mark the item record as inactive.
SCA Item Search Settings 21

Important: Currently, although all items configured for search are indexed, a maximum of
10K results are returned in a single search API call. However, any indexed item can be returned
by a specific API call to that item using search parameters such as the item id (see the help
topic Item Search API Input Parameters).

Guidelines for Using the Show Uncategorized Items Preference


When you use the Show Uncategorized Items preference all item records that have the Display in Web
Site box checked are indexed. This preference enables items to display in search results, even if the
items are not published to a site or site category.

Alternately, you can clear the Show Uncategorized Items preference, and publish item records
individually. In this case, only item records that are published to a site and site category will be indexed.
If you use the Multiple Web Sites feature, you must add each item to a category on the site where you
want it to appear. You can do this on the item record, or use the content manager.

Note: Saving an item record triggers a search index update each time an item record is
saved. This action occurs on saving any item record, independently of your setting for the Show
Uncategorized Items preference.

If the number of items in your account exceeds 10K, changing the Show Uncategorized Items setting
triggers a process that runs asynchronously in the background. A Job Status popup screen shows the
running process. This process is separate from the search index. When the process is complete, the
Show Uncategorized Items check box in NetSuite reflects the change you made.

The search index process is triggered after the process that updates the Show Uncategorized Items
check box has completed. You can track the search index at Setup > SuiteCommerce Advanced > Set Up
Web site. Click View under Search Index Status.

Indexing All Item Records


1. Go to Setup > SuiteCommerce Advanced/Site Builder > Set Up Web Site.
2. Click the Setup subtab.
3. Check the box next to Show Uncategorized Items.

4. Click Save.

Setting up Individual Item Records to be Indexed


1. Go to Setup > SuiteCommerce Advanced/Site Builder > Set Up Web Site.
2. Clear the box next to Show Uncategorized Items.
3. Click Save.
SCA Item Search Settings 22

4. Go to Lists > Web Site > Items.


5. Click Edit next to an item record.
6. Select a Site and Site Category on the Web Site Categories subtab of each item record you
want indexed.

To learn more about preparing item records for the search index, see Item Search Index.

Events that Trigger Rebuilding the Search Index


Any of the following changes in your NetSuite account trigger a search index rebuild:

■ Changing facets, search, and sort options (on the Search Index subtab of the Web Site Setup page).

Note: When you remove a search field and save your changes, the search index is rebuilt
only if you have removed all types of matches for that particular search field.

■ Adding or removing languages.


■ Adding or removing Subsidiary accounts.
■ Changing site currencies when the site has currency-based fields defined as facets or sort options
(such as, price or cost).
■ Changing the preference, Include Out Of Stock Items in Web Store (on the Web Site Setup Page).
■ Deleting a SuiteCommerce Advanced Web Site deletes the index for the site.

Note: Saving an item record triggers an index update, not an index rebuild. Also note that
the indexer is always triggered when an item record is saved. This action occurs on saving any
item record, apart from your setting for the Show Uncategorized Items preference on the Web
Site Setup page. For information on events that triggers a search index update, see Events that
Trigger Search Index Update.

Events that Trigger Search Index Update


Any of the following changes in your NetSuite account trigger a search index update:

■ Item Availability
■ Item Pricing
■ Item record changes

Note: This includes changes on item records as a result of using a CSV import.

■ Currency Exchange Rates


■ URL Components for Facets
■ Web Site Tabs
■ Site Categories
■ Commerce Categories
SCA Item Search Settings 23

For information on events that trigger the search index to rebuild, see Events that Trigger Rebuilding
the Search Index.

Manually Rebuilding the Search Index


Even though certain changes that you make in your NetSuite account automatically trigger the search
index to rebuild, you can manually rebuild the search index for your SuiteCommerce Advanced Site. For
information on events that trigger the search index to rebuild, see Events that Trigger Rebuilding the
Search Index.

Manual rebuild of the search index is typically done when you want to force a rebuild, and not wait for
the changes that you made in your NetSuite account to automatically trigger the rebuild.

After you initiate the search index rebuild process, it may take up to 10 minutes to start rebuilding
the search index. The time it takes to complete the process is relative to the number of items being
indexed.

Note: There is a limit to the number of times you can request a rebuild of the search index. In
a 24-hour period, you are allowed only two requests.

To manually rebuild the search index for your SuiteCommerce Advanced Site:
1. Go to Setup > SuiteCommerce Advanced/Site Builder > Set Up Web Site. Click Edit next to your
website.
2. On the Web Site Setup page, choose Actions > Rebuild Search Index.
A popup message appears.
3. In the popup message dialog box, click OK to rebuild the search index for this website.
4. (Optional) Open the Job Status page to check the status of the rebuild process. For more
information, see Checking Search Index Job Status.

Note: The search index fails to rebuild if you take your website offline for maintenance.
Therefore, you must not rebuild the search index when the Take Web Site Offline for
Maintenance option is enabled.

Checking Search Index Job Status


You can check the status of the search index process, by going to Setup > SuiteCommerce Advanced >
Set Up Web Site. Click View in the Search Index Status column.

The Job Status page shows elapsed time as the item search index is processing. Click Refresh to update
information on the page. The search index process consists of the following tasks:

1. Dropping the search index


2. Updating search index (this step in the process includes, adding, updating, and deleting items)
SCA Item Search Settings 24

3. Rebuilding the search index core

Note that changes to the item record trigger an index update. The Records Finished column on the Job
Status page always indicates the total number of records being processed.

SCA Domains and Touch Points


Use the Domains subtab on the Web Site Setup page to view the shopping domains that you created
for your site. Here, you can also add new domains, associate your shopping domains with SSP
application touch points, and set CDN cache. A custom domain is required for SuiteCommerce
Advanced websites.

For more information on CDN Cache, see the help topic Caching.

Note: Only shopping domains are shown on the Web Site Setup page. To manage domains
used for campaign email, redirects, and secure checkout, go to Setup > SuiteCommerce
Advanced > Domains. For more information, see the help topic Setting Up Domain Names in
NetSuite.

Using the Domains Subtab in SuiteCommerce Advanced


On the Domains subtab, you can set up your website to use Sticky domains, or choose to set a Primary
Web Site URL for your website.

Sticky Domains
In SuiteCommerce Advanced, if you do not designate a primary domain, then each domain name
persists as shoppers navigate around your site. You can modify the shopping experience for customers
by associating different domains with different SSP applications.

Best Practice for Using Sticky Domains


You can use an SSP application along with multiple shopping domains in one SuiteCommerce
Advanced site. In this case, you can use the Touch Points subtab to associate an SSP application with a
touch point for the site. Next, use the Domains subtab to associate a domain with an SSP application.

To set up domains for your SuiteCommerce Advanced Site:


1. Go to Setup > SuiteCommerce Advanced/Site Builder > Set Up Web Site. Click Edit next to a
website.
2. Click the Domains subtab.
3. Enter your domain in the Domain Name field.
Note that you must use the CNAME (Alias) to set up DNS to point your domain at NetSuite. For
more information, see the help topic Pointing Domain Names at NetSuite.
SCA Domains and Touch Points 25

4. Select an HTML Hosting Root. The folder you select here, should contain all the assets for your
SuiteCommerce Advanced site. If you are using a reference implementation or custom SSP
application that you create, select the root folder where that SSP application resides.

Note: The hosting root determines which touch points can be valid for the domain.

5. (Optional) Select an HTML page to display if a 404-Page Not Found error occurs.
6. (Optional) Check the Primary Web Site URL box.
7. (Optional) Select touch points for each domain.

Note: To select touch points here, you must have already created an SSP application.

1. Click the Open button in the Touch Points column to display the New Touch Point popup
window.

2. Select the touch point.


3. Select the SSP application. Note that the SSP application must have touch points already
set up. If touch points are not set up on the SSP application, then touch points are not
visible on this screen.
4. Click Add.
5. Select more touch points as needed.
6. Click Submit.
8. Click Save.

A shopper's experience with your site can now be controlled by domain. Using a specific domain will
determine which SSP application a shopper interacts with. Note that touch points defined on the
Domains subtab of the Web Site Setup page override the touch points defined on the Touch Points
subtab.
SCA Domains and Touch Points 26

For more information on using the Touch Points subtab on the Web Site Setup page, see the help topic
Linking Your Website to an SSP Application.

Selecting a Primary Web Site URL


Selecting a Primary Web Site URL is optional for SuiteCommerce Advanced websites. Note that when
you designate a Primary Web Site URL, any domain you set up in NetSuite redirects to the domain you
marked as the Primary Web Site URL. The domain name marked as the Primary Web Site URL shows on
your list of websites as the Primary Domain.

For example, you might set up two shopping domains such as www.mystore.com and
shop.mystore.com. If you set www.mystore.com as the primary domain, then customers who type
shop.mystore.com/item in the browser will be redirected to the same page on the primary domain,
www.mystore.com/item.

SCA Product Images


You can upload image files to the file cabinet in a ZIP file and have them automatically matched with
item records in NetSuite, based on the image file name.

First decide on a naming convention for your image files, next rename your image files, and then
upload your image files to the file cabinet. After you have saved your settings on the Advanced tab,
and uploaded all your image files, you can view the image files assigned to each item on the item
record.

Note: After you set up product images for SuiteCommerce Advanced, you must add the
itemimages_detail field to Fields Sets so that images display correctly on the site. Go to Setup
> SuiteCommerce Advanced/Site Builder > Setup Web Site. If you are using the ShopFlow Suite
App, add itemimages_detail to the Search and Details Field Sets.

Setting up images for SuiteCommerce Advanced consists of the following tasks:


SCA Product Images 27

Task Before you begin Goal

1. Renaming Image Files with Decide on a naming To link image files to item records.
an Item Identifier convention for image NetSuite uses the item identifier to
files that includes an item match image files to item records.
identifier.

2. Setting the SuiteCommerce   To set the root folder for all product
Advanced Image Domain and image files associated with a
the Image Folder particular SuiteCommerce Advanced
website.

3. Uploading Images to the File Complete renaming all of To populate the images folder for
Cabinet for SuiteCommerce the image files you want to your SuiteCommerce Advanced
Advanced associate with item records. website with product images.
Create a .zip file on your
computer that contains all
the image files for your site.

4. (Optional) Setting Up Image   To specify the maximum height


Resizing for SuiteCommerce and width for images, and IDs for
Advanced different image sizes.
You will use the Image Size ID to
resize images in site templates.

5. Viewing Images on Item Complete tasks 1 — 3. To view images associated with a


Records with SuiteCommerce particular item record. You can also
Advanced edit Alt Image text.

Renaming Image Files with an Item Identifier


The first step in setting up images for SuiteCommerce Advanced is to rename each of your image files
with an item identifier.

Decide on a naming convention that includes an item identifier for image files intended for your
SuiteCommerce Advanced website. Use the Item Identifier field to choose a field on item records that
NetSuite can use to link image files together with item records.

Note: For custom fields, only stored custom fields are available to be used as an Item
identifiers. If a custom field has the Store Value set to False in the custom field record, it is not
available.

Rename image files by appending the item identifier to the beginning of the image file name you
want associated with each item record. You can add to the filename of each image using the Item ID
Delimiter and the Structure Delimiter.

The example below shows the image file name format when the item identifier is set to UPC code:
SCA Product Images 28

SKU123_modelshot-longcoat.jpg.

The Item ID Delimiter is required. The default value is an underscore (_). It is used to parse the item
identifier from the image filename.

The Structure Delimiter is optional. The default value is a single dash (-). The Structure delimiter can be
used to add information to the image filename.

The file naming convention you choose, should make sense for your website.

Examples:

■ You can upload image files intended for different types of site templates. For example, if you create
one site template is for a list of search results, and another for the product detail view, then name
image files accordingly:

camera_sideview-searchresults.jpg
camera_sideview-detail.jpg.-
sku123_main-red.png
sku123_detail-red.png

■ You can upload different images optimized for various devices:

camera_sideview-mobile.jpg
camera_sideview-browser.jpg.-

Notes on delimiters:

■ Delimiters parse the file name from the item identifier.


■ You can change the value for either of the Item ID or Structure delimiter. Both delimiters can be the
same.
■ You can change the delimiters to any combination of up to five supported characters ($ - _ . + ! *
' ( ) ,). The maximum limit is five characters.

Setting the SuiteCommerce Advanced Image Domain and


the Image Folder
After you have completed renaming all of the image files you want to associate with item records,
select a domain and create a new folder for storing the image files.

1. Go to Setup > SuiteCommerce Advanced/Site Builder > Set Up Web Site.


2. Click Edit next to the site.
3. Click the Advanced tab.
4. Select the domain you want to use in the Image Domain field.

5. Click (+) next to the Image Folder field to create a new folder for image files. Remember the
folder name.
SCA Product Images 29

6. Click Save.

After you have created an image folder for the SuiteCommerce Advanced website, you can upload
image files to this folder at any time. Images files will be mapped to item records based on the item
identifier and the image file name.

Uploading Images to the File Cabinet for SuiteCommerce


Advanced
On your computer, you can create a .zip file that contains all the image files for your site, and then
expand the zipped file after it has been uploaded.

1. Go to Setup > SuiteCommerce Advanced > Web Site Hosting Files.


2. Find the folder you selected as Image Folder.
3. Click Advanced Add.
4. Select the .zip file on your computer.
5. Check the Unzip Files box.
6. Click Add.

Setting Up Image Resizing for SuiteCommerce Advanced


If you want to resize images files for your website, you can use the Image Resizing section on the Web
Site Setup page. Here, you can specify the maximum height and width of the image and an ID for the
image size. You will use the Image Size ID to include a specified image size in a template.

To set up Image Resizing for SuiteCommerce Advanced


1. Go to Setup > SuiteCommerce Advanced/Site Builder > Set Up Web Site.
2. Click Edit next to the web site you want to modify.
3. Click the Advanced subtab.
4. Go to the Image Resizing section and modify the following fields:
■ Image Size ID – Assign an ID for the image resize definition. Use a name that denotes a
particular image size.
For example, you may want to configure two different sizes for image on your site. In the
Image Size ID field, enter thumbnail, and then in the next row, enter rectangle.

Note: To allow resizing of an image slider, you must add a homeslider Image Size ID
(at 200 pixels wide by 220 pixels high) and a homecell Image Size ID (at 125 wide by
125 pixels high).

■ Description – (Optional)
■ Enabled – Check this box so that you can use the Image Size ID with the Item Search API. If an
Image Size ID is not enabled, then the Item Search API ignores the image size you set up, and
returns the image in its original size.
SCA Product Images 30

For example, if the enabled check box is cleared here, and the Image Size ID is included in
a website template, the Image Size ID you set up is ignored, and the original image size is
rendered.
■ Maximum Width and Maximum Height – Enter the values you want to use for the maximum
height and width of the image. You can specify one or neither. For example, if you enter a
value for Maximum Width, the Maximum Height is automatically calculated.
Note that the image aspect ratio is stored with the image file in the file cabinet. Automatic
resizing is based on the image aspect ratio. Width and height are computed.
5. Click Save after you have set your specifications for image resizing.

After you have set up resizing images for your SuiteCommerce Advanced site, you can use the
Commerce API to include image resize settings for a site. For more information, see Using the
Commerce API to Resize Images.

To confirm images are associated with the correct item records, see Viewing Images on Item Records
with SuiteCommerce Advanced.

Using the Commerce API to Resize Images


Calls to the Item Search API return image URLs without resize information. However, you can call
the Commerce API from an SSP application to return the image resize settings for a site. Use the
sitesettings.imagesizes field to get the image sizing parameters. The JSON response contains an
array of objects that includes the urlsuffix for each Image Resize ID that has been defined for the
site. The urlsuffix can then be used to construct the correct image URL. For more information on the
sitesettings.imagesizes field, see the help topic sitesettings.

Note the following examples:

■ An image URL without parameters, such as http://mysite.com/images/


OU9613.media.orange.01.jpg? displays on the site as follows:

http://mysite.com/images/OU9613.media.orange.01.jpg?resizeid=10&resizeh=230&resizew=201 -

■ An image URL that includes a parameter, such as http://mysite.com/images/


OU9613.media.orange.01.jpg?&variant=3, displays the following URL on the site:

http://mysite.com/images/OU9613.media.orange.01.jpg?variant=3&resizeid=10&resizeh=230&resizew=2
01 -

The following image resize data is included in the JSON response for the sitesettings.imagesizes field.

■ maxwidth–maximum resized image width in pixels


■ maxheight–maximum resized image height in pixels
■ urlsuffix–suffix that should be added to the image URL to return a resized image
■ name–value from the Image Resize ID field (image resize definition) as entered on the Web Site
Setup page
■ internalid–internal system ID of resize definition

Note the following example of image resize data in the JSON response for the sitesettings.imagesizes
field:

"imagesizes":[ -
{ -
SCA Product Images 31

­"maxwidth":100, -
­"internalid":104, -
­"urlsuffix":"resizeid=104&resizeh=100&resizew=100", -
­"maxheight":100, -
­"name":"large" -
­}, -
{ -
­"maxwidth":800, -
­"internalid":103, -
­"urlsuffix":"resizeid=103&resizeh=600&resizew=800", -
­"maxheight":600, -
­"name":"medium" -
­}, -
{ -
­"maxwidth":100, -
­"internalid":102, -
­"urlsuffix":"resizeid=102&resizeh=100&resizew=100", -
­"maxheight":100, -
­"name":"small" -
­} -

Viewing Images on Item Records with SuiteCommerce


Advanced
Item records include the Images sublist, where you can see the list of images associated with each item
record.

When the item record is in Edit mode, you can change the Image Alt Text, and you can click on the file
name to open the image file record in a new tab. Note that the image can be associated with multiple
websites.

Notes on product-image mapping with SuiteCommerce Advanced:

■ You can have different image size configurations on different sites. For example, you can use a
medium sized rectangle for images on site A, and a large rectangle on site B.
■ You define the Image Size ID in website templates. This sublist shows the images associated with
the item. The Image Size ID is not applicable to the information shown on this list.
■ Multiple sites can share one image folder, or you can create different image folders for each site.
■ One image can match multiple items or multiple images can match one item, based on how you
name the image file.

Setting Up Multiple Images for an Item


You can configure your SuiteCommerce Advanced site to display multiple images for an item in the
Product Details Page of your site.

You can configure the Item Option ID that determines what images display in your web store when
a user makes an option selection in the PDP. For example, you configure an item option with the ID:
SCA Product Images 32

customColor to be the selection that triggers an image change. In your web store, a user selects a
shirt from your store that offers multiple color options. In the PDP, the user selects blue for the item’s
color option. This triggers the image change to display the correct image of a blue shirt.

In the Elbrus release of SCA and later, the image change capability extends to configuring two or
more item option IDs. This allows you to configure your images to accurately depict items based on
multiple item option selections. For example, you configure two item options with the following IDs:
customColor and customSize. When a user selects a shirt in your web store and then selects color:
blue (ID: customSize), the image for the shirt changes to display the correct image of a blue shirt. The
user then selects size: medium (ID: customSize). The image in the PDP changes again to depict the
correct blue, medium shirt.

To configure the multiple-image option for your site:


1. Determine the Item Option ID you want to use to trigger an image change in the PDP.
2. Configure the multiImageOption property using the SuiteCommerce Configuration record. See
the help topic Multi-Image Option Subtab for more information.
a. In the SuiteCommerce Configuration record, navigate to the Shopping Catalog tab and
Multi-Image Option subtab.
b. Add the ID of the triggering Item Option to the table.
c. Click Add. Repeat this for every Item Option ID you want to add, as required. Vinson
release of SCA and earlier allow only one level of Item Options.
d. Save the record.

Note: If implementing Mont Blanc release of SCA and earlier, you cannot use the
SuiteCommerce Configuration record. You must customize SC.Shopping.Configuration.js
to configure this property. See the help topic Extend Frontend Configuration Files for
more information.

3. Format your images following the same configuration pattern in your image file name format.

Important: For the multiple image option feature to work, you must format your
image file names to include options that match those of the triggering item option or
options. See Renaming Image Files with an Item Identifier for more information.

For example, if you configured an item option ID for the item color, followed by the ID for the
item size, include the item color and size in the file name. Your file name format should look
something like this:

sku_media_blue_small.jpg
sku_media_blue_medium.jpg
sku_media_blue_large.jpg
sku_media_red_small.jpg
.­.­.-

SCA Web Site Preferences


Most of the web site preferences you might set up on a Site Builder site apply to SuiteCommerce
Advanced. To read a detailed description of each web site preference available for SuiteCommerce web
sites, see the help topic Web Site Preferences.
SuiteCommerce Advanced Installation 33

SuiteCommerce Advanced Installation


See the following sections for instructions on managing your SuiteCommerce Advanced SuiteApp
installation.

For more general information on working with bundles, see the help topic SuiteApp Installation and
Update.

■ Versioning
■ Prerequisites
■ Supported Browsers for SuiteCommerce Advanced
■ Initial Installation

Versioning
Important: Before an initial installation or when migrating to a new bundle version, refer to
the SuiteCommerce Advanced Release Notes for information on enhancements and fixes in
that bundle.

SuiteCommerce Advanced SuiteApps are generally available as unique bundles, with unique bundle
IDs, unless explicitly stated otherwise. Each bundle has a version number appended to the folder
name. You can install multiple versions of the same bundle into your account.

There are three different types of SuiteCommerce Advanced bundle updates that can occur. Bundle
updates use the following naming conventions:

■ X.01.0: These updates include major updates, new features, and enhancements. These bundles
have a unique IDs and generally correspond with other NetSuite core releases.
■ 1.0X.0: These updates include bug fixes and small enhancements. These bundles will have a unique
ID and be released on a frequent basis.
■ 1.01.X: These updates include critical bug fixes. A new bundle ID is not created for these fixes.
Upgrading existing bundles with these releases should have little to no impact on existing
customizations.

In addition to versioning of the SuiteCommerce Advanced SuiteApp, each Module within the
application has it’s own unique version following the same convention outlined above. You can easily
determine if a specific module has been updated by checking your existing version against the version
in the updated release. Because of this versioning of Modules, when migrating to a new release you
can easily stage the migration as needed. For example, you may have [email protected] in your existing
implementation and the updated release has [email protected]. You can choose to migrate jus the
Address module to take advantage of it’s new features, leaving the other modules for future migration.

Important: SuiteCommerce Advanced SuiteApps are unmanaged bundles. With unmanaged


bundles, updates are not automatically pushed to installed bundles. You must explicitly
update the bundle to receive the latest changes. This is important to ensure that existing
implementations with customizations are not impacted unexpectedly by an update.

Site Builder Extension Editions


Currently there are two available editions for SiteBuilder:

■ SiteBuilder Extensions: This edition provides all of the core functionality needed for a complete B2C
experience and is available for all Site Builder subscriptions.
SuiteCommerce Advanced Installation 34

■ SiteBuilder Extensions Premium: This edition provides all of the functionality offered in SiteBuilder
Extensions plus additional advanced features for an enhanced B2B experience. This edition is
available for Site Builder subscriptions for an additional fee.

Note: All of the functionality listed for SiteBuilder Extensions is available by default for
SuiteCommerce Advanced subscriptions.

The following table outlines the feature set available with each edition.

Important: Multi-currency is not supported in the My Account application.

Feature SiteBuilder Extensions SiteBuilder Extensions Premium

Address Book Management X X

Billing   X

Account Balance
Print A Statement
Make A Payment
Transaction History & Details
Credit Memos/Deposits

Case Management X X

Credit Cards Management X X

Email Preferences X X

Logon/Signup/Forgot Password X X

Order History & Order Details X X

Product Lists   X

Profile Information X X

Email Preferences
Address Book Management
Credit Card Management

Receipt History & Details X X

Reorder Items X X

Returns X X

Quotes   X

Important: Attribute tags, and other Web Site Tag substitution capabilities are not supported
in Site Builder Extensions. When you customize the SSP application, you must use SuiteScript or
Commerce APIs to access various website attributes.

Prerequisites
To install SuiteCommerce Advanced, you must have the following features enabled:

1. Click the SuiteCloud subtab, enable the following features:


■ Client SuiteScript
Supported Browsers for SuiteCommerce Advanced 35

■ Server SuiteScript
■ SuiteScript Server Pages
2. Click the Web Presence subtab, enable the following features:
■ Web Site
■ Web Store
■ Advanced Site Customization
■ Descriptive URLs
■ Host HTML Files
■ SuiteCommerce Advanced

Note: When installing SiteBuilder Extensions for use with a Site Builder website, the
SuiteCommerce Advanced feature is NOT required.

SuiteCommerce Advanced is developed in such a way that you can install it, customize CSS files to
match the look and feel of your website, and then start using it right away. Using SuiteCommerce
Advanced, you can extend the functionality to meet your company's specific ecommerce needs.

Important: SuiteCommerce Advanced requires additional setup before the site is functional.
For example, you must set up of specific field sets and Item fields.

Supported Browsers for SuiteCommerce


Advanced
Important: This topic only describes browser support for SuiteCommerce Advanced, which
is different from the browser support in NetSuite. See the help topic Supported Browsers for
NetSuite for details.

SuiteCommerce Advanced is supported in the following browsers and operating systems:

Browser Platform

Internet Explorer 11 Windows 10


Internet Explorer 10 Windows 8.x
Internet Explorer 9 Windows 7 with Service Pack 1 (SP1) or higher
(1)
Google Chrome 50 Windows 10
Windows 8.x
Windows 7
iOS
Android

Microsoft Edge (Anniversary Update and later) Windows 10 (Anniversary Update)


(1)
Mozilla Firefox 45 Windows 10
Windows 8.x
Windows 7
Windows Vista
Mac OS X 10.6 and newer

Safari 8 Mac OS X 10.10


Initial Installation 36

Browser Platform
Safari 7 iOS
Android

Notice: Internet Explorer 8 No Longer Supported as of


the Elbrus Release of SuiteCommerce Advanced
As of the Elbrus release and later, SuiteCommerce Advanced implementations no longer support the
use of Internet Explorer 8 (IE8) and older. SuiteCommerce Advanced implementations and features
prior to the Elbrus release of SuiteCommerce Advanced are not affected by this change.

Discontinued support of IE8 does not mean that your SuiteCommerce Advanced website will crash
on IE8 users. However, it does mean that they may experience unexpected behaviors. Test all
development for browser compatibility.

Consider discontinuing support of IE8 on your SuiteCommerce Advanced website to make


development easier and more cost effective. Use Google Analytics to get demographics on your IE8
users. See the help topic GUA in SCA for more information.

There are multiple reasons for discontinuing IE8 support.

■ IE8 exposes users to security vulnerabilities.


■ IE8 usage has declined to approximately 2.5% across the web.
■ Microsoft no longer supports IE8.
■ Preparation for SuiteCommerce Advanced migration to newer JavaScript libraries.

Initial Installation
When installing SuiteCommerce Advanced for the first time you must install the most recent version of
the bundle.

If you have previously implemented SuiteCommerce Advanced see Migration to New Releases for
information on migrating to a new version.

To install the SuiteCommerce Advanced SuiteApp:


1. Click Customization > SuiteBundler > Search & Install Bundles.
2. In the Keyword field, enter the Bundle ID of the version of the SuiteApp you want to install.
In addition to the SuiteCommerce Advanced SuiteApp and extensions for Site Builder, there
are also SuiteApps for the SuiteCommerce Configuration, Product Review Records, Product List
Records, Content Management, and Product Merchandising. These must be install separately.
The following table itemizes each SuiteApp and corresponding ID.

Important: For shared bundles, contact your NetSuite Representative if you do not
have access to the bundle.

SuiteApp Bundle ID

SuiteCommerce Advanced 165410 (this is a shared bundle)


Initial Installation 37

SuiteApp Bundle ID

SiteBuilder Extensions 165411

SiteBuilder Extensions 165412


Premium

SuiteCommerce 135010
Configuration

Content Delivery 33437

Product Merchandising 35075

Reference Product Lists 53051


Records This bundle is required when using Product Lists or Save for Later
lists with SuiteCommerce Advanced. For details on using Product
List Records, see the help topic Product List Custom Records.

Reference Product Review 53053


Records This bundle is required when using Product Reviews with
SuiteCommerce Advanced. For details on using Product Review
Records, see the help topic Product Reviews

3. Click Search.
4. Verify that the correct SuiteApp is returned in the search and select it.
5. Review the SuiteApp details and then click Install.
After installation of the SuiteCommerce Advanced bundle, two implementations are available:
■ Source – this implementation contains all of the original installation files. It is locked to
prevent any changes. The Source implementation can be used in the future for creating diffs
against your customizations to troubleshoot issues.
■ Development – the Development implementation is where you begin your work.
In the _Sources directory of the Development implementation, there is a zipped source file
available. Download this file to your local development environment to begin working on
your customizations and to create Distribution files. Appropriate default Touch Points are
automatically deployed to this implementation. After deployed to a website, your site is
available at the domain defined for that site. See the help topic SCA Developer Tools for
detailed information on working with the source files available here.
6. Link your Development implementation to your development domain.

Note: The development domain is the domain that will be used by developers before
deploying to a production site. If you have not already created this domain for your site,
see SCA Domains and Touch Points.

1. Go to Setup > SuiteCommerce Advanced > SSP Applications and click View next to the
SuiteCommerce Advanced Dev application.
2. Click Link to Domain.
3. Select the development domain for the desired site.
7. Verify the installation is successful.
Navigate to the domain defined in your Web Site Setup record. If the site does not display, check
the following:
■ Does the site have the proper Touch Points defined? For details, see the help topic Selecting
Supported Touch Points.
■ Are you using the proper domain?
Initial Installation 38

■ Is your domain properly registered?

Migration to New Releases


Important: Before migrating to a new release of SuiteCommerce Advanced, refer to the
SuiteCommerce Advanced Release Notes for information on enhancements and fixes in that
release.

With SuiteCommerce Advanced, there are two types of releases:

■ Minor Releases: with these releases, the existing bundles are updated. No new bundle IDs are
generated.
■ Major Releases: with these release, a new bundle is available and must be installed separately from
your existing SuiteCommerce Advanced bundle.

Minor Releases
Minor releases generally include bug fixes, developer tool updates, or small new features with no
impact on existing features. The effort to migrate existing customizations is minimal. These releases
are delivered as unmanaged bundle updates. To take advantage of enhancements and fixes in the
release, you need to do a bundle update from the Installed Bundle record in NetSuite.

Warning: Performing a bundle update causes all files in the existing Source and Development
directories to be replaced with the updated set of files. If you have previously deployed
customizations to the Development SSP application, those customizations must be redeployed
from your local environment before any domain pointing to the Development SSP applications
reflects the customizations.

To migrate to a new minor release:


1. Review the SuiteCommerce Advanced Release Notes for details on changes included in the
release and important notifications.
2. Update the existing bundle installation.
1. Go to Customization > SuiteBundler > Search & Install Bundles > List.
2. Hover over the icon in the first column and select Update.
The bundle update begins. This may take awhile. While updating a pending message
displays in the status column. Refresh the screen during the process to see when the
installation is complete.
3. Download the new Source code from the file cabinet to your local environment.
The source zip file is located at Web Site Hosting Files > Live Hosting Files > SSP Applications >
NetSuite Inc. — SCA <version> > Source > _Sources. After downloaded, unzip the file into a new
working directory.
4. In your local environment, migrate existing customizations to the new source code directory.
1. Create a duplicate of your custom module folder in the new source code directory.
2. Copy your existing custom modules into the new custom module folder.
3. Update the new distro.json file to include references to any custom modules and to
define any custom application dependencies.
Migration to New Releases 39

Important: Do NOT copy the existing distro.json file contents directly into
the new distro.json file. Doing this causes overwrites to changes made in the
distro.json file to support the new release. For example, a new module may be
referenced. We suggest you do a DIFF of the files to ensure that you migrate all
changes from your local distro.json file into the new distro.json file.

5. Deploy your local files to NetSuite.


For details, see the help topic Deploy to NetSuite.

Tip: Remember, any domain pointing to the Development SSP application will
not reflect existing customizations until you re-deploy migrations from your local
environment.

Major Releases
Major releases may include significant product enhancements and new features or bug fixes. When
migrating to a new release with a new bundle ID, you install the new bundle and then merge existing
customizations to the new bundle before pointing your live site domain to the new bundle.
The following procedure also applies to administrators who want to test a new major release by
deploying to a development SSP within a site record.

To migrate to a new major release:

Important: Before migrating to a new release, review the SuiteCommerce Advanced Release
Notes for important notifications and details regarding changes included in the release.

1. Install the new bundle.


Migration to New Releases 40

1. Go to Customization > SuiteBundler > Search & Install Bundles.


2. Enter the bundle ID for the version of the bundle you want to install. Bundle IDs are
listed in the Release Notes.
3. Select the bundle in the results list and then click Install. Follow any on-screen prompts
to continue the install.
The bundle installation may take a while. A pending message displays in the status
column of the Installed Bundles page. Refresh the screen during the process to see when
the installation is complete.
2. Download the new Source code from the file cabinet to your local environment.
The source zip file is located at Web Site Hosting Files > Live Hosting Files > SSP Applications >
NetSuite Inc. — SCA [version] > Source > _Sources. After downloading is complete, unzip the file
into a new working directory.
3. In your local environment, migrate existing customizations to the new source code directory.
1. Create a duplicate of your custom module folder in the new source code directory.
2. Copy your existing custom modules into the new custom module folder.
3. Update the new distro.json file to include references to any custom modules and to
define any custom application dependencies.

Important: Do not copy the existing distro.json file contents directly into
the new distro.json file. Doing this causes overwrites to changes made in the
distro.json file to support the new release. For example, a new module may
be referenced. NetSuite recommends evaluating the DIFF between files to
ensure that you migrate all changes from your local distro.json file into the new
distro.json file.

4. Any module that changed in the new release bears a higher version number from its
previous release. Compare module version numbers to assess which modules have been
updated and migrate the changes to any existing customizations as necessary. Refer to
the SuiteCommerce Advanced Release Notes for details on which modules were changed
and why.

Important: Migrating to a new release requires testing to ensure any existing


customizations remain viable. Evaluate differences in code against your existing
customizations and test thoroughly before deploying to your live site. See the
help topic Best Practices for Customizing SuiteCommerce Advanced.

4. Deploy your local files and test appropriately.


Testing may consist of various scenarios depending on your setup. You can deploy your local
files to any of the following locations:
■ Primary SSP Application linked to a primary domain (live site)
■ Development SSP Application linked to a development domain
■ Local server. See the help topic SCA on a Local Server.
■ NetSuite sandbox account. See the help topic Deploy to a NetSuite Sandbox.
■ Custom SSP Application. See the help topic Deploy to a Custom SSP Application
For example, you can deploy your customizations to a local server or to a Netsuite sandbox
account for testing. If you do not have a Sandbox account, you can deploy to an SSP Application
linked to a development domain in NetSuite. After testing, deploy your files to the SSP
Application linked to the primary domain.
Migration to New Releases 41

To deploy your new implementation to a development SSP Application:


1. Go to Setup > SuiteCommerce Advanced > SSP Applications and click View next to the
SuiteCommerce Advanced Dev <version> application.
2. Click Link to Domain.
3. Select the development domain for this SSP Application.

Minimum Setup Requirements


Following are the minimum requirements for a complete SuiteCommerce Advanced website.
Set the following preferences:

■ On the Setup tab, in the Home Page field, select Hosting Files : Live Hosting Files
■ On the Shopping tab, you must select at least one currency and one language to be online and
default.
■ On the Search Index tab, under Facet Fields, select at least one facet selected to show facets in the
frontend (for example, Online Price)
■ On the Touch Points tab, verify that all default Touch Points are defined. These are automatically
configured during installation.

■ On the Domains tab, enter one domain. For more information, see SCA Domains and Touch Points.
At least one domain is required.
■ On the Field Sets tab, select fieldsets needed as described in the following table. Fields not indicated
as required are used inside SuiteCommerce Advanced as an example.

Field Sets
Note: See Field Set Setup Script for instructions on running a script to populate your website
with these default Field Set requirements.

Important: The Field Set to return item details is named details. If a different name is used,
you must configure that change as described in Items Fields Advanced Name.

Name Id Fields Required/Details

Details details    

    custitem_ns_pr_count: NS PR  
Count (Custom)

    custitem_ns_pr_item_  
attributes: NS PR Attributes
(Custom)

    custitem_ns_pr_rating: NS PR  
Rating (Custom)

    custitem_ns_pr_rating_by_  
rate: NS PR Rating By Rate
(Custom)

    defaultcategory_detail:  
Default Category (Detail)

    itemimages_detail: Item  
Images (Detail)
Minimum Setup Requirements 42

Name Id Fields Required/Details

    itemoptions_detail: Item Required for matrix items


Options (Detail)

    matrixchilditems_detail: Required for matrix items


Matrix Child Items (Detail)

    onlinecustomerprice_detail:  
Price for Current Customer
(Detail)

    pagetitle2: Page Title 2  

    pricelevel1: Retail  

    pricelevel1_formatted: Retail  
(Formatted)

    quantityavailable: Available  

    displayname: Display Name  

    featureddescription:  
Featured Description

    internalid: Internal ID Required for Shopping


Cart and My Account

    itemtype: Type Required for Shopping


Cart and My Account

    itemid: Name  

    outofstockmessage: Out Of  
Stock Message

    pagetitle: Page Title  

    stockdescription: Stock  
Description

    storedetaileddescription:  
Detailed Description

    storedescription2: Store  
Description 2

    storedisplayname2: Store  
Display Name 2

    urlcomponent: URL  
Component

    isinactive: Inactive Required for My Account

    isonline: Available Online Required for My Account

    isinstock: In Stock Required for Reference


ShopFlow

    ispurchasable: Available for Required for Reference


Purchase ShopFlow

    isbackorderable: Available Required for Reference


for Backorder ShopFlow
Minimum Setup Requirements 43

Name Id Fields Required/Details

    showoutofstockmessag Required for Reference


e: Display Out-of-Stock ShopFlow
Message

    minimumquantity: Minimum Required if is set smallest


Quantity quantity for allow
customers to purchase for
an item.

    metataghtml: Meta Tag To be included in the


HTML document's head on
product detailed page.

    searchkeywords: Search Coma separated words to


Keywords be included in the meta
keywords on the product
detailed page.

    isfulfillable: Can be Fulfilled/ Required for Pickup In


Received Store

    isstorepickupallowed: Store Required for Pickup In


Pickup Allowed Store

    quantityavailableforstorepick Required for Pickup In


up_detail: Available For Store Store
Pickup (Detail)

Matrix Child matrixchilditems    


Items

    onlinecustomerprice_detail:  
Price for Current Customer
(Detail)

    quantityavailable: Available  

    internalid: Internal ID Required for Shopping


Cart and My Account

    minimumquantity: Minimum Required to allow


Quantity customers to purchase for
an item.

    outofstockbehavior: Out Of  
Stock Behavior

    outofstockmessage: Out Of  
Stock Message

    isinstock: In Stock Required for Reference


ShopFlow

    ispurchasable: Available for Required for Reference


Purchase ShopFlow

    isbackorderable: Available Required for Reference


for Backorder ShopFlow

    isfulfillable: Can be Fulfilled/ Required for Pickup In


Received Store

    isstorepickupallowed: Store Required for Pickup In


Pickup Allowed Store
Minimum Setup Requirements 44

Name Id Fields Required/Details

    quantityavailableforstorepick Required for Pickup In


up_detail: Available For Store Store
Pickup (Detail)

Search search   Required for Reference


ShopFlow

    itemimages_detail: Item  
Images (Detail)

    itemoptions_detail: Item Required for matrix items


Options (Detail)

    matrixchilditems_detail: Required for matrix items


Matrix Child Items (Detail)

    onlinecustomerprice_detail:  
Price for Current Customer
(Detail)

    pricelevel1: Retail  

    pricelevel1_formatted: Retail  
(Formatted)

    displayname: Display Name  

    internalid: Internal ID Required for Shopping


Cart and My Account

    itemid: Name Required for Shopping


Cart and My Account

    outofstockmessage: Out Of  
Stock Message

    stockdescription: Stock  
Description

    storedisplayname2: Store  
Display Name 2

    urlcomponent: URL  
Component

    itemtype: Type  

    isinstock: In Stock  Required for Reference


ShopFlow

    ispurchasable: Available for Required for Reference


Purchase  ShopFlow

    isbackorderable: Available Required for Reference


for Backorder  ShopFlow

    showoutofstockmessag Required for Reference


e: Display Out-of-Stock ShopFlow
Message 

    custitem_ns_pr_count:  
Product Reviews Count
(Custom)
Minimum Setup Requirements 45

Name Id Fields Required/Details

    custitem_ns_pr_rating:  
Product Reviews Rating
(Custom)

Order id order    

    itemimages_detail: Item  
Images (Detail)

    itemoptions_detail: Item  
Options (Detail)

    onlinecustomerprice_detail:  
Price for Current Customer
(Detail)

    displayname: Display Name  

    internalid: Internal ID Required for Shopping


Cart and My Account

    itemid: Name  

    storedisplayname2: Store  
Display Name 2

    urlcomponent: URL  
Component

    outofstockmessage: Out Of  
Stock Message

    showoutofstockmessag  
e: Display Out-of-Stock
Message

    isinstock: In Stock Required for Reference


MyAccount

    isbackorderable: Available Required for Reference


for Backorder MyAccount

    ispurchasable: Available for Required for Reference


Purchase MyAccount

    pricelevel1: Retail  

    pricelevel1_formatted: Retail  
(Formatted)

    stockdescription: Stock  
Description

    matrixchilditems_detail: Required for My Account


Matrix Child Items (Detail) Product Lists

    itemtype: Type Required for Shopping


Cart and My Account

    minimumquantity: Minimum  
Quantity

    isonline: Available Online Required for Reference


MyAccount
Minimum Setup Requirements 46

Name Id Fields Required/Details

    isinactive: Inactive Required for Reference


MyAccount

Type Ahead typeahead    

    itemimages_detail: Item  
Images (Detail)

    displayname: Display Name  

    itemid: Name  

    storedisplayname2: Store  
Display Name 2

    urlcomponent: URL  
Component

Correlated correlateditems same as search  


Items Id

Related Items relateditems  same as search  


Id

Correlated correlateditems_details correlateditems_detail:  


Items Details Correlated Items (Detail)

Related Items relateditems_details relateditems_detail: Related  


Details Id Items (Detail)

Referenced Libraries
Several JavaScript libraries may need to be referenced from your SuiteCommerce Advanced
application. These files integrate the Content Delivery Service bundle, Host Mapping for multiple
languages and domains, and the required backbone, underscore, commons, and models JavaScript
libraries. A single ssp_libraries.js files is automatically referenced during the installation process. You
will need to add the additional files if needed.

To verify that the required libraries are added to the application:


1. Edit the SuiteCommerce Advanced SuiteApp.
Go to Setup > SuiteCommerce Advanced > SSP Applications and click Edit next to the
SuiteCommerce Advanced SuiteApp.
2. On the Scripts tab, verfiy the following references:

Note: The order of these libraries MUST match the order listed below.

■ Web Site Hosting Files/Live Hosting Files/SSP Applications/[NetSuite Inc. – SCA x.0]/
Development/ssp_libraries.js
■ Web Site Hosting Files/Live Hosting Files/SSP Applications/NetSuite Inc. - Content Delivery/
ContentDeliveryService/ssp_libraries/ContentDeliveryService.Models.js
This script is not added during installation of SuiteCommerce Advanced and must be added
if you intend to use Content Delivery services. Before adding the script the Content Delivery
bundle must be installed in your account. For more information on Content Delivery see the
help topic Content Delivery.
■ Web Site Hosting Files/Live Hosting Files/SSP Applications/[NetSuite Inc. – SCA x.0]/
Development/hosts.config.js
Minimum Setup Requirements 47

This script is not added during installation of SuiteCommerce Advanced and must be added if
you intend to define custom host mappings for your website.
3. Click Save.

Required Item Fields


Several fields are required to be set up for each item record before items are returned in the search
results sets and displayed correctly in item lists and details. For detailed information on setting up item
fields see Item Search Index.

Field Set Setup Script


Following is a script you can leverage to quickly populate your site with required Field Sets. We
recommend that you understand your site setup requirements fully before using this script. For details,
refer to Minimum Setup Requirements. You can then modify the script to add Field Sets that are critical
to your needs. For example, if your account does not define correlated or related items for a certain
item, do not include the correlated and related items Field Sets. Your modified script is intended to be
used during the initial development phase of your site so that you can quickly replicate a site setup as
needed.

Note: To execute the script, you need to use the SuiteScript Debugger tool. If you are
unfamiliar with this tool, refer to Working with the SuiteScript Debugger for detailed
instructions. To execute this script, you shouldn’t need to know all of the debugging capabilities
but it is a good idea to familiarize yourself with the tool.

To use the script:


1. Create your new site, without adding any Field Sets, as described in Creating a Website.
2. Using the script below as a template:
■ (Optional) Add any Field Set definitions to the Setup Script below as needed for your site.
The set included in the Setup Script are the required fields including Product Reviews and
normally provide a good starting point for your website. See Field Sets to review the required
fields.

Important: The Field Set to return item details is named details. If a different name
is used, you must configure that change as described in Items Fields Advanced Name
on the Backend Subtab.

■ Edit the siteID variable with the site id you want to use.
The site id is displayed in the URL when you navigate to the Web Site Setup page for the
desired site. The default value of zero will fail since no site is ever assigned an ID of zero.
3. Execute the script in the SuiteScript debugger.
1. Go to Customization > Scripting > Script Debugger.
2. Enter the SuiteScript Debugger domain (by clicking the link as indicated) and then re-
enter your login credentials if prompted.
3. From the API Version dropdown, select 1.0.

Important: This script can only be run against SuiteScript Version 1.0.
4. Copy and paste the script code into the debugger.
5. Click Debug Script and then hit the Continue button.
Minimum Setup Requirements 48

After the script has executed, Field Sets are properly populated and can be verified in the Field Sets tab
of the Web Site Setup record at Setup > SuiteCommerce Advanced > Set Up Web Site.

Setup Script
Use the default script if you need to define field sets with Product Reviews. Set the has_store_pickup
flag to true if you need to define field sets with Pickup In Store. Set both flags to false if you need to
define default field sets.

Note: Before running this script, delete any field sets that are currently defined for the website
where you want to run the script.

var siteID = 99999 ­// change to the site id you want to use
, has_product_reviews = true
, has_store_pickup = false
, siteRecord = nlapiLoadRecord('website', siteID);
siteRecord.selectNewLineItem('fieldset');
siteRecord.setCurrentLineItemValue('fieldset', ­'fieldsetname', ­'Search');
siteRecord.setCurrentLineItemValue('fieldset', ­'fieldsetid', ­'search');
siteRecord.setCurrentLineItemValue('fieldset', ­'fieldsetrecordtype', ­'ITEM');
var search_fields = ­'urlcomponent,itemimages_detail,itemoptions_detail,internalid,onlinecustome
rprice,onlinecustomerprice_detail,onlinecustomerprice_formatted,onlinematrixpricerange,onlinema
trixpricerange_formatted,quantityavailable,displayname,itemid,outofstockbehavior,outofstockmess
age,stockdescription,storedescription,storedisplaythumbnail,storedisplayname2,isinstock,isbacko
rderable,ispurchasable,showoutofstockmessage';
if(has_product_reviews)
{
search_fields += ­',custitem_ns_pr_count,custitem_ns_pr_rating';
}
if(has_store_pickup)
{
search_fields += ­',isstorepickupallowed,isfulfillable';
}
siteRecord.setCurrentLineItemValue('fieldset', ­'fieldsetfields', search_fields);
siteRecord.commitLineItem('fieldset');
siteRecord.selectNewLineItem('fieldset');
siteRecord.setCurrentLineItemValue('fieldset', ­'fieldsetname', ­'details');
siteRecord.setCurrentLineItemValue('fieldset', ­'fieldsetid', ­'details');
siteRecord.setCurrentLineItemValue('fieldset', ­'fieldsetrecordtype', ­'ITEM');
var details_fields = ­'urlcomponent,itemimages_detail,itemoptions_detail,internalid,matrixchildi
tems_detail,onlinecustomerprice_detail,quantityavailable,displayname,itemtype,itemid,outofstock
behavior,outofstockmessage,pagetitle,rate,rate_formatted,relateditemsdescription,stockdescripti
on,storedetaileddescription,storedisplayimage,storedisplayname2,isinstock,isbackorderable,ispur
chasable,showoutofstockmessage,metataghtml,minimumquantity';
if(has_product_reviews)
{
details_fields += ­',custitem_ns_pr_count,custitem_ns_pr_rating,custitem_ns_pr_item_attribut
es,custitem_ns_pr_rating_by_rate';
}
if(has_store_pickup)
{
details_fields += ­',isfulfillable,isstorepickupallowed,quantityavailableforstorepickup_deta
il';
}
siteRecord.setCurrentLineItemValue('fieldset', ­'fieldsetfields', details_fields);
Minimum Setup Requirements 49

siteRecord.commitLineItem('fieldset');
siteRecord.selectNewLineItem('fieldset');
siteRecord.setCurrentLineItemValue('fieldset', ­'fieldsetname', ­'matrixchilditems');
siteRecord.setCurrentLineItemValue('fieldset', ­'fieldsetid', ­'matrixchilditems');
siteRecord.setCurrentLineItemValue('fieldset', ­'fieldsetrecordtype', ­'ITEM');
var matrix_fields = ­'onlinecustomerprice_detail,internalid,quantityavailable,outofstockbehavior
,outofstockmessage,stockdescription,isinstock,isbackorderable,ispurchasable,showoutofstockmessa
ge,itemid,minimumquantity,itemtype';
if(has_store_pickup)
{
matrix_fields += ­',isfulfillable,isstorepickupallowed,quantityavailableforstorepickup_detai
l';
}
siteRecord.setCurrentLineItemValue('fieldset', ­'fieldsetfields', matrix_fields);
siteRecord.commitLineItem('fieldset');
siteRecord.selectNewLineItem('fieldset');
siteRecord.setCurrentLineItemValue('fieldset', ­'fieldsetname', ­'Correlated Items');
siteRecord.setCurrentLineItemValue('fieldset', ­'fieldsetid', ­'correlateditems');
siteRecord.setCurrentLineItemValue('fieldset', ­'fieldsetrecordtype', ­'ITEM');
var correlated_fields = ­'urlcomponent,itemimages_detail,itemoptions_detail,internalid,onlinecus
tomerprice,onlinecustomerprice_detail,onlinecustomerprice_formatted,onlinematrixpricerange,onli
nematrixpricerange_formatted,quantityavailable,displayname,itemid,outofstockbehavior,outofstock
message,stockdescription,storedescription,storedisplaythumbnail,storedisplayname2,isinstock,isb
ackorderable,ispurchasable,showoutofstockmessage';
if(has_product_reviews)
{
correlated_fields += ­',custitem_ns_pr_count,custitem_ns_pr_rating';
}
siteRecord.setCurrentLineItemValue('fieldset', ­'fieldsetfields', correlated_fields);
siteRecord.commitLineItem('fieldset');
siteRecord.selectNewLineItem('fieldset');
siteRecord.setCurrentLineItemValue('fieldset', ­'fieldsetname', ­'Related Items');
siteRecord.setCurrentLineItemValue('fieldset', ­'fieldsetid', ­'relateditems');
siteRecord.setCurrentLineItemValue('fieldset', ­'fieldsetrecordtype', ­'ITEM');
var related_fields = ­'urlcomponent,itemimages_detail,itemoptions_detail,internalid,onlinecustom
erprice,onlinecustomerprice_detail,onlinecustomerprice_formatted,onlinematrixpricerange,onlinem
atrixpricerange_formatted,quantityavailable,displayname,itemid,outofstockbehavior,outofstockmes
sage,stockdescription,storedescription,storedisplaythumbnail,storedisplayname2,isinstock,isback
orderable,ispurchasable,showoutofstockmessage';
if(has_product_reviews)
{
related_fields += ­',custitem_ns_pr_count,custitem_ns_pr_rating';
}
siteRecord.setCurrentLineItemValue('fieldset', ­'fieldsetfields', related_fields);
siteRecord.commitLineItem('fieldset');
siteRecord.selectNewLineItem('fieldset');
siteRecord.setCurrentLineItemValue('fieldset', ­'fieldsetname', ­'Order');
siteRecord.setCurrentLineItemValue('fieldset', ­'fieldsetid', ­'order');
siteRecord.setCurrentLineItemValue('fieldset', ­'fieldsetrecordtype', ­'ITEM');
var order_fields = ­'itemimages_detail,itemoptions_detail,onlinecustomerprice_detail,displayname
,internalid,itemid,isfulfillable,storedisplayname2,urlcomponent,outofstockmessage,showoutofstoc
kmessage,isinstock,isbackorderable,ispurchasable,pricelevel1,pricelevel1_formatted,stockdescrip
tion,matrixchilditems_detail,itemtype,minimumquantity,isonline,isinactive';
if(has_store_pickup)
{
Minimum Setup Requirements 50

order_fields += ­',isstorepickupallowed,quantityavailableforstorepickup_detail,isfulfillable
';
}
siteRecord.setCurrentLineItemValue('fieldset', ­'fieldsetfields', order_fields);
siteRecord.commitLineItem('fieldset');
siteRecord.selectNewLineItem('fieldset');
siteRecord.setCurrentLineItemValue('fieldset', ­'fieldsetname', ­'Type Ahead');
siteRecord.setCurrentLineItemValue('fieldset', ­'fieldsetid', ­'typeahead');
siteRecord.setCurrentLineItemValue('fieldset', ­'fieldsetrecordtype', ­'ITEM');
var typeahead_fields = ­'itemid,displayname,storedisplayname2,urlcomponent,itemimages_detail';
if(has_product_reviews)
{
typeahead_fields += ­',custitem_ns_pr_count,custitem_ns_pr_rating';
}
siteRecord.setCurrentLineItemValue('fieldset', ­'fieldsetfields', typeahead_fields);
siteRecord.commitLineItem('fieldset');
siteRecord.selectNewLineItem('fieldset');
siteRecord.setCurrentLineItemValue('fieldset', ­'fieldsetname', ­'Items Searcher');
siteRecord.setCurrentLineItemValue('fieldset', ­'fieldsetid', ­'itemssearcher');
siteRecord.setCurrentLineItemValue('fieldset', ­'fieldsetrecordtype', ­'ITEM');
var items_searcher_fields = ­'itemimages_detail,displayname,itemid,storedisplayname2,urlcomponen
t,minimumquantity,itemoptions_detail,matrixchilditems_detail,isinstock,showoutofstockmessage,ou
tofstockmessage,onlinecustomerprice_detail,pricelevel1,pricelevel1_formatted,itemtype,ispurchas
able,isbackorderable';
if(has_product_reviews)
{
items_searcher_fields += ­',custitem_ns_pr_count,custitem_ns_pr_rating';
}
siteRecord.setCurrentLineItemValue('fieldset', ­'fieldsetfields', items_searcher_fields);
siteRecord.commitLineItem('fieldset');
siteRecord.selectNewLineItem('fieldset');
siteRecord.setCurrentLineItemValue('fieldset', ­'fieldsetname', ­'Related Items Details');
siteRecord.setCurrentLineItemValue('fieldset', ­'fieldsetid', ­'relateditems_details');
siteRecord.setCurrentLineItemValue('fieldset', ­'fieldsetrecordtype', ­'ITEM');
siteRecord.setCurrentLineItemValue('fieldset', ­'fieldsetfields', ­'relateditems_detail');
siteRecord.commitLineItem('fieldset');
siteRecord.selectNewLineItem('fieldset');
siteRecord.setCurrentLineItemValue('fieldset', ­'fieldsetname', ­'Correlated Items Details');
siteRecord.setCurrentLineItemValue('fieldset', ­'fieldsetid', ­'correlateditems_details');
siteRecord.setCurrentLineItemValue('fieldset', ­'fieldsetrecordtype', ­'ITEM');
siteRecord.setCurrentLineItemValue('fieldset', ­'fieldsetfields', ­'correlateditems_detail');
siteRecord.commitLineItem('fieldset');
recId = nlapiSubmitRecord(siteRecord);

Touch Points
Touch Points must be defined for the places on your site where you want visitors to interact with
the SSP Applications installed with SuiteCommerce Advanced. After deploying touch points, you can
determine the URL you need to access your site. You can use this URL to create links and buttons
shoppers can use to navigate your site.
Touch Points 51

Note: Default Touch Points are defined for the SSP Applications configured during the
installation of SuiteCommerce Advanced.

For more technical information about touch points, see the help topic Selecting Supported Touch
Points.
Some touch points are for the Shopping experience, some are for My Account, some are appropriate
for Checkout. Best practice is to set touch points on the Web Site Setup page. See, SCA Domains and
Touch Points.

■ Log In
■ Log Out
■ Proceed to Checkout
■ Register
■ View Cart
■ View Customer Center
■ View Homepage

Diff and Patch Files


This section provides the following information on patch files available for previous releases of
SuiteCommerce Advanced:

■ List of Available Diff and Patch Files


■ How to Apply Diff Files
■ Diff File Structure

Note: The terms diff and patch are used interchangeably within this document.

When updating SuiteCommerce Advanced, NetSuite provides diff and patch files for upgrading
SuiteCommerce Advanced source code when new features are released. These .patch files typically
contain the complete diffs between new and previous releases across all source files. In some cases,
NetSuite may provide diffs for specific purposes, such as for backporting code to previous releases to
support new features.
A diff file contains the differences between two identically titled files. The diff designates these folders
as a and b. Distributing the patch to an identically titled path/folder allows the diff to transform
changes in b (the source of the changes) to the matching file in a (the target of the changes).

List of Available Diff and Patch Files


Diff and patch files are saved as either .patch or compressed .zip files, located in the File Cabinet. The
following table describes diff and patch files currently available for SuiteCommerce Advanced.

Description Applies To File


Release

Application Performance Management Mont Blanc montblanc-sensors.patch


(APM) Backport for Mont Blanc Release
of SuiteCommerce Advanced

Mont Blanc Release of SuiteCommerce Mont Blanc Mont_Blanc_2.0_Patch_Files.zip


Advanced
Diff and Patch Files 52

Description Applies To File


Release

Serversync touchpoint patch for Mont Mont Blanc Serversync.zip


Blanc Release of SuiteCommerce See the help topic Serversync
Advanced Touchpoint for instructions on applying
This patch maintains the identity of the this patch.
user and cart contents.

Customizing PayPal Address for Vinson and earlier Customization instructions only.
SuiteCommerce Advanced. See the help topic Customizing PayPal
Provides instructions to retain PayPal Address for SuiteCommerce Advanced
Address details in the NetSuite
customer record.

SSL and Single Domain Backport for Denali Denali-ssl.patch


Denali release of SuiteCommerce
Advanced
This patch maintains a secure browser.
This patch also maintains the identity
of the user and cart contents.

SSL and Single Domain Backport for Mont Blanc MontBlanc-ssl.patch


Mont Blanc release of SuiteCommerce
Advanced
This patch maintains a secure browser.

SSL and Single Domain Backport for Vinson Vinson-ssl.patch


Vinson release of SuiteCommerce
Advanced
This patch maintains a secure browser.

How to Apply Diff Files


Follow the appropriate procedure to apply the diff, depending on how you customized the source code
in previous releases.

■ If you have not altered any SuiteCommerce Advanced source files in Modules/suitecommerce/,
you can use third-party software to run the patch.
■ If you have modified any source files in Modules/suitecommerce/, you must implement changes
manually.

Warning: Applying a diff adds and removes lines of code. This can break your site if you
are not careful. Do not apply any diffs using third-party software unless you have followed
NetSuite’s best practices for customizing JavaScript files as outlined in Best Practices for
Customizing SuiteCommerce Advanced.

Warning: Do not patch your live site directly. Create a test site or test files locally using the dev
tools. Failure to test any changes thoroughly before deploying to your live site can result in data
loss.

To apply a diff using third-party software:


1. Download the correct diff file to the target directory. For example, montblanc. See List of
Available Diff and Patch Files for details.
Diff and Patch Files 53

2. Make a backup of your original source code.


3. Review the diff as applicable. See Diff File Structure for details.
4. Ensure that you have not altered any source code provided by NetSuite and apply the diff using
your preferred third-party method.
Various programs are available that can apply a diff file to your SCA source code. The following
example applies a Mont Blanc release diff using Git.

cd montblanc
git init
git apply ­/path/montblanc-sensors.patch
rm ­-rf ­.git

To apply a diff manually:


1. Download the correct diff file. See List of Available Diff and Patch Files for details.
2. Open the diff.
3. Make a backup of your local source code.
4. Make all changes manually in your local source code. For a detailed description of a diff file and
its components, see Diff File Structure

Diff File Structure


This section explains how SuiteCommerce Advanced diff files are structured. The information in this
section should help you understand any diff files provided by NetSuite for SuiteCommerce Advanced.

Example Diff File


The following example shows a simple diff (.patch file). This example only compares one file, although
most diffs include more than one file. One diff file typically contains many comparisons, each with its
own components, as described in this section.

diff ­--git a/myDirectoryPath/myFile.js b/myDirectoryPath/myFile.js


index 5d7cd7e.­.fca4091 100755
--- a/myDirectoryPath/myFile.js
+++ b/myDirectoryPath/myFile.js
@@ ­-76,7 +77,7 @@ define('Sensors'

{
_.each(arguments, function (argument)
{
- if(argument)
+ if (argument)
{
_.extend(data, argument);
­}

File Comparison Header


The File Comparison Header is a statement explaining two files being compared. The two files being
compared include leading directory names a and b to distinguish the two files, which typically have
identical names and locations.
Diff and Patch Files 54

This example shows changes between two versions of myFile.js. Note the file names and paths are
identical. --git simply informs you that this diff is written in Git-specific diff format. Each comparison
within the diff begins with a header.

diff ­--git a/myDirectoryPath/myFile.js b/myDirectoryPath/myFile.js

Index
Technically part of the Header, the index is a line of metadata describing technical information about
the given files. The first two numbers (separated by ..) represent the IDs of the two files being
compared. In this case, each version of the project file is an object at a specific revision.

The last number is a mode identifier for the file containing the changes:

■ 100644 specifies a normal, non-executable file.


■ 100755 specifies an executable file.
■ 120000 specifies a symbolic link.

In this example, this part of the diff is comparing two different file IDs (5d7cd7e and fca4091) of
myFile.js, which is an executable file.

index 5d7cd7e.­.fca4091 100755

Change Markers
The next two lines describe the two files (and paths) being compared, but with +++ or --- prefixes.
The file with the minus symbols shows lines that exist within the a version but are missing from the b
version. Likewise, the file with the plus symbols contains lines missing in the a version but are present
in b.

In this example, a is the existing (old) file and b is the updated (new) file.

--- a/myDirectoryPath/myFile.js
+++ b/myDirectoryPath/myFile.js

Range Information
Diff files show only the portions of the file being changed. These portions are called hunks. One hunk
of data containing changes is depicted within two sets of @@ symbols. This information declares the
lines within the hunk that are affected by the change. One index can contain multiple hunks, depicting
the various changes throughout the file.

In this example, the diff contains one hunk of differences. Seven lines are extracted from the a file,
beginning at line 76. Likewise, seven lines are displayed in the b file, beginning at line 77.

@@ ­-76,7 +77,7 @@

Changes
The changes to each hunk immediately follow the range information. Each changed line is prepended
with either a + or a - symbol. These symbols act in the same way as they do in the Change Markers
section. The diff removes lines prepended with a - and adds lines prepended with a + sign. If making
Diff and Patch Files 55

changes to your code manually, any lines bearing the - prefix need to be removed. Any lines bearing
the + prefix need to be added.

Additionally, a hunk typically contains unchanged lines before and after the modification to provide
context for the change. In this example, the diff removes if(argument) and adds the corrected code:
if (argument).

define('Sensors'

{
_.each(arguments, function (argument)
{
- if(argument)
+ if (argument)
{
_.extend(data, argument);
­}

Note: In diffs provided by NetSuite, a files and lines marked with - are old, and b files and lines
marked with + are updates.

You might also like