Pages

Sunday, August 5, 2018

Einstein Analytics: Dashboard API Name

As usual Salesforce stuff, we have label and name (read API name) for an object, field, dashboard, and etc. But, is there such things in the Einstein Analytics? Yes, there is, although you do not always need to know the API name, however, in some scenario, you need to know.

When you edit a dashboard, you only change the title, same goes to the lens. Let looks at dashboard JSON, the second line of the dashboard will say "label": "dashboard name", we can easily change the label, but how to change the API name?

Scenario: I create a dashboard called "backup map", by default the API name would be backup_map, this is just by replacing space with _.
After a while, I change the label from "backup map" to "my map", will the API name change from backup_map to my_map? The answer is No.


1. Use Link Widget
Create a new dashboard, add link widget and select link to Saved dashboard, and select the dashboard you would like to check.



Now, open dashboard JSON, and looks for link_1 (for this sample) widget, here we go:
       "widgets": {
            "link_1": {
                "type": "link",
                "parameters": {
                    "destinationType": "dashboard",
                    "includeState": false,
                    "text": "Button title",
                    "textColor": "#44A2F5",
                    "textAlignment": "center",
                    "fontSize": 12,
                    "destinationLink": {
                        "name": "backup_map"
                    }
                }
            }
        },


2. Workbench
Workbench is a powerful tool, love by all Salesforce developer and admin, also for us as Einstein Analytics power user.

Once you login to Workbench, navigate to utilities - REST Explorer, change the URI to /services/data/v43.0/wave/dashboards then click Execute button, then click Expand All link. Here, you will find everything you need to know about your dashboards.



You can evaluate other stuff in Einstein Analytics by changing the URI to /services/data/v43.0/wave/