Modify JSON Configuration Files

This topic applies to

Applies to

Vinson and later

This section applies to Vinson implementations for SuiteCommerce Advanced (SCA) and later. For details on configuring SCA for pre-Vinson release and earlier, see Extend JavaScript Configuration Files.

Important

Never alter or delete the configurationManifest.json file. To make changes to property metadata, customize the individual JSON files only. When you deploy your site using the developer tools, these individual files and customizations concatenate into and update the configurationManifest.json file. For detailed information on how JSON configuration files affect the configurationManifest.json and the SuiteCommerce Configuration record, see Configure Properties.


This section explains how to use the Configuration Modification method to change existing configurable properties and associated metadata. When you deploy this modification to NetSuite, the SuiteCommerce Configuration record’s user interface will reflect any changes specified. Configuration Modification requires knowledge of JSONPath query schema, see https://github.com/s3u/JSONPath for more information.

Important

Making changes to core source files or changing any vital functionality of the application can make migrating to future releases difficult. Before making changes to SCA, see Best Practices for Customizing SuiteCommerce Advanced.


To modify the SuiteCommerce Configuration record’s user interface:

  1. Create the directory structure for a custom module.

    In this example, the name of the module being customized is the RecentlyViewedItems module. Following best practices, the example custom directory is titled RecentlyViewedItemsExtension@1.0.0.

  2. Create a Configuration subdirectory in your new module directory.

  3. Create a new JSON file in the Configuration subdirectory. In this example, the name of the JSON file being customized is SearchResultsPerPage.json. Following best practices, the custom JSON file is titled SearchResultsPerPageModification.json.

  4. Add modification code to your custom JSON file.

    See Configuration Modification Schema and Use Case Examples for specific information and examples on how to structure this file.

  5. Create and edit an ns.package.json file in the root directory of your custom module.

    Add the following code to this file:

    { "gulp": { "configuration": [ "Configuration/*.json" ] } }
  6. Update the distro.json file in the root directory of the SCA source directory.

    Add the name of your custom module to the list of modules defined in the modules object.

    ... "modules": { "extensions/RecentlyViewedItemsExtension": "1.0.0", "suitecommerce/Account": "2.2.0", ...
  7. Deploy your changes to NetSuite and access the SuiteCommerce Configuration record in NetSuite to view your changes. See Deploy to NetSuite for details

    Note

    You must deploy your customizations to NetSuite using the developer tools to apply any modifications to the SuiteCommerce Configuration record. You can confirm changes to the configurationManifest.json code on a local server, but modifications will not take effect until you deploy to NetSuite.