Extension Manifest JSON for NetSuite Extensions

Learn to manage extension manifest.json files, handling assets, scripts, and metadata.

·2 min read·View Oracle Docs

The extension manifest.json file is vital for compiling and deploying NetSuite extensions. It stores paths to resources like JavaScript, HTML templates, and assets.

What is the Extension Manifest JSON?

The manifest.json file in your extension's Workspace directory holds essential data required to compile and activate your extension. This file is auto-generated when using the gulp extension:create command and includes JavaScript, SuiteScript, HTML templates, Sass, and asset paths.

Manual Edits: Important Considerations

While automatically generated, the manifest.json may require manual updates, especially if you introduce new Sass entry points or modify CCT labels. Caution: Running gulp extension:local or gulp extension:deploy can overwrite manual changes unless you use the --preserve-manifest flag to protect your manual edits.

Extension Metadata

The first entries in the manifest provide metadata about the extension, such as:

  • name: Unique identifier for the extension (required).
  • fantasyName: Label for the extension.
  • vendor: Vendor name (required).
  • type: Indicates this is an extension (required).
  • target: Specifies SuiteCommerce or SCA applications supported.
  • version: Version of the extension (required).
  • description: Describes the extension.

Managing Assets

The assets section includes paths to images, fonts, and services. These are crucial for the deployment, as they create service files on NetSuite servers.

Working with Templates and Scripts

The templates and javascript objects list HTML and JavaScript files used by your extension. They are organized by application type, ensuring each file serves the correct context for shopping, myaccount, and checkout applications.

Sass File Declaration

The sass object specifies the paths for Sass files and entry points. If new files are introduced, they must be added to the manifest manually, respecting the logical order of inclusions to match dependencies.

SuiteScript Libraries

The ssp-libraries section provides paths to all SuiteScript files, ensuring they deploy correctly. These paths are critical for backend functionality.

SuiteScript 2 Services

Under suitescript2, paths to SuiteScript 2.0 services, either .js or .ss, are listed, making it clear which scripts are included in the deployment.

Handling CCT and Page Types

For Custom Content Types (CCT) and new CMS Page Types, the manifest outlines metadata for registration and configuration, enabling these elements to integrate seamlessly with NetSuite's content management tools.

Key Takeaways

  • Ensure manual edits are preserved: Use appropriate flags to protect manual changes when deploying.
  • Maintain metadata accuracy: Correct metadata entries ensure smooth operation and updates.
  • Order dependencies logically: Reflect correct Sass and JS file orders to avoid compilation issues.
  • Ensure correct paths: List all paths in the manifest accurately to avoid deployment errors.

Frequently Asked Questions (4)

What is the purpose of the 'ssp-libraries' object in NetSuite?
The 'ssp-libraries' object is used to declare paths to all SuiteScript files that should be loaded when deploying your application.
Do I need to specify both entry points and additional files in 'ssp-libraries'?
Yes, you need to specify an 'entry_point' and provide a list of additional 'files' that your application will use.
Can I include scripts from multiple modules in the 'ssp-libraries' files array?
Yes, you can include scripts from multiple modules in the 'ssp-libraries' 'files' array.
If I update a script file path in the 'ssp-libraries', do I need to redeploy?
Yes, updating a script file path in the 'ssp-libraries' would require you to redeploy the configuration for changes to take effect.
Source: Ssp-libraries 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 General

View all General articles →