Deploy to a Custom SSP Application

During installation of SuiteCommerce Advanced (SCA), the SSP applications included in the SCA bundle are automatically configured in your NetSuite account. Generally, you deploy customizations to the Development SSP application associated with your SCA release, as described in the Deploy SCA Customizations to NetSuite topic.

SSP Application Support for SuiteScript 2.0

As of the 2019.1 release, SCA supports SuiteScript 2.0. The SSP applications for SCA 2019.1 and later releases include resources to run services implemented using SuiteScript 2.0. These resources can be found in the Development2 and Source2 directories.

You can also deploy local files to a custom SSP application. Custom SSP applications enable you to test local cutomizations of SCA on the domain and site you specify. When you create custom SSP applications, NetSuite generates the directory structure in its file cabinet to which you can deploy your local files.

Important:

If you are implementing the 2019.1 release of SCA or later and want to use custom SSPs for testing, you must create two custom SSP applications. You need one custom application to support the creation and deployment of SuiteScript 1.0 resources and one to support SuiteScript 2.0. In the following procedure, the custom application you create for SuiteScript 2.0 is referred to as SSPv2.

To deploy to custom SSP application, complete the following steps:

Note:

Before deploying to a Custom SSP Application, the SCA bundle must be installed in your account. You cannot deploy local files into an account without the bundle installed.

Step 1: Create a Custom SSP Application

If you are implementing the 2019.1 release of SCA or later and want to use custom SSPs for testing, you must create two custom SSP applications. You need one custom application to support the creation and deployment of SuiteScript 1.0 resources and one to support SuiteScript 2.0.

The NetSuite SSP application record defines the folder in the NetSuite file cabinet where website customization assets are stored. If you are unfamiliar with SSP applications in NetSuite, review SSP Application Overview in the NetSuite Help Center before proceeding.

Important:

If you are updating a site that has been previously deployed to a custom SSP application, you do not need to create a new SSP application. To deploy to the existing SSP application, you need to know the Application Folder and the Application Name. You can find this information on the SSP Application Record for the site you are working on.

The following procedure applies to all implementations of SCA.

Create a custom SSP application for SuiteScript 1.0

  1. Go to Commerce > Hosting > SSP Applications > New.

  2. To create the record for your SuiteScript 1.0 assets, follow the steps outlined in the NetSuite Help topic Create a SuiteScript 1.0 SSP Application Record to provide the following information:

    • If you are implementing SCA 2019.1 or later, when naming your SSP application be sure to append v1 to the end. For example: MyCustomSSPv1

    • Specify a version of 1.x.

    • Create a new application folder and provide the HTML Hosting Root, Application Publisher, and Application Name for your application.

Creating an SSP application results in a directory structure in the NetSuite File Cabinet with the following path: <HTML Hosting Root>: /SSP Applications/<Application Publisher>/<Application Name>. For example, if you specify the following information for the application folder when creating an SSP application:

  • HTML Hosting Root: Live Hosting Files

  • Application Publisher: ProDev

  • Application Name: ProDevSite

The resulting directory structure in the NetSuite File Cabinet is: Web Site Hosting Files/Live Hosting Files/SSP Applications/ProDev/ProDevSite

Create a custom SSP application for SuiteScript 2.0

  1. This procedure applies only to 2019.1 implementations of SCA and later.

    The NetSuite SSPv2 application record defines the folder in the NetSuite file cabinet where website customization assets that support SuiteScript 2.0 are stored. If you are implementing the 2019.1 release of SCA or later, you must create this additional SSP application for SuiteScript 2.0 assets.

    In NetSuite, go to Commerce > Hosting > SSP Applications > New.

  2. To create the record for your SuiteScript 2.0 assets, follow the steps outlined in the NetSuite Help topic Create a SuiteScript 2.0 SSP Application Record to provide the following information:

    • Be sure that the name you assign to the SSP application is the same as the name used for the SuiteScript 1.0 application, but append v2 to the end. For example: MyCustomSSPv2

    • Specify a version of 2.x.

    • Create a new application folder and provide the same HTML Hosting Root and Application Publisher that you used in Create a custom SSP application for SuiteScript 1.0. Also use the same Application Name, but add the number 2 to the end. For example: ProDevSite2

    • Be sure the URL root is the same as the root used for the SuiteScript 1.0 application, but append _ss2 to the end. For example, if the URL root for your SuiteScript 1.0 application is ProDev, the root for your SuiteScript 2.0 application should be ProDev_ss2.

Creating an SSP application with a version of 2.x results in a directory structure in the NetSuite File Cabinet with the following path: <HTML Hosting Root>: /SSP Applications/<Application Publisher>/<Application Name>. For example, if you specify the following information for the application folder when creating an SSP application with a version of 2.x:

  • HTML Hosting Root: Live Hosting Files

  • Application Publisher: ProDev

  • Application Name: ProDevSite2

The resulting directory structure in the NetSuite File Cabinet is: Web Site Hosting Files/Live Hosting Files/SSP Applications/ProDev/ProDevSite2

Step 2: Deploy Local Files

After creating your SSP application, use the core SCA developer tools to deploy local files to your NetSuite file cabinet. You need the following information to complete these steps:

To deploy local files using Gulp:

  1. Return to your command line or terminal window.

  2. From the SCA source directory (the directory that contains the package.json file), enter the following command.

    gulp deploy

    If this is the first time you are running gulp deploy in this directory, this command creates one or more deploy distribution directories depending on your implementation.

    Note:

    If you have already created an authentication ID in a previous fetch or deploy operation, the developer tools do not prompt you for an ID and will continue to use the existing ID for each subsequent fetch or deploy. If you want to choose a different authentication ID or create a new one, use the --to parameter when you deploy. For more information, see Token Based Authentication.

  3. In NetSuite, select the account you want to deploy to and the role you want to use for authentication. Click the Allow button to generate the authentication token and secret.

    Note:

    You must specify a role that provides the permissions needed to deploy to NetSuite. By default, the Administrator and SCDeployer roles provide these permissions. To learn more, including how to create a custom role that provides the required permissions, see Developer Tool Roles and Permissions.

  4. When prompted, provide the following details from your SSP application record:

    Tip:

    These values correspond to the path to your SSP application in the NetSuite File Cabinet: <HTML Hosting Root>: /SSP Applications/<Application Publisher>/<Application Name>

    • Hosting Files folder: This is the HTML Hosting Root of your SSP application.

    • Application Publisher: This is the Publisher of your SSP application.

    • SSP Application: This is the Name of your SSP application.

After all of the connection settings are entered, files from your local system are pushed to the NetSuite file cabinet. This process may take a few minutes. Wait for the process to complete before proceeding.

Note:

The first time you run the gulp deploy command, the connection settings are stored in the .nsdeploy file in the root directory of your source SCA files. During subsequent deployments, login credentials are not required. If you need to change the SSP application you are deploying to, you can manually edit the .nsdeploy file with the updated information. For details, see Changing SCA Developer Tools Connection Information. Also, during the initial deployment to NetSuite, the Gulp.js commands create a manifest file within the NetSuite file cabinet. This file contains the list of files uploaded and a hash of its content. On subsequent deployments, the Gulp.js commands use the manifest file to determine new or changed files. Only those files are updated during deployment to the NetSuite file cabinet.

Step 3: Configure SSP Applications

After completing the preceding steps, all necessary files should be available to the SSP applications within NetSuite. In this final step, complete some configuration tasks to enable your website to use the customized SCA application you uploaded.

  1. Go to Commerce > Hosting > SSP Applications and then click Edit next to the SSP application created in Create a custom SSP application for SuiteScript 1.0.

  2. In the Libraries subtab under Scripts, click Add.

  3. Find and add the ssp_libraries.js and ssp_libraries_ext.js files to the libraries for the SSP application.

    These files were pushed to the NetSuite file cabinet with the gulp deploy command. When you add these files to the SSP library, they are stored in the root directory of your SSP application at <HTML Hosting Root>:/SSP Applications/<Application Publisher>/<Application Name>.

    Note:

    Depending on the number of files in your file cabinet you may need to scroll through a long list. However, do not rely on the search. The files available may not be refreshed, resulting in a no matches found error even though the files do exist.

  4. In the Touch Points tab, define the touch points for this SSP application.

    Touch points are the entry points for your web store. For each touch point defined here, your website links to an SSP application page.

    1. In the Name field, select the desired touch point.

    2. In the Entry Page field, select the .ssp file that should be the starting point for this touch point.

    3. Click Add.

    For example, if you want your web store to use the Shopping application when a user goes to your Home page, select the View Homepage Touch Point and set the Entry page as the shopping.ssp file.

  5. Click Save on the record.

    You are returned to the list of available SSP applications.

  6. Link the SSP application created in Create a custom SSP application for SuiteScript 1.0 to your domain.

    1. Click View next to your SSPv1 application.

    2. Click Link to Domain.

    3. In the Domain dropdown field, select the domain you want to link this application to.

    4. Click Save.

  7. If you are implementing SCA 2019.1 or later and are using a single domain for shopping and checkout, follow these steps to deploy the SSP application created in Create a custom SSP application for SuiteScript 2.0:

    1. Click View next to your SSPv2 application.

    2. Click Deploy to Domain.

    3. In the Domain dropdown field, select the domain for your site.

    4. Click Save.

  8. If you are implementing SCA 2019.1 or later and are not using a single domain for shopping and checkout, follow these steps to deploy the SSP application created in Create a custom SSP application for SuiteScript 2.0:

    1. Click View next to your SSPv2 application.

    2. Click Deploy to Site.

    3. In the Deploy to All Shopping Domains on Site dropdown field, select the site associated with your shopping domains.

    4. In the Deploy to Checkout Domain on Site field, select the site associated with your checkout domain.

      Note:

      If you want to deploy the SSP application to the checkout domain of one site and the shopping domains of another, you can select different site names from the lists. Alternatively, if you want to deploy to just the checkout domain or just shopping domains, select - Do Not Deploy - for the domain type to which you do not want to deploy.

    5. Click Save.

After completing the steps in this procedure, you can view the site by navigating to the domain defined for that site.

Related Topics

General Notices