Configuration Modification Schema

This section describes the configuration modification schema. Follow these steps to create a JSON modification file.

Step 1: Add the Type Object

The type specifies the type of object defined by the configuration file. The value of this object must always be set to object. This is required to be compliant with the JSON schema specification.

          {
    "type": "object",
} 

        
Step 2: Add the Modifications Array

When you deploy to NetSuite, the developer tools use the modifications listed in this array to create the configurationManifest.json. Each modifications object requires the target and action components. Some actions require an addition value component.

This declares the modifications to include when you deploy to NetSuite.

          {
    "type": "object",
    "modifications": [

         ]
} 

        
Step 3: Add the Target Attribute

The target attribute contains a string representing a JSONPath query. The elements returned are the targets to be affected by the action. In this example, when you deploy your customizations, the JSONPath query searches for the enum property of the target addToCartBehavior property.

          {
    "type": "object",
    "modifications": [
               {
            "target": "$.properties.addToCartBehavior.enum",
               }
         ]
} 

        
Note:

For more information about how to build a target JSONPath query, see https://github.com/s3u/JSONPath.

Step 4: Add the Action Attribute

The action attribute indicates the operation to apply over each element of the target returned by the JSONPath query. Possible actions are:

This example includes the add action.

          {
    "type": "object",
    "modifications": [
               {
            "target": "$.properties.addToCartBehavior.enum",
            "action": "add",
               }
         ]
} 

        
Step 5: Add the Value Attribute

The value attribute specifies the value to be added or replaced. Only the add and replace actions require this attribute.

When using the add action, the value attribute behaves differently depending on the target type:

The following example adds the newOption configuration option to the addToCartBehavior list in the user interface.

          {
    "type": "object",
    "modifications": [
               {
            "target": "$.properties.addToCartBehavior.enum",
            "action": "add",
            "value": "newOption"
               }
         ]
} 

        

Related Topics

Use Case Examples

General Notices