Modifying application-provided JSON files
You can modify the application-provided JSON files.
Sterling Store Engagement uses JSON files for defining:
- Sort and Filter options
- Segmentation types
- Portlet-person mapping
- Alerts and Global search options
- Translation bundles
These JSON files are grouped into
config
and i18n
folders
within the respective angular applications.- The
config
folder contains JSON configuration files for definition, Sort and Filter options, portlet-persona mappings, or Alerts and Global search entity definitions. These JSON files are read by angular components to control the screen behavior either by showing or hiding portlets, global search entities, or sort options. - The
i18n
folder contains locale-specific translation bundle JSON files.
The supported business use cases are as follows:
- Display custom segmentation types during adding or removing inventory.
- Add a custom portlet or override an application-provided portlet.
- Modify the UI literals for the application-provided screens.
To override the application-provided JSON files, complete the following steps:
- Override the application-provided config JSON files or Override the application-provided translation bundle JSON files.
- Verify your changes by starting the application.To start the application, run the following command:
yarn start-app
Override the application-provided config JSON files
To override the application-provided config JSON files, complete the following steps:
- Identify the application-provided config JSON files that you want to override in the
<store-temp>/packages/features/<featureName>/src/assets/<featureName>/config
directory. - Create the
<featureName>/config
folder structure in the<store-temp>/extensions/override-static-assets
directory. - Copy the required config JSON file to
<store-temp>/extensions/override-static-assets/<featureName>/config
directory. - Modify the JSON file as needed.
Override the application-provided translation bundle JSON files
To override the application-provided translation bundle JSON files, complete the following steps:
- Identify the application-provided translation JSON files that you want to override in the
<store-temp>/packages/features/<featureName>/src/assets/<featureName>/i18n
directory. - Create the
<featureName>/i18n
folder structure in the<store-temp>/extensions/override-static-assets
directory. - To override the translation JSON files, in the
<store-temp>/extensions/override-static-assets/<featureName>/i18n
folder path, replace<featureName>
with functional-components, core, and common-components as follows.- <store-temp>/packages/libs/functional-components/src/assets/functional-components
- <store-temp>/packages/libs/core/src/assets/core
- <store-temp>/packages/libs/common-components/src/assets/common-components
- Copy the required translation bundle JSON file to
<store-temp>/extensions/override-static-assets/<featureName>/i18n
directory. - Modify the JSON file as needed. For more information, see Modifying translation bundle entries for the application-defined components.