Website Setup

The internal ID for this record is website. In the UI, you can find this record by going to Commerce > Websites > Website List.

For help working with this record in the UI, see Site Builder Web Site Record Settings.

See the SuiteScript Records Browser for all internal IDs associated with this record.

Note:

For information about using the SuiteScript Records Browser, see Working with the SuiteScript Records Browser in the NetSuite Help Center.

For information about scripting with this record in SuiteScript, see the following:

Supported Script Types

The web site setup record is scriptable in server SuiteScript only.

The web site record is not supported in beforeLoad user event scripts.

Supported Functions

The web site setup record is fully scriptable. It can be created, copied, updated, deleted, and searched using SuiteScript.

Usage Notes

Developers can use SuiteScript with the web site setup record whether they are working in accounts using Site Builder, Commerce web stores, or SCIS.

Creating a Web Site Setup Record in SuiteScript

The following code sample shows how to create a SuiteCommerce Web Site Setup record using SuiteScript 2.0:

          /**
 * @NApiVersion 2.x
 */
 
require(['N/record'], function(record) {
    var initValues = new Array();
    initValues.displayname = "name_of_your_website";
    initValues.internalname = "name_of_your_website";
     
    initValues.sitetype = "ADVANCED"; 
    initValues.websitescope = "SUITE_COMMERCE";
    
    var objRec = record.create({
        type: record.Type.WEBSITE,
        defaultValues: initValues
    });
      
    var recId = objRec.save({
        enableSourcing: false,
        ignoreMandatoryFields: false
    });
}) 

        

To set up any other kind of website, the same code is applicable but the sitetype and websitescope parameters must contain different values. The required values for the different site types are as follows:

Product

sitetype value

websitescope value

SuiteCommerce

ADVANCED

SUITE_COMMERCE

SuiteCommerce Advanced

ADVANCED

SUITE_COMMERCE_ADVANCED

SuiteCommerce In Store

ADVANCED

SUITE_COMMERCE_IN_STORE

SuiteCommerce My Account

ADVANCED

SUITE_COMMERCE_MY_ACCOUNT

Site Builder

STANDARD

One of the following:

FULL_WEB_STORE

INFO_CATALOG_PRICING

INFO_CATALOG

INFO_ONLY

For more information about these options, see Multi-Site Settings.

Note:

Websitescope field for ADVANCED sites is read-only by default. This means that you cannot modify websitescope for an existing ADVANCED site.

Setting Values for Web Site Setup Dropdown Fields

The following table lists the dropdown fields on the Web Site Setup record. When writing SuiteScript, if you are setting the value of a dropdown field, use the IDs listed in the column called Internal IDs for Dropdown Values.

Tab

Dropdown Field

UI Labels for Dropdown Values

Internal IDs for Dropdown Values

Setup tab

 

  • Web Site Scope

  • (websitescope)

Note:

Web Site Scope can be changed only for Site Builder sites.

  • Full Web Store

  • Information And Catalog, With Pricing

  • Information And Catalog

  • Information Only

  • FULL_WEB_STORE

  • INFO_CATALOG_PRICING

  • INFO_CATALOG

  • INFO_ONLY

 

Default Customer Category
(defaultcustomercategory)
  • Corporate

  • Individual

  • Employee

  • CORPORATE

  • INDIVIDUAL

  • EMPLOYEE

Appearance tab - applies only to Site Builder

 

Web Site Logo Alignment
(websitelogoalign)
  • Align Left

  • Align Right

  • Align Center

  • LEFT

  • RIGHT

  • CENTER

 

Page Alignment
(pagealign)
  • Align Left

  • Align Right

  • Align Center

  • LEFT

  • RIGHT

  • CENTER

 

Display Order of Cart Items
(cartdisplayorder)
  • Most Recently Added First

  • Most Recently Added Last

  • RECENT_FIRST

  • RECENT_LAST

Upsell tab

 

Items to Upsell
(upsellitems)
  • Show Related Items First and Upsell Items Next

  • Show Upsell Items First and Related Items Next

  • Show Only Related Items

  • Show Only Upsell Items

  • RELATED_FIRST_UPSELL_NEXT

  • UPSELL_FIRST_RELATED_NEXT

  • ONLY_RELATED_ITEMS

  • ONLY_UPSELL_ITEMS

 

Items to Upsell in Cart
(cartupsellitems)
  • Show Related Items First and Upsell Items Next

  • Show Upsell Items First and Related Items Next

  • Show Only Related Items

  • Show Only Upsell Items

  • RELATED_FIRST_UPSELL_NEXT

  • UPSELL_FIRST_RELATED_NEXT

  • ONLY_RELATED_ITEMS

  • ONLY_UPSELL_ITEMS

Legacy tab - applies only to Site Builder

 

Site Tab Alignment
(sitetabalignment)
  • Align Left

  • Align Right

  • Align Center

  • LEFT

  • RIGHT

  • CENTER

Shopping tab

 

Sales Order Type
(salesordertype)
  • Per Customer Basis

  • PER_CUSTOMER

Related Topics

Site Builder Web Site Record Settings
Working with the SuiteScript Records Browser
SuiteCloud Supported Records
Website
CMS Content
CMS Content Type
CMS Page
Commerce Category
Shopping Cart

General Notices