Moving Salesforce Analytics dashboards between Salesforce environments.

One of the issues with Analytics cloud is that there is no process to take Analytics cloud assets from a dev or test environment and push them into production. Basically what you need to do is rebuild all of the items again in production. Here are the steps just for the dashboard component, all of the other peices of a dataset/dasboard are the same including:

  1. Uploading the datasets into new environment / pulling from Salesforce
  2. Copying and pasting XMD from one environment to the other
  3. Downloading images and re add images to the new environment

How to move dashboards JSON between environments:

I want to move this simple dashboard from one of my pre sales environments to another pre sales environment. The dashboard looks like this:

Next, I want to show the sourcecode so you can see the id's of the dataset, dashboard and the environment.

Looking at this dashboard we can see that it is very simple and that we have used in our steps the "OnTime" dataset. This is the dataset that we will need to use in the new environment. Looking at the code below we can see there are specific environment variables.

  "_url": "/insights/internal_api/v1.0/esObject/lens/0FKB000000003sPOAQ/json",
  "_uid": "0FKB000000003sPOAQ",
  "edgemarts": {
    "emName": {
      "_type": "edgemart",
      "_uid": "0FbB000000002slKAA"

First thing we want to do is move to our new environment and make sure the dataset has been repulled form Salesforce or uploaded via CSV/API or middleware. Once this has been created, open the dataset and snap the lense to a dashboard.

Next step is to save the new dashboard to the same name as the dashboard we are moving across between environments in this case it is "Carrier Performance".

Once we have saved the dashboard, goto the onboard lens tool and access the dashboard JSON. The lens viewer can be found using the following instructions:

In your browser’s address bar, type the URL of the Create Lens page. For example, if your Salesforce instance is, type in your browser’s address bar.

Copy the JSON from the lens viewer and paste into a text editor

This is the JSON of our new dashboard, the next step is pretty simple. All we need to do is to take the "State" section from the dashboard JSON from the old environment and paste it into the "State" section in this json. The new dashboard JSON currently looks like the following:

We will now add the new "State" section to this dashboard JSON. It now looks like the below:

We can now add this to the new dashboard in the new environment via the lens viewer. Once this is completed your dashboard will look something like this:

This is a quick overview on the basics of moving the content of a dashboard from one environment to another. There are a number of things in addition to this mentioned at the start of the artice. These need to be applied manually to complete the dashboard.