CRM Analytics Assets SDK Aura Component

Discover CRM Analytics dashboards, lenses and datasets, get their details, and dig into dataset fields. Discover dashboard saved views and explore dashboard state. Create and execute queries directly on datasets

Call the SDK 

To call the SDK, declare the wave:sdk component in your component or app.

<wave:sdk aura:id="sdk"/>

Use sdk.invokeMethod to specify the method and any parameters.

sdk.invokeMethod(context, methodName, methodParameters, callback)

For example, here’s a call that uses listDashboards as methodName.

1var context = {};
2   var methodName = 'listDashboards';
3   var methodParameters = {
4     'pageSize' : 200,
5     'sort' : 'Name'
6   };
7
8   sdk.invokeMethod(context, methodName, methodParameters,
9   $A.getCallback(function (err, data) {
10   if (err !== null) {
11     //DO THIS IF THE METHOD FAILS
12     console.error("SDK error", err);
13   } else {
14     //DO THIS IF THE METHOD SUCCEEDS
15     component.set('v.dashboards', data.dashboards);
16   }
17}))

See the wave:sdk Component Reference for a full working example.

Each method has its own set of parameters (methodParameters).

Methods and Parameters 

listDashboards 

Retrieves a list of all dashboards. Can be filtered by specifying parameters

Parameter NameDescriptionRequiredType
folderIdFilters the results to include only the contents of a specific folder.FALSEString, base platform object ID format
pageA generated token that indicates the view of the dashboards to be returnedFALSEString
pageSizeNumber of items to be returned in a single page. Default is 25 and maximum is 200.FALSEInteger
qSearch terms. Individual terms are separated by spaces. Wild cards aren’t supported.FALSEString
sortSort order of the results. Enum values are LastModified, MRU, and Name. Default value is MRU.FALSEString
scopeType of scope to be applied to the returned items (CreatedByMe or SharedWithMe)FALSEString
typeAsset typeFALSEString
templateApiNameFilter collection by templateApiName.FALSEString
mobileOnlyFor mobile dashboards only.FALSEString

listLenses 

Retrieves a list of all lenses. Can be filtered by specifying parameters

Parameter NameDescriptionRequiredType
folderIdFilters the results to include only the contents of a specific folder.FALSEString, base platform object ID format
pageA generated token that indicates the view of the lenses to be returnedFALSEString
pageSizeNumber of items to be returned in a single page. Default is 25 and maximum is 200.FALSEInteger
qSearch terms. Individual terms are separated by spaces. Wild cards aren’t supported.FALSEString
sortSort order of the results. Enum values are LastModified, MRU, and Name. Default value is MRU.FALSEString
scopeType of scope to be applied to the returned items (CreatedByMe or SharedWithMe)FALSEString

listDatasets 

Retrieves a list of all datasets. Can be filtered by specifying parameters

Parameter NameDescriptionRequiredType
folderIdFilters the results to include only the contents of a specific folder.FALSEString, base platform object ID format
hasCurrentOnlyFilters the list of datasets to include only those datasets that have a current version. The default is false.FALSEString, base platform object ID format
pageA generated token that indicates the view of the dashboards to be returnedFALSEString
pageSizeNumber of items to be returned in a single page. Default is 25 and maximum is 200.FALSEInteger
qSearch terms. Individual terms are separated by spaces. Wild cards aren’t supported.FALSEString
sortSort order of the results. Enum values are LastModified, MRU, and Name. Default value is MRU.FALSEString
scopeType of scope to be applied to the returned items (CreatedByMe or SharedWithMe)FALSEString

describeDashboard 

Retrieves the details of a single dashboard.

Parameter NameDescriptionRequiredType
dashboardId15 or 18-digit id of the dashboard.TRUEString, base platform object ID format

describeLens 

Retrieves the details of a single lens.

Parameter NameDescriptionRequiredType
lensId15 or 18-digit id of the lens.TRUEString, base platform object ID format

describeDataset 

Retrieves the details of a single dataset.

Parameter NameDescriptionRequiredType
datasetId15 or 18-digit id of the dataset.TRUEString, base platform object ID format

getDatasetFields 

Retrieves a list of all the fields for a single dataset.

Parameter NameDescriptionRequiredType
datasetId15 or 18-digit id of the dataset.TRUEString, base platform object ID format
versionId15 or 18-digit version id of the dataset.TRUEString, base platform object ID format

executeQuery 

Executes a CRM Analytics SAQL query.

Parameter NameDescriptionRequiredType
queryThe SAQL query to execute, in JSON format.TRUEString, base platform object ID format

listDashboardSavedViews 

Retrieves a list of all saved views for a dashboard.

Parameter NameDescriptionRequiredType
dashboardIdOrApiNameThe 15 or 18-digit id or the fully qualified name of the dashboard.TRUEString, base platform object ID format

getDashboardSavedView 

Retrieves the detail of one dashboard saved view.

Parameter NameDescriptionRequiredType
dashboardIdOrApiNameThe 15 or 18-digit id or the fully qualified name of the dashboard.TRUEString, base platform object ID format
viewIdThe 15 or 18-digit id of the saved view.TRUEString, base platform object ID format

getDashboardInitialSavedView 

Retrieves the initial view information for a dashboard saved view.

Parameter NameDescriptionRequiredType
dashboardIdOrApiNameThe 15 or 18-digit id or the fully qualified name of the dashboard.TRUEString, base platform object ID format
viewIdThe 15 or 18-digit id of the initial saved view.TRUEString, base platform object ID format