Sca Admin Guide
Sca Admin Guide
Sca Admin Guide
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.
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.
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.
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:
■ 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.
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
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
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
Setting Precedence
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:
Special Order Items are Always in Stock field is checked, the item is considered in stock and appears
in the web store.
■ 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.
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.
Inventory Item Record (for any items Drop Ship Item Checked
to be listed as drop ship items)
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
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.
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":
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.
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.
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.
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.
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.
Note: Only certain fields on item records are available as sorting options based on
the field type. For more information, see Field Set Reference.
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.
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()}
]
After you have selected sort fields for search results, go to the next step in configuring SuiteCommerce
Advanced item search settings, Facet Fields.
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.
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
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.
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.
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
■ 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.
After you have completed the task of selecting facet fields, go to the next step in configuring
SuiteCommerce Advanced item search settings, Field Sets.
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.
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.
■ 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
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.
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.
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
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).
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
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.
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:
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).
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.
4. Click Save.
To learn more about preparing item records for the search index, see Item Search Index.
■ 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.
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.
■ Item Availability
■ Item Pricing
■ Item record changes
Note: This includes changes on item records as a result of using a CSV import.
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.
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:
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.
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.
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.
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.
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.
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.
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.
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.
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
camera_sideview-mobile.jpg
camera_sideview-browser.jpg.-
Notes on delimiters:
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.
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.
http://mysite.com/images/OU9613.media.orange.01.jpg?resizeid=10&resizeh=230&resizew=201 -
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.
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" -
} -
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.
■ 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.
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.
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
...-
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.
■ 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.
Billing X
Account Balance
Print A Statement
Make A Payment
Transaction History & Details
Credit Memos/Deposits
Case Management X X
Email Preferences X X
Logon/Signup/Forgot Password X X
Product Lists X
Profile Information X X
Email Preferences
Address Book Management
Credit Card Management
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:
■ 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.
Browser Platform
Browser Platform
Safari 7 iOS
Android
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.
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.
Important: For shared bundles, contact your NetSuite Representative if you do not
have access to the bundle.
SuiteApp Bundle ID
SuiteApp Bundle ID
SuiteCommerce 135010
Configuration
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
■ 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.
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.
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.
Important: Before migrating to a new release, review the SuiteCommerce Advanced Release
Notes for important notifications and details regarding changes included in the release.
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.
■ 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.
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
onlinecustomerprice_detail:
Price for Current Customer
(Detail)
pricelevel1: Retail
pricelevel1_formatted: Retail
(Formatted)
quantityavailable: Available
featureddescription:
Featured Description
itemid: Name
outofstockmessage: Out Of
Stock Message
stockdescription: Stock
Description
storedetaileddescription:
Detailed Description
storedescription2: Store
Description 2
storedisplayname2: Store
Display Name 2
urlcomponent: URL
Component
onlinecustomerprice_detail:
Price for Current Customer
(Detail)
quantityavailable: Available
outofstockbehavior: Out Of
Stock Behavior
outofstockmessage: Out Of
Stock Message
itemimages_detail: Item
Images (Detail)
onlinecustomerprice_detail:
Price for Current Customer
(Detail)
pricelevel1: Retail
pricelevel1_formatted: Retail
(Formatted)
outofstockmessage: Out Of
Stock Message
stockdescription: Stock
Description
storedisplayname2: Store
Display Name 2
urlcomponent: URL
Component
itemtype: Type
custitem_ns_pr_count:
Product Reviews Count
(Custom)
Minimum Setup Requirements 45
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)
itemid: Name
storedisplayname2: Store
Display Name 2
urlcomponent: URL
Component
outofstockmessage: Out Of
Stock Message
showoutofstockmessag
e: Display Out-of-Stock
Message
pricelevel1: Retail
pricelevel1_formatted: Retail
(Formatted)
stockdescription: Stock
Description
minimumquantity: Minimum
Quantity
itemimages_detail: Item
Images (Detail)
itemid: Name
storedisplayname2: Store
Display Name 2
urlcomponent: URL
Component
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.
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.
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.
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
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).
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.
■ 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.
cd montblanc
git init
git apply /path/montblanc-sensors.patch
rm -rf .git
{
_.each(arguments, function (argument)
{
- if(argument)
+ if (argument)
{
_.extend(data, argument);
}
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.
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:
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.
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.