Fetch Active Theme and Extension Files

This topic applies to

Applies to

SuiteCommerce | SuiteCommerce Advanced | SuiteCommerce InStore


If creating an extension for SuiteCommerce or SCA, you must first download files for the currently active theme before you can deploy an extension or test it on a local server. You do this by running the following command:

gulp extension:fetch


SCIS extension developers can disregard this section.

This command:

  • Downloads HTML and Sass files for the currently active theme. Do not modify these files. The Sass and HTML files downloaded using this command are for reference only.

  • Downloads files for any custom extensions that are currently activated.

The developer tools require theme files (HTML and Sass) to compile a local distribution for testing an extension on a local server. The developer tools also use these files to run a test compilation before deploying. When you fetch the active theme, you provide the necessary files in your local extension workspace. Later, when you test locally or deploy your extension, the developer tools can compile the code without error.

If you want to skip this step, you can run the gulp extension:deploy --skip-compilation command to deploy your extension files without running the compilation. For more Gulp.js commands used with extensions, see Extension Developer Gulp Commands.

The gulp extension:fetch command also fetches files for any custom extensions. When you fetch files for an active extension, you download these development files to your local extension workspace. You can now customize these files further development and testing.


When you fetch custom extension files, the developer tools download extension files that are activated for the specified domain. This action overwrites any extension files currently stored in your local workspace. This can result in loss of development files if you are not careful. To ensure that you do not lose any work under development, do not run the gulp extension:fetch command until you have deployed your extension work to NetSuite.


This command does not download files for published extensions. A published extension is an extension installed into your account as part of a published SuiteApp. You cannot edit published content due to copyright restrictions.

Fetch the active files:

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

  2. Run the following command:

    gulp extension:fetch

  3. When prompted, enter the following information:

    • 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 – Select your website with the domain you want to access.

    • Choose Your Domain – Select your domain with the active theme or extensions you want to download.

    • Extensions to Fetch – If you have any active extensions for the domain selected, you can download the working files of any selected extensions. This is optional. Content downloads to your extension’s Extras folder.

The gulp extension:fetch command creates a theme subdirectory in your Workspace/Extras directory. These files are for use by the developer tools only. Do not add, edit, delete, or move any files in this location.

You are now ready to perform either of the following tasks: