Deploy to NetSuite

This topic applies to

Applies to

SuiteCommerce Advanced

 

After installing and configuring Node.js and Gulp.js in your local developer environment as described in the section Developer Environment, you must configure your environment to connect with and deploy to a NetSuite SSP Application.

To configure deployment to NetSuite, you must perform the following:

Deploy Local Source Files to an SSP Application in NetSuite

SuiteCommerce Advanced enables you to deploy directly to an SSP application in NetSuite. When the SuiteCommerce Advanced bundle is installed in your NetSuite account, the following SuiteCommerce Advanced distributions are created in Web Site Hosting Files > Live Hosting Files > SSP Applications > NetSuite Inc. - SCA <version>:

  • Source – This folder includes all of the original SSP applications and supporting files and the sources.zip file to be downloaded and used for local development. All files in this distribution are locked. Do not deploy customizations to this folder.

  • Development – This folder maintains your customizations after you deploy. When the developer tools prompt you for a location to deploy your code, choose this folder from the list of options.

Use Gulp.js commands to deploy the files generated earlier in the local distribution folder.

To deploy local source files to a NetSuite SSP application:

  1. Go to your command line or terminal window.

  2. Access the SuiteCommerce Advanced source directory containing the package.json file.

    • If implementing 2019.2 or later, this directory is the *_Live directory within your root source directory. For example: SC_19.2_Live/Advanced.

    • If implementing 2019.1 or earlier, this directory is the top-level root directory.

  3. Enter the following command:

    gulp deploy

    Note

    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.


  4. When prompted, enter your NetSuite email and password.

    Note

    The developer tools do not support emails or passwords containing special characters such as + and %.


  5. When prompted, select the NetSuite account where SuiteCommerce Advanced is installed.

    Important

    You must log in using the SCDeployer role to access your NetSuite account. Failure to use this role may result in an error. See Developer Tools Roles and Permissions for instructions on setting up this role.


  6. When prompted to choose your Hosting Files folder, select the Live Hosting Files option.

  7. When prompted to choose your Application Publisher, select the NetSuite Inc. - SCA <version> option.

  8. When prompted to choose your SSP Application, select the Development option.

After entering your connection settings, the contents of the deploy distribution folders on your local system are uploaded 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 *_Live directory within your root source directory (for example: SC_19.2_Live/). During subsequent deployments only the login credentials are 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 Your 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.


For more information on the structure of the SCA source directory, see The SuiteCommerce Advanced Source Directory.

Deploy the SSP Application to Your Site

After installing the SuiteCommerce Advanced SuiteApp, the Development SSP application is automatically configured with all of the required scripts and appropriate touch points. You must deploy the SSP application to the web site configured within NetSuite.

To deploy the Development SSP application to your site:

  1. Go to Setup > SuiteCommerce Advanced > SSP Applications and then click View next to the SuiteCommerce Advanced - Dev <version> application.

  2. In the Site field, select the site you want to deploy this application to.

    Note

    Only sites already set up are available for selection. If you have not set up a web site record go to Setup > SuiteCommerce Advanced > Web Site Set Up > New. For detailed instructions, see Getting Started.


  3. Click Save.

After the SSP application has been deployed to your site you can view the site by navigating to the domain defined for that site.