Deploying Custom Themes in NetSuite for Websites

Deploying custom themes to NetSuite allows activation for website domains, enhancing your site's appearance and performance.

·3 min read·View Oracle Docs

After testing and verifying your theme locally, deploying it to NetSuite enables activation for a specific website domain. This process is essential for customizing and enhancing your site's user experience. Below is a detailed guide on how to deploy a custom theme effectively.

How to Deploy Your Theme to NetSuite

  1. Open a Command Line Interface: In your local developer environment, access your top-level development directory.

  2. Run the Deploy Command: Execute the following command:

    bash
    gulp theme:deploy

    Note: For accounts that have account-specific domains starting from 2021.2.1, you need to specify your account number with the gulp command to successfully connect to your NetSuite account.

    Warning: Be cautious of potential data loss; the gulp theme:deploy command updates the manifest.json file and may overwrite manual changes. To preserve such changes, use:

    bash
    gulp theme:deploy --preserve-manifest
  3. Enter Required Information: When prompted, provide the following entries, ensuring that all created entries consist only of alphanumeric characters without spaces:

    • Authentication ID: Represents your NetSuite account and role.
    • Account and Role: Choose the NetSuite account and role for your authentication ID. Ensure you select a role that grants necessary permissions to deploy to NetSuite, typically Administrator or SCDeployer.
    • Website: Select the associated website for your domain.
    • Vendor: The name of the vendor building the theme.
    • Name: A name for your custom theme without special characters or spaces.
    • Fantasy Name: How you want the theme to appear in the NetSuite UI; this can include spaces and special characters.
    • Version: Assign a version using the format dd.dd.dd for future updates.
    • Description: A brief description for your theme, visible when selecting themes in NetSuite.
    • Supported Products: Select applicable products (e.g., SuiteCommerce Online, SCIS).
    • Target Version: Declare the target versions that your theme supports.

What Happens During Deployment?

When you execute the deploy command, the theme developer tools perform several tasks:

  • Copy Custom Files: All custom theme files are copied into a DeployDistribution folder.
  • Test and Validate: The developer tools test and validate your customizations before deployment.
  • Update Manifest: Any necessary overrides are included in the manifest.json file.
  • Upload Files: The source files are bundled and uploaded to the NetSuite File Cabinet with their directory structure maintained.

Note: The command uploads in chunks, typically 80 files at a time, which can be configured if necessary.

Once deployed, NetSuite creates an Extension record for the custom theme, allowing it to be activated. However, be mindful of the following with extension overrides:

  • Overrides deploy with the theme; if the theme is activated without activating related extensions, the overrides won’t apply.
  • Newly activated extensions post-deployment require updating the existing theme for the customizations to take effect.

Example Deployment Scenario

Imagine you customized the active theme (SuiteCommerce Base Theme) and the active extension (PublishedExtension1). After thorough local testing, you run the following command:

bash
gulp theme:deploy

The developer tools will guide you through setting up your theme, allowing you to rename your theme folder and update relevant configurations, preparing for deployment.

Next Steps

After deploying your theme files, follow the outlined steps in the documentation to activate the theme on your desired website domain. Activation is crucial for deploying your customizations effectively on the live site.

Frequently Asked Questions (4)

What prerequisites are required for deploying a theme in SuiteCommerce?
Before deploying a theme, ensure you have local testing completed and access to a command line or terminal in the top-level development directory of your theme. Additionally, you need the Authentication ID, and typically the Administrator or SCDeployer role permissions are required.
How do I include account-specific domains for theme deployment in SuiteCommerce?
For accounts with account-specific domains (2021.2.1 and later), you should include your account number using the `--account` argument when running the `gulp theme:deploy` command to authenticate your access.
What actions occur during the 'gulp theme:deploy' command execution?
When you execute the `gulp theme:deploy` command, custom theme files are validated and copied to a local `DeployDistribution` folder, and your `manifest.json` file is updated. The source files are then uploaded into your NetSuite File Cabinet in a bundled format, and an Extension record for your custom theme is created.
How should overrides from extensions be managed during theme deployment?
Any overrides in your theme from extensions must be activated to take effect. Without activation, these overrides won't apply if new extensions are added later, so careful management of extensions is necessary.
Source: What Happens When You Deploy a Theme? Oracle NetSuite Help Center. This article was generated from official Oracle documentation and enriched with additional context and best practices.

Was this article helpful?

More in Commerce

View all Commerce articles →