Implementing enterprise filtering in a drop-down menu

The enterprise drop-down menu is part of the Order Hub common-components library which is not customizable. However, customization by configuration is possible for the enterprise drop-down menu by adding input parameters to the getOrganizationList API. You can customize the enterprise drop-down options and implement enterprise filtering. For example, you might want to filter the drop-down menu to include only active enterprises.

About this task

To customize the enterprise drop-down menu, you use a fetch command that uses an API to fetch the options for the drop-down menu using a specified API. In this case, you use the getOrganizationList API, which returns a list of enterprise organizations.

Procedure

  1. Access the <app>-root-config/src/assets directory.
  2. Create a new /custom/getPage-templates.json file.
  3. Add code for the new inputs in the getOrganizationList API.
    For example, to filter the drop-down menu to only include organizations that are legal entities, add the IsLegalEntity flag, add the following code.
    {
        "getOrganizationList": {
            "input": {
                "Organization": {
                    "IsLegalEntity": "Y"
                }
            }
        }
    }
    Note: To find the parameters and flags that you may want to use, you need to look in the Javadocs for this API. For more information, see Accessing Development-related documentation