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 for the dashboard? 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 can we get the dashboard 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.

Here 2 options can be used to get dashboard API name:

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. From the screenshot below, the API name is "backup_map", while the label has been changed to "my map".



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





4 comments:

  1. Is there any way to CHANGE the dashboard API Name? In your example, if I wanted the API name to be my_map, is there a way to change it to that?

    ReplyDelete
  2. Is there any way to see the xmd metadata type file of dashboard,where the formating of number and etc is saved.
    example in dashboard step we specify number format to measure

    ReplyDelete

Page-level ad