Newer Version Available

This content describes an older version of this product. View Latest

Prerequisites

Take care of these tasks before creating Analytics templates.
Licenses and Permission Sets

Make sure you and members of your team each have an Analytics platform license--either Einstein Analytics Growth or Einstein Analytics Plus.

Assign the following permission sets to yourself and members of your team:

  • For Einstein Analytics Growth licenses, Einstein Analytics Admin
  • For Einstein Analytics Plus licenses, Einstein Analytics Plus Admin
Org preferences

Set your Org Preferences to enable Analytics Templates. In the Admin Setup page, under Settings, select Enable Analytics Templates. You need to do this to create Analytics Template assets in the form of JSON files.

Developer Edition Org Namespace

Set up a namespace for your development org to enable the use of Managed Packages. Do this before creating any Analytics assets.

CLI Developers
To use CLI for template development, enable the Dev Hub, which lets you create and manage SFDX scratch orgs. Also, install the Analytics CLI Plugin:
  1. Enable Dev Hub in your org. See Enable Dev Hub in Your Org.
  2. Install the Salesforce Command-Line Interface (CLI). See Install the Salesforce CLI.
  3. Create a Salesforce DX project. See Create a Salesforce DX Project.
  4. Create a scratch org. See Create Scratch Orgs.
  5. Install the CLI Analytics plugin by running the command sfdx plugins:install @salesforce/analytics.
  6. Verify the installation by listing the available analytics commands. Run the command sfdx analytics --help.
Workbench Developers
  • Analytics REST API Access. Refer to the documentation on Authentication to the Analytics REST API to access and use the API.
  • Metadata API Access. Refer to the Metadata API Developer's Guide to access and use the Metadata API.
Analytics REST API access

Refer to the documentation on Authentication to the Analytics REST API to access and use the API.

Master app and its ID

Typically, you build an app and it becomes a master app when you create a template from it. You can also use a template to create a master app. However you create the app, note the 18-character app ID in the URL. It’s shown here in boldface:https://salesforce.com/analytics/wave/wave.apexp?tsid=2x0x0002xxx#application/00l0b000002AynIAAS. The ID becomes the folderId you use as you work with the WaveTemplate object.

Create a Master App From Scratch
Use Analytics Studio to build an app with lenses, dashboards, datasets, and the default Salesforce dataflow.
Create a Master App From a Template
  1. Create an app from the template using the wizard. Use CLI or Workbench to create the app if the wizard doesn't expose all the variables, and you need to answer them differently to create all app assets. In CLI, use an analytics:app:create command. In Workbench, you can use an Analytics REST API call.
  2. Next, turn the app into the master app by coupling it with the template.
    • With CLI, use analytics:template:update with the folderSourceID. See Step 8: Update an Existing Template.
    • In Workbench, use the following PUT call to update the template’s folderSourceID to the app that you just created:
      1PUT: /services/data/<current_api_version>/wave/templates/<18_character_app_ID>
      Here’s the request body:
      1{"folderSource" : {"id" : "<18_character_app_ID>"}}
Now, the new app becomes the master app in the org. Any updates made to the folder assets in the new master app are tied to the template.