SSP Applications as XML Definitions

Note:

SSP application objects in SuiteCloud Development Framework (SDF) only support SuiteScript 1.0. For information about SuiteScript versions, see SuiteScript Versioning Guidelines.

SSP (SuiteScript Server Page) applications are supported in SuiteCloud Development Framework (SDF). They are used to build custom applications for SuiteCommerce webstores, letting you customize a shopping experience by replacing default web store pages with your own custom assets. For example, you can use HTML and SuiteScript 1.0 to create these customizations. For more information about SSP applications and SuiteCommerce, see SSP Application Overview.

You can create and manage a SuiteScript Server Page (SSP) application in a SuiteCloud project and deploy it to a target NetSuite account. You can also import an SSP application from a NetSuite account into a SuiteCloud project. For more information about importing objects, see Account Component Imports to SuiteCloud Projects.

Customizing an SSP application object from your SuiteCloud project is the equivalent of editing or making a new SSP application record from the NetSuite UI. For example, from a NetSuite account, select Customization > Scripting > SSP Application > New from a NetSuite account. An SSP application consists of .ssp files and a library of JavaScript files. The library of files associated with the .ssp files must be stored in the File Cabinet/Web Site Hosting Files folder in the SuiteCloud project.

The following is an image of an SSP application record in Edit mode in the NetSuite UI. Some NetSuite UI and webstore customization differ depending on whether the Site Builder, SuiteCommerce Advanced, or SuiteCommerce Standard module is enabled in the NetSuite account.

Note:

Changing precedence, linking to site, or linking to domain are account-specific actions that cannot be specified using SDF. When an SSP application is deployed to an account, it is added to the end of the list and automatically assigned the last precedence number. For example, if it was the third SSP application added to an account, the precedence sequence value is set to 3. For more information, see Change SSP Application Precedence.

SSP application page Sripts tab Libraries list.

SSP applications in SDF are represented with an <sspapplication> element. To define this object, see the following sections:

The SSP Application Element

Note:

Some fields may contain or require account-specific values. These values cannot be specified or imported into a SuiteCloud project. These values can only be specified in the SSP application record using the NetSuite UI after the SSP application is deployed to a target account.

Field

Description

sspapplication

Within this element, you can optionally specify the script ID in quotations using a attribute=value pair.

                      <sspapplication scriptid="">
    ...
</sspapplication> 

                    

For example, the following sets the script ID of an SSP application object to the value webapp_33:

                      <sspapplication scriptid="webapp_33"> 

                    

If you do not enter a value, a default is provided, webapp###. This value cannot be edited after the SSP Application record is saved.

name

This name is like a project name, and is used in NetSuite lists, such as those on the SSP Applications list page. This name is not directly visible to web store users.

For example:

                         <name>Test SSP Application</name> 

                    

The character limit is 40.

appfolder

This is the File Cabinet folder where customization files are located, such as a subfolder in the Live Hosting Files folder or WebSite Hosting Files Folder. Specify the application folder as a file reference encased in square brackets.

For example:

                      <appfolder>[/Web Site Hosting Files/Staging Hosting Files/SSP Applications/Sample/Test/]</appfolder> 

                    
Important:

The folder path must begin and end with the forward slash (/) character.

rootpath

This is the base URL that is used to link to the SSP application from the web store and may be visible to web store users. It specifies the path that points to the location of SSP application assets. By default, the URL root includes the application publisher and application name.

For example:

                      /Samples/Test/ 

                    

The base URL should include at least one path component that distinguishes SSP application assets from other root assets in the domain.

Important:

The folder path must begin and end with the forward slash (/) character.

description

(optional)

This is a description of the SSP application. The description is only displayed internally in NetSuite.

status

Possible values are:

  • TESTING

  • RELEASED

Leave as the default of Testing while you are creating and debugging your SSP application. Set to Released after you have completed the SSP application and linked it to your website.

loglevel

(optional)

The value in this field determines the type of messages written to the script execution log for the SSP application.

Possible values are:

  • DEBUG

  • AUDIT

  • ERROR

  • EMERGENCY

The default value is DEBUG.

isinactive

(optional)

Possible values are T or F.

The default setting is false.

The Libraries (Scripts) Element

The <sspapplication> element contains a <libraries> element to represent the script subrecord:

Field

Description

libraries

This element represents the script subrecord associated with the SSP application.

library

This element contains the scriptfile reference located in the Web Hosting Files associated with SSP application.

scriptfile

This element takes a file path to reference an external JavaScript file.

For example:

                      <scriptfile>[/SuiteScripts/BundleInstallationScript.js]</scriptfile> 

                    

Files in the SuiteBundles, SuiteScripts, and Web Site Hosting Files folders of your File Cabinet can be selected as library files. After you add a library file to an SSP application, it can be referenced by any of the .ss or .ssp files in the SSP application.

The Entrypoints (Supported Touch Points) Element

The <sspapplication> element contains an <entrypoints> element to represent the entrypoint subrecord:

Field

Description

entrypoints

This element represents the entrypoint subrecord, which appears as a supported touch points tab on the SSP application in the NetSuite UI.

These are the pages where website visitors can interact with the SSP application.

entrypoint

This element contains the elements specifying values for an individual touch point.

An entrypoint must include entryitem and entrytype element. The entryparameter is optional.

entrytype

Set the entrytype to the specify the entry page type for the touch point between your SSP application and web store.

Possible values are:

  • CART

  • CHECKOUT

  • CUSTCENTER

  • HOMEPAGE

  • LOGIN

  • LOGOUT

  • REGISTER

entryitem

Set the entryitem to reference the SSP file you want to use as a supported touch point.

The following file extensions are allowed:

  • .SS

  • .SSP

entryparameter

(optional)

Enter any URL parameters to be used

SSP Application Example

The following is an XML definition example of a custom SSP application object, named "Test SSP Application":

            <sspapplication scriptid="webapp_33">
    <name>Test SSP Application</name>
    <appfolder>[/Web Site Hosting Files/Staging Hosting Files/SSP Applications/Sample/Test/]</appfolder>
    <rootpath>/Sample/Test</rootpath>
    <description>Test SSP Application</description>
    <status>TESTING</status>
    <loglevel>DEBUG</loglevel>
    <isinactive>F</isinactive>
    <libraries>
        <library>
            <scriptfile>[/SuiteScripts/BundleInstallationScript.js]</scriptfile>
        </library>
    </libraries>
    <entrypoints>
        <entrypoint>
            <entrytype>LOGIN</entrytype>
            <entryitem>[/Web Site Hosting Files/Staging Hosting Files/SSP Applications/Sample/Test/test.ssp]</entryitem>
            <entryparameter>f=g<entryparameter>
        </entrypoint>
    </entrypoints>
</sspapplication> 

          

For more information about:

For more information about SSP applications in general, see the following topics:

Related Topics

SuiteCommerce Web Site Management
CMS Content Types as XML Definitions

General Notices