To create a custom JSON configuration file, you’ll need to utilize a custom module and construct the new configuration file with JSON Schema V4.
Each configuration file contains a root object that defines the configuration information for a module. At the root level, all configuration files must define the type, group, and properties objects. This schema allows for the addition of the subtab object as an option.
{
“type”: “object”,
“group”: {
//…
},
“properties”: {
//…
}
}
Following example shows how to create a tab, subtab and fields in the suitecommerce configuration record.
{
“type”: “object”,
“group”: {
“id”: “customExt”,
“title”: “Extension”,
“description”: “This is the extension tab”
},
“subtab”: {
“id”: “customfooter”,
“title”: “Footer”,
“description”: “Footer update”,
“group”: “customExt”
},
“properties”: {
“customfooter.phone”: {
“group”: “customExt”,
“subtab”: “customfooter”,
“type”: “string”,
“title”: “Enter phone number”,
“description”: “Enter phone number to display in the footer”,
“default”: “”
},
“customfooter.email”: {
“group”: “customExt”,
“subtab”: “customfooter”,
“type”: “string”,
“title”: “Enter email”,
“description”: “Enter email to display in the footer”,
“default”: “”
},
“customfooter.address”: {
“group”: “customExt”,
“subtab”: “customfooter”,
“type”: “string”,
“title”: “Enter address”,
“description”: “Enter address to display in the footer”,
“default”: “”
},
“customfooter.quickLinks”: {
“group”: “customExt”,
“subtab”: “customfooter”,
“type”: “array”,
“title”: “Quick Links”,
“description”: “Enter the quick links to display in the footer”,
“items”: {
“type”: “object”,
“properties”: {
“text”: {
“type”: “string”,
“title”: “Link Text”
},
“url”: {
“type”: “string”,
“title”: “Link URL”
}
}
}
},
“customfooter.socialMediaLinks”: {
“group”: “customExt”,
“subtab”: “customfooter”,
“type”: “array”,
“title”: “Social Media Links”,
“description”: “Enter the social media links to display in the footer”,
“items”: {
“type”: “object”,
“properties”: {
“icon”: {
“type”: “string”,
“title”: “Icon Class”
},
“url”: {
“type”: “string”,
“title”: “Link URL”
}
}
}
}
}
}
After deploying the custom extension, configurationManifest.json file located in the ‘extensions’ directory in the file cabinet will be updated automatically. Any errors in the code or mismatch in JSON v4 schema of JSON configuration file will prevent the automatic update of configurationManifest.json file.
The above provided JSON configuration file will create ‘Extension’ tab, ‘Footer’ subtab, ‘Phone Number’ field, ‘Email’ field, ‘Address’ field, ‘Quick Links’ sublist and ‘Social Media Links’ sublist in the Suitecommerce configuration record.
