Deploy an Extension to NetSuite

This topic applies to

Applies to

SuiteCommerce Web Stores

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.

Note

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

    Important

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

    Note

    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 fill in these prompts again, use the gulp extension:deploy --to command.


    • NetSuite Email – Enter the email address associated with your NetSuite account.

    • Password – Enter your account password.

    • NetSuite Account and Role – Select the NetSuite account where SuiteCommerce application is installed. You must specify the correct role with required permissions for connecting to NetSuite.

      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.


    • Vendor – Enter your partner or business vendor name.

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

    • Version – Add a version number for your extension.

      Important

      To take advantage of extension update requirements, use semantic versioning (SemVer) notation. For more information, see https://semver.org/.


    • Description – 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.

  5. In NetSuite, go to Setup > SuiteCommerce Advanced > Extensions Management.

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

    Important

    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.