Edit folder.json

The folder.json file describes the featuredAssets for the application.

This file is required for embedded apps because it specifies the name and label for the templated app along with setting sharing rules for the app. The embedded app can’t be shared with other users and groups using CRM Analytics Studio.

Note

Template developers can use it to specify the order of the dashboards in the application instead of accepting the default behavior of alphabetizing by dashboard label.

Example 

1{
2    "name": "My Templated App",
3    "featuredAssets": {
4        "default": {
5            "assets": [
6                {"id": "${App.Dashboards['ZDashboard'].Id}"},
7                {"id": "${App.Dashboards['BDashboard'].Id}"},
8                {"id": "${App.Dashboards['ADashboard'].Id}"}
9            ]
10        }
11    },
12    "shares": [
13        {
14            "shareType": "Organization",
15            "accessType": "View"
16        }
17    ]
18}

The previous example tells the application to display the “ZDashboard” first, as the most prominent dashboard, rather than the default of A, B, then Z. If a dashboard has a conditional attribute in template-info.json that resolves so that the dashboard isn’t added at app creation time, a rule must be added to the template-to-app-rules.json to remove the dashboard from the folder.json file. This rule removes that dashboard entry from the featuredAssets list at runtime and prevents app creation from failing with a “Dashboard not found” error. The rule looks like this:

1{
2    "name": "RemoveDashboardZFromFolderJson",
3    "condition": "${!Variables.HasDashboardZ}",
4    "appliesTo": [
5        {
6            "type": "folder",
7            "name": "*"
8        }
9    ],
10    "actions": [
11        {
12            "action": "delete",
13            "description": "Remove conditional dashboard",
14            "path": "$.featuredAssets.default.assets..[?(@.id=~ /^.DashboardZ.$/i)]"
15        }
16    ]
17}

See Also