Deploy an Extension to NetSuite

This topic applies to

Applies to

SuiteCommerce | SuiteCommerce Advanced | SuiteCommerce InStore


The term deploy refers to what happens when you use Gulp.js to upload source files and any custom changes to a hosted site. To do this, you use the following command:

gulp extension:deploy

This command validates your code, copies them into a local DeployDistribution directory, and updates the manifest.json. The developer tools then upload these files to your NetSuite account, making them available for activation.


For more Gulp.js commands used with extensions, see Extension Developer Gulp Commands.

To deploy your extension to NetSuite:

  1. If you have not already done so, fetch the active theme.

    This is required before you can deploy an extension. See Fetch Active Theme and Extension Files for details.

  2. In your local developer environment, open a command line or terminal and access the top-level development directory.

  3. Run the following command:

    gulp extension:deploy


    Potential data loss. Besides compiling and deploying your extension to NetSuite, the gulp extension:deploy command updates the manifest.json file for the extension. This action overwrites any manual changes you made to this file. To preserve any manual changes to your manifest.json file, run the gulp extension:deploy --preserve-manifest command instead. See Extension Manifest for details on this file.

  4. When prompted, enter the following information.


    • Unless otherwise directed, create all entries using only alphanumeric characters without spaces.

    • These prompts appear the first time you deploy a new extension to NetSuite. Subsequent deployments of the same extension only prompt for your NetSuite password. To reset the login information and enter information again, use the gulp extension:deploy --to command to deploy your changes.

    Select Extension

    If you have more than one extension in your developer environment, choose the extension you are deploying.

    NetSuite Email

    Enter the email address associated with your NetSuite account.

    NetSuite Password

    Enter your account password.

    Choose Your Target Account and Role

    Select the NetSuite account where the Commerce web store application is installed. You must specify the correct role with required permissions for connecting to NetSuite.


    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.

    Choose Your Website

    Choose your site from the list.


    Enter your partner or business vendor name.


    Provide a name for your extension within your development environment.

    Fantasy Name

    Provide a name for your extension as you want it to appear in the NetSuite user interface. This can contain special characters and spaces.


    Add a version number for your extension.


    To take advantage of extension update requirements, assign a version number to your extensions. Version numbers should follow this format, where d is a single digit: dd.dd.dd.


    Provide some text to describe your extension. This string can contain special characters and spaces.

    Select Supported Products

    Select one of the following options:

    • SuiteCommerce Online – To create an extension for SuiteCommerce or SuiteCommerce Advanced.

    • SuiteCommerce InStore – To create an extension for SuiteCommerce InStore.

    An asterisk (*) identifies a selected option. Press the spacebar to select. Use arrow keys to scroll. Press the A key to select all. Press the I key to invert your selections.

    Target Version

    Using Commerce versioning schema, enter a string to declare the target versions to which this extension applies. The developer tools prompt you for a target version for each product specified earlier. Leaving these prompts blank results in compatibility with all versions of the associated Commerce products.

    See Declare Target Versions and SuiteScript 2.0 Bundle Installation Script Type for more information.

  5. Activate your new extension for the domain or domains of your choice. See Manage Themes and Extensions for instructions.


    Any changes to your extension source code do not apply to your site until you activate the extension for a specific domain using the Manage Extensions wizard in NetSuite. The deploy process includes a notation reminding you of the domain and theme name to set during this process.

What Happens When You Deploy an Extension?

The deployment process is specific to uploading custom extensions to a location in your NetSuite file cabinet. This process does not compile any files or associate any files with a site or domain. To do that, you must activate a theme and include your extensions as necessary.

During the deployment process:

  • The development tools copy all of your custom extension development files (modules and assets) into the DeployDistribution folder in your top-level development directory. If this directory does not exist, the development tools create it.

  • The extension development tools validate your code.

  • The extension development tools upload these files to your NetSuite file cabinet (maintaining the same organizational structure). These are simply your development files. Nothing is compiled or activated at this time.


    The gulp extension:deploy command uploads your extension development files in groups of files called chunks. A single chunk, by default, contains 80 files. If needed, you can change the number of files in each chunk. See Troubleshooting the Developer Tools for more information.