Deploy SCA Customizations to NetSuite

After testing and verifying your SuiteCommerce Advanced (SCA) customizations locally, you can deploy your local source files to the SCA Development SSP. When your local source files have been deployed to the SCA Development SSP, you can then deploy that SSP to your website to update the site with your customizations.

To deploy your customizations to NetSuite, you must complete the following tasks:

Deploy Local Source Files to an SSP Application in NetSuite

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

Use Gulp.js commands to deploy the files that were generated in the local distribution folder when you tested locally.

Note:

When working with static assets, such as static images, videos PDFs, etc. (not related to the source code), we recommend uploading these files to the NetSuite File Cabinet, stored in a dedicated folder. In general, deployed folders cannot contain more than 100 direct child files.

To deploy local source files to a NetSuite SSP application:

  1. Go to your command line or terminal window.

  2. Access the SCA source directory that contains the package.json file.

    • If implementing the 2020.1 release or later, this directory is the SC_xxx directory within your root source directory. For example: SC_20.1

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

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

  3. Enter the following command:

    gulp deploy

    Note:

    For release 2021.2.1 and later accounts that have account-specific domains, specify your account number with the gulp command to enable access to the NetSuite account. For more information about using gulp deploy --account, see Gulp Command Reference for SCA Developer Tools.

    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 the following information.

    Authentication ID

    Enter an ID to represent your NetSuite account and role.

    If you have already created an authentication ID in a previous deploy operation, the SCA developer tools do not prompt you for an ID and will continue to use the existing ID for each subsequent deploy.

    To deploy to a NetSuite account that is different from the account used to create the existing authentication ID, use the --to parameter. When you use the use the --to parameter, you can choose a different authentication ID or create a new one. For more information, see Token Based Authentication.

    Account and Role

    If you are creating a new authentication ID, you need to select the NetSuite account and role to use with that new authentication ID. If using an existing ID, you are not prompted for this information.

    In NetSuite, select the account you want to deploy to and the role you want to use for authentication. Click Allow 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.

    Choose your Hosting Files folder

    Select the Live Hosting Files option.

    Choose your Application Publisher

    Select the NetSuite Inc. - SCA <version> option.

    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 SC_xxx directory within your root source directory (for example: SC_20.1/). 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.

For more information about the structure of the SCA source directory, see SCA Source Directory.

Deploy the SSP Application to Your Site

After deploying your local customization source files to the SCA Development SSP as described in Deploy Local Source Files to an SSP Application in NetSuite, you can then deploy that SSP to your website to update the site with your customizations.

To deploy the Development SSP application to your site:

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

  2. Click Link to Site.

  3. In the Site field, select the site you want to deploy to.

    Note:

    Only sites that are already set up are available for selection. If you have not set up a web site record go to Commerce > Websites > New. For detailed instructions, see Getting Started.

  4. 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.

Related Topics

Develop Your SCA Customization
Best Practices for Customizing SCA
Test SCA Customizations on a Local Server

General Notices