Getting Started With Salesforce CRM Analytics 2E - Johan Yu
Getting Started With Salesforce CRM Analytics 2E - Johan Yu
Getting Started With Salesforce CRM Analytics 2E - Johan Yu
This work is subject to copyright. All rights are solely and exclusively
licensed by the Publisher, whether the whole or part of the material is
concerned, specifically the rights of translation, reprinting, reuse of
illustrations, recitation, broadcasting, reproduction on microfilms or in any
other physical way, and transmission or information storage and retrieval,
electronic adaptation, computer software, or by similar or dissimilar
methodology now known or hereafter developed.
The publisher, the authors and the editors are safe to assume that the advice
and information in this book are believed to be true and accurate at the date
of publication. Neither the publisher nor the authors or the editors give a
warranty, expressed or implied, with respect to the material contained
herein or for any errors or omissions that may have been made. The
publisher remains neutral with regard to jurisdictional claims in published
maps and institutional affiliations.
OceanofPDF.com
© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2024
J. Yu, Getting Started with Salesforce CRM Analytics
https://doi.org/10.1007/979-8-8688-0479-3_1
Figure 1-1 Analytics Studio app and Analytics tab in the Salesforce Lightning App Launcher
If you are unable to locate Analytics Studio from the App Launcher, you
probably have not been assigned the permission set to access CRM
Analytics; we will cover permissions related to CRM Analytics later in this
chapter. Another reason is that your Salesforce profile has not been enabled
with the Analytics Studio app; reach out to your Salesforce admin to enable
it.
For the CRM Analytics admin, CRM Analytics configuration and user-
related permissions are configured from the Salesforce setup menu. Type
Analytics in the setup search box to configure it, while user permissions
are granted with the Salesforce permission set.
Lightning Page
A Salesforce admin can add CRM Analytics dashboards to any Lightning
page, such as the Home page or a record page (Account, Opportunity, etc.).
To add the dashboard to a record page, Salesforce can pass the record ID as
a filter to the dashboard, so the dashboard only shows the relevant data. The
Salesforce admin needs to edit the Lightning page, then add the CRM
Analytics Dashboard component, select the dashboard, and configure the
component property.
Analytics Tab
Once CRM Analytics is provisioned, the Analytics tab will be added to
your Salesforce organization. Your Salesforce admin needs to configure the
tab visibility, either by profile or permission set; this is similar to the
standard Salesforce tab; your Salesforce admin can set it as Default On,
Default Off, or Tab Hidden.
From the Analytics tab, users can explore all apps, dashboards, and
lenses that users have access to. Also, users can track Notifications,
Subscriptions, Watchlists, Collections, and Favorites of items added.
Analytics Studio
The Analytics Studio app is primarily for dashboard builders to build or edit
CRM Analytics dashboards, starting from building the dataset to defining
security and so on. Dashboard builders can open Data Manager from
Analytics Studio or the App Launcher; we will discuss Data Manager later
in this chapter. Figure 1-4 shown a sample of Analytics Studio user
interface with the Home tab.
Business users will be able to access Analytics Studio if their profile or
permission set allows; from here, the users can explore apps, dashboards,
lenses, and datasets. There are two ways to open the Analytics Studio app:
1. Analytics Tab: Open a dashboard or lens, then click the “Open
Analytics Studio” icon at the upper-right corner.
2. Analytics Studio App: Click the App Launcher (nine-dot icon at the
upper left in Salesforce Lightning), then click Analytics Studio.
Figure 1-4 Analytics Studio user interface
Mobile App
Users can download the CRM Analytics mobile app from the App Store or
Google Play Store. In the mobile app, users will be able to open all
dashboards and lenses to which the users have access.
As the dashboard builder/designer, you should design dashboard layouts
that are optimized for mobile or tablet devices. If you do not create the
mobile or tablet layouts, the mobile app will be using the default app for
web browsers, where some widgets will not visualize well on mobile/tablet
devices.
Apps
Suppose you are familiar with the Salesforce report and dashboard; each
report and dashboard are stored in a folder, and the folder controls user
accessibility of the reports and dashboards that are stored in that folder. An
app in CRM Analytics is like a folder in Salesforce, where it controls who
can view, edit, or manage items within the app.
The app is similar to containers that can hold multiple types of items,
from dashboards, components, lenses, and datasets. Ideally, you should put
all related items within an app; then, you can configure the app sharing to
users who need to access the dataset, dashboard, or lens.
Dashboards
A dashboard is a collection of widgets that may contain charts, tables,
repeaters, text, numbers, links, components, containers, images, filters, lists,
inputs, toggles, dates, ranges, and navigation. Ideally, a dashboard is the
result of what we want to achieve, and then it is published to a group of
users, where users will explore and analyze the data. You can build a
dashboard that contains multiple pages.
However, not all business needs are required to build a dashboard; for
example, if the users simply need to get the data into a table or a chart, we
can use Lens, which explores data from one or multiple datasets.
Lenses
A lens is a visualization of dataset; it can be presented as raw data,
grouping, pivot table, and multiple types of charts. The lens can be saved to
an App and shared with other users.
The lens is similar to that of Salesforce’s report. However, the CRM
Analytics dashboard does not need a lens to build the widgets as a data
source; the widget gets the data directly from the data source.
A lens can be created by exploring a dataset or by exploring a widget
from the dashboard. When the user explores a widget from a dashboard, it
will not impact the dashboard itself, but it will create a new lens, and the
user is able to save the lens if needed for future usage or analysis.
A lens can be visualized in the form of a chart or table. Many types of
charts can be used in a dashboard; the same type of charts is available to use
in a lens.
Datasets
A dataset is a collection of data stored in a tabular format. The data can
come from multiple sources, such as Salesforce objects, other Salesforce
organizations, external systems, and CSV files.
Everything you need to build a dashboard or lens starts from the dataset.
The dataset contains the data itself and extended metadata (XMD).
You can configure dataset extended metadata by exploring the dataset,
such as setting field formatting, relabeling field names, hiding fields, setting
default fields, and editing data values (but this is not bucketing).
By opening the dataset, you can get dataset information such as the API
Name, created date time, data last refreshed, data last queried, the number
of rows, source, app, usage, and security predicate. Additionally, you can
perform actions such as backing up and restoring the extended metadata,
configuring actions, restoring the dataset, and replacing data (for CSV data
load).
If a dataset is created as a result of a recipe or dataflow, whenever
possible, design the recipe or dataflow that produces data that can be easily
used in the dashboard, where all the heavy lifting works are performed in
the recipe or dataflow, not in the dashboard, such as by performing SAQL
(Salesforce Analytics Query Language). Figure 1-5 show CRM Analytics
architecture, from data sources, recipe to dashboard.
Figure 1-5 CRM Analytics architecture
Jobs Monitor
Jobs Monitor is the default page when opening Data Manager. Jobs Monitor
will show all the history and current jobs that are running, including Recipe,
Dataflow, Data Sync, Trend, and File Upload. At the top bar, you can click
one of the six tabs to filter the jobs quickly based on job status: All,
Succeeded, Failed, Warning, Running, and Queued. For a sample of Jobs
Monitor and Data Manager user interface, see Figure 1-7.
Data Assets
From Data Assets, see Figure 1-8, you can view all datasets that exist in the
CRM Analytics platform, as well as Salesforce (and external) objects that
are connected to CRM Analytics.
For datasets, you can see where the datasets are stored, who created the
dataset, the number of rows, creation date time, last refreshed, and last
queried; click the header to sort it. For Connected data, you can see the title,
the connection source, and the last data sync.
You can also create a new dataset from a CSV file by clicking the New
Dataset button at the upper-right corner; this is similar to creating a dataset
from Analytics Studio.
Figure 1-8 Data Assets user interface
Usage
In this tab, you can review the data usage at a glance:
Number of rows used (total of all datasets) and maximum rows allowed
for your organization. The maximum rows are based on the CRM
Analytics edition and the number of licenses purchased.
Usage in GB of output to Salesforce and the maximum size allowed in a
day.
Usage in GB of output to CSV and the maximum size allowed in a day.
Synced data does not count toward CRM Analytics usage; only the rows
are in All Datasets.
Connections
The Connections tab shows local Salesforce objects that are synced
between Salesforce and CRM Analytics; this connection is called
SFDC_LOCAL. For each item:
Object Name: This is the Salesforce object API Name.
Filter: Adding a filter here will cause not all data to sync from Salesforce
objects.
Columns: Number of columns that synced from each object.
Connection Mode: What is the sync mode for the object?
Last Run: When is the last sync for the object?
Status: What is the status of the last sync?
Similar to the recipe, click the arrow at the far right of the object name
to
Run Data Sync: Only run data sync for the select object.
Disconnect Object: This will disconnect the object from the data sync.
Data sync will stop pulling data from the data sources.
Edit Connection Mode: This can be set up differently for each object.
You can connect CRM Analytics to external data sources, such as
Google Big Query, Microsoft Azure SQL, Amazon RDS, Snowflake, etc.,
and, of course, you can also connect to other Salesforce organizations.
To create a new connection, click the New Connection button on this
page, then select the connectors. To schedule the sync, click the arrow next
to the connection name and click Schedule; this is similar to scheduling
recipes. See Figure 1-9; you can select Run Now to sync all connected
objects for this connection, set Notifications, or Edit Objects.
When you click an object from SFDC_LOCAL, you will see three tabs:
1. Columns: Select fields that you want to sync from Salesforce.
3. Data Sync Filter: Add filters to filter out data sync from Salesforce;
unless you are working on a specific custom object, do not set filters
for main objects, such as Account, Opportunity, etc., as other
dashboards (maybe in the future) may need those data. You can filter
out unneeded data from the recipe with a filter.
Summary
In this chapter, we learned that CRM Analytics is a platform by itself. The
data is stored in the CRM Analytics platform, not in the Salesforce
platform, but you can configure the system to sync the necessary fields and
objects. We also discussed why we need CRM Analytics and the differences
with standard Salesforce reports and dashboards.
CRM Analytics user provisioned from Salesforce user details with a
permission set. To access the CRM Analytics dashboard, users need to log
in to Salesforce and then access the embedded dashboard on the Lightning
page or from the Analytics tab. But to edit or build a dashboard, you must
start from Analytics Studio.
You can create a free Trailhead Developer Edition with CRM Analytics
to learn CRM Analytics from a basic level; this environment will give you
all the items that you need to learn CRM Analytics.
We ended this chapter by walking through permissions, the components
within CRM Analytics, and Data Manager. In Chapter 2, we will discuss
Data Sources and how we can get data into the CRM Analytics platform, so
stay tuned!
OceanofPDF.com
© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2024
J. Yu, Getting Started with Salesforce CRM Analytics
https://doi.org/10.1007/979-8-8688-0479-3_2
2. Data Sources
Johan Yu1
(1) Singapore, Singapore
In Chapter 1, we learned what CRM Analytics is, the differences with the
Salesforce dashboard, and the components in CRM Analytics, including
Analytics Studio and Data Manager. In this chapter, we will dive deep into
data sources and how to get data into CRM Analytics. As explained in
Chapter 1, CRM Analytics stores data on its platform, utilizing recipes to
get and transform data from multiple sources, including the local Salesforce
platform, external Salesforce organization, and other external data sources.
By the end of this chapter, you will learn multiple methods to get data
into CRM Analytics.
CRM Analytics syncs data from Salesforce local and all connected
environments within schedules set by the CRM Analytics admin. Each
connection can have a different data sync scheduled, and each object from
Salesforce local can be configured with a different Connection Mode (Full
Sync, Periodic Full Sync, and Incremental Sync). As a CRM Analytics
admin, you need to decide and set the correct connection mode by
analyzing the volume of transactions and the total number of records for
each object. I recommend setting Periodic Full Sync whenever possible;
this will prevent data drift over time with Incremental Sync.
However, some Salesforce objects, such as User and Group, can only be
set with Full Sync; this makes sense as those objects will not have many
transactions – the same applies to external connections, with only Full Sync
available for all objects. All of this can be configured in the Connections
tab under Data Manager.
Data that is uploaded manually into CRM Analytics, such as from a
CSV file, will be stored as a dataset. You can update the data by opening the
dataset and clicking Replace Data, and you can also restore the previous
version of data by clicking Restore Dataset.
We will walk through each of them. However, if you are using the free
Trailhead Developer Edition, you may not see the last option, “A Salesforce
Report”; this is only available in the paid CRM Analytics. You can check if
the Salesforce organization has the “Trend Report Data in CRM Analytics”
permission. See Figure 2-2 for data integration concept in CRM Analytics.
CSV File
CSV files are the most basic type of data source. However, it is still widely
used as it is standard, simple, human-readable/editable, can be opened with
a simple text editor, and is interoperable by many systems. You can directly
load data from a CSV file into CRM Analytics from Analytics Studio; this
will create a new dataset. If the data is stored in an Excel file, save it in
CSV format before the upload process.
CSV files are also suitable for storing simple data without many rows,
such as mapping or reference between data stored in Salesforce with output
needed in CRM Analytics; this data is supposedly not frequently changed.
Let us save the data from Table 2-1 as “Quota 2024.csv,” then load the
CSV file as a dataset in CRM Analytics; follow these steps:
1. Open Analytics Studio.
2. Click the Create button, then select Dataset, see Figure 2-3
Figure 2-3 Create a new Dataset
4. Upload the CSV file by selecting the file or dragging it to the box.
6. Click Next again; for now, let us use the default dataset name and
default app, My Private App.
8. Done; wait for a few seconds, and the system will open the created
dataset, see Figure 2-4. Optionally, you can monitor the data load
progress from the Data Manager.
Figure 2-4 The dataset is created; the pencil icon means that you can change the data
10. Clicking the Quota 2024 dataset will open the dataset as a new lens;
by default, it will be a horizontal bar chart with the count of rows as
bar length and without any grouping.
11. Click the arrow next to the dataset name and select Show Fields
Panel to see all available fields for the dataset. See Figure 2-6
Figure 2-6 Explore the dataset and show the fields panel
Tip You can see the number of rows synced in Jobs Monitor, open the
succeeded sync job, and look for Rows In and Rows Out.
When a recipe runs, it will not retrieve the data from the Salesforce objects,
but from the synced data in the CRM Analytics platform. With this
architecture, the data load performance in the recipe runs much faster than
that of retrieved data directly from Salesforce, see Figure 2-7.
Figure 2-7 Retrieve Salesforce data to CRM Analytics
External Data
CRM Analytics provides multiple connectors to retrieve data from other
systems, including the connector to retrieve data from different Salesforce
organizations.
From Data Manager, click the Connections tab, and you will see all
connections and the objects synced for each connection. To add a new
connection, click the New Connection button in the upper-left corner.
Figure 2-8 Connector available in CRM Analytics
For each connection, you can schedule when to sync from the external data
source, including from external Salesforce. Figure 2-8 shows that I have
three connections; two of them are SFDC_LOCAL, and one is another
Salesforce organization, where I named the connection “johan2024.” With
this, we can set different sync schedules for each connection, see Figure 2-
9.
Figure 2-9 Multiple connections connected to CRM Analytics
Tip You can schedule a recipe to run after the Salesforce local
connection or external connection sync is completed.
Existing Dataset
In some scenarios, you need to use existing datasets for other purposes,
such as to build a new similar dashboard. Another scenario is that it is too
risky to change the existing dataset that is used in existing dashboards and
lenses. As a solution, you can create a recipe to use existing datasets; select
the “CRM Analytics Datasets” checkbox when adding input data to create a
new enriched dataset; this will not impact the existing dataset and
dashboards and is the safest option when the dataset has been used in
dashboards or lens.
We will discuss the recipe in detail in Chapter 3.
2. Configure a Trend
In the Trend window, the Dataset name and Dashboard title have been
pre-populated; you can change them if needed. Then, you need to
schedule for frequency and select the days and times when the Trend
will run. You can keep the default dataset and dashboard name; let’s
change the frequency to Daily 5:00 AM or any time you prefer, then
click the Trend button at the bottom right of the window, see Figure 2-
11.
Alternatively, you can also trend a report from Analytics Studio;
click Create and then Dataset, and select A Salesforce Report; see
Figure 2-1.
Figure 2-11 Schedule the Trend from a Salesforce report
Note At a minimum, you can only run the Trend scheduled once daily;
if you need to run more trends in a day, you can duplicate the report,
schedule trends for each report, and then use a recipe to combine the
datasets into a new dataset.
3. Verify the Dataset and Dashboard
Once you click the Trend button, the dataflow will run immediately
(before the scheduled date and time); this will create a new dataset
(with the data as in the report) in CRM Analytics. You can monitor the
progress for the initial run from Jobs Monitor; see Figure 2-12.
Once completed, you should see a new Trend dashboard and dataset
in My Private App.
Figure 2-12 Monitor trend progress for the initial trend run
Tip If you only need one snapshot of data per day, set the schedule
daily before the current time. For example, now is 10:30 PM; if you set
the schedule at 11:00 PM, the schedule will run at 11:00 PM on the same
day, and you will have two data snapshots for the same day, but if you
schedule before the current time, the schedule will only run the
following day.
4. On Schedule Date/Time
When the schedule runs, the dataset will add data from the report to the
existing dataset from the initial run. You can check in Jobs Monitor that
the process is a bit different; there is an additional process called
append, see Figure 2-13. If you recheck the dataset, the count is more
than that of the initial trend run.
Figure 2-13 Trend job progress detail on schedule trend
5. Dataset Fields
Let us see what fields are created in the dataset from the Trend. Open
the dataset as a new lens and change to the table format; you should see
all fields from the Salesforce report, including fields used for grouping.
Additionally, there is a DateTime field called Snapshot Date; this field
is useful to mark when the Trend runs when adding new rows in the
dataset. See Figure 2-14.
Figure 2-14 The table shows data in the dataset created by Trend
6. Trend Dashboard
As part of the Trend process from Salesforce, a simple dashboard is
created in CRM Analytics with the data source from the trend dataset.
See Figure 2-15.
Tip If you need to have only the latest data from Salesforce and do not
keep adding data to existing rows, you can create a recipe to clean all
existing rows and make sure the recipe runs before the Trend schedule
runs. Ideally, this should be performed at midnight, when no one is
accessing the dashboard because the dataset will blank out between the
recipe end and trend end.
Summary
In this chapter, we looked at all possibilities for bringing data into the CRM
Analytics platform, from a simple CSV file data load, from local Salesforce
data sync, from other Salesforce organizations, from other systems with
external connectors, and trends from a Salesforce report. Additionally, we
were also able to create a new dataset by using values from the existing
datasets with the recipe.
However, there is also a feature that we have not discussed, where we
can directly pull local Salesforce data to the dashboard in real time without
using a dataset; we will discuss this in Chapter 6.
The next chapter will be more exciting as we will be hands-on with
building Recipes from scratch. The Recipe is the most crucial tool for CRM
Analytics professionals because it offers you unlimited possibilities to
design the datasets. We will also share how to back up and restore recipes
and will close with a session to create a recipe.
OceanofPDF.com
© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2024
J. Yu, Getting Started with Salesforce CRM Analytics
https://doi.org/10.1007/979-8-8688-0479-3_3
3. Recipe
Johan Yu1
(1) Singapore, Singapore
Dataflow
The Dataflow used to be the primary data transformation tool; it was when
the product was still known as Wave and Einstein Analytics.
As per the product evolution, the Dataflow is no longer available by
default; unless your Salesforce/CRM Analytics admin enables it, look for
Allow users to access Data Manager (Legacy) under the Analytics menu
in the Salesforce setup. If you have existing dataflows built and scheduled,
they will continue to run as usual. You can still edit or even create new
dataflows.
One of the limitations of Dataflow is that you will not see the preview
of data transformed along the nodes; after you run the Dataflow and open
the Dataset created, then you will see the data, which sometimes takes
minutes. While using the new Recipe for data preparation, you will see the
data preview for each node, so if the result is incorrect, you can fix it
immediately without the need to run the Recipe.
If you have existing Dataflows, you can convert them as Recipes; see
the following sample.
1. Open Dataflow
From Analytics Studio, click Data Manager, then click Manage
Dataflows at the bottom left of the screen, and you will get into an older
version of Data Manager. Click the Dataflows & Recipes tab on the left
menu, and look for the Dataflow that you want to convert.
2. Convert to Recipe
At the end of the Dataflow, click the arrow button (see Figure 3-1) and
select Convert to Recipe.
3. By default, the Dataset created in the converted Recipe will have the
same label but a different API Name; you can adjust it manually in the
Output nodes.
Tip You can adjust the panel height and width by dragging the
horizontal and vertical bars.
Figure 3-4 A sample of a Recipe
Use Case
Build a recipe to create a new dataset that contains the following
information from Opportunities:
– Opportunity Id
– Opportunity Name
– Opportunity Owner
– Opportunity Stage
– Account Name
– Amount
Additionally, we need a field called “Is New Business?” and this is not a
field in Salesforce; the logic is if the Type contains “New Business,” then
“Yes”; otherwise, “No.”
Also, the Dataset should only have Opportunities of
– Only Open and Closed Won opportunity
– Amount must be > $0
Building Concept
Understand and analyze the data relationship in all related objects and
fields:
1. Determine how many objects are involved. For this use case, there are
three objects:
– Opportunity
– User
– Account
2. Determine the main object; this will determine the granular level of
rows in the Dataset. For this use case, the main object is Opportunity.
6. Determine if we need any formula fields; for this use case, we will
create a field called “Is New Business?” in the Recipe.
7. Once you have all the preceding answers, you are ready to rock!
2. Click the Recipes tab, then click the Create Recipe button.
4. Click the Add Input Data button at the center of the canvas.
7. We are free to move the nodes around; to make them look neat, I move
the Opportunity node between the Account and User nodes.
8. Look up the Account to Opportunity to get the Account Name, click +
next to the Account input node, drag it to the Opportunity node, and
then select Join. The system will try to match the join keys, but you
can change them if they are wrong. I will change the Join node from
Join 0 to joinOptyAcct, and click the Apply button. Since we do not
need the Account ID from the Account object, we can remove it from
the Columns tab. In the Preview tab, you should see the Account
Name column (with an orange icon) with the data.
10. Click + at the joinOptyUser node and select output from the bottom-
left panel:
Rename the node to OutputOpportunity (click the pencil icon)
Write To = Dataset
Dataset Display label = Open Opportunities more than 0
Dataset API Name = Open_Opportunities_more_than_0
Click the Apply button. By now, your recipe should be similar to
Figure 3-6.
Figure 3-6 Final Recipe
11. Click the Save and Run button, then click Back to Data Manager at
the upper-right corner to monitor the Recipe progress. Depending on
the volume of data, this may take a few minutes.
12. Once completed, you should see the Status = Succeeded; open
Analytics Studio and search for the Dataset with the name “Open
Opportunities more than 0”; remember the dataset name set in point
10 iii earlier. See Figure 3-7 for dataset search in Analytics Studio.
Figure 3-7 Search Dataset in Analytics Studio
13. Click the Dataset; it will open as a new lens with a bar chart count of
rows.
14. Done.
Input Data
The first and must-have component in a recipe is input data, which is to
load data from the data source to the Recipe; a recipe can have one or
multiple input data. You must have input data to start building a recipe. The
source of data can be from
1. CRM Analytics Dataset: These are data already stored as datasets in
CRM Analytics.
When you start creating a recipe, you will see a blue button at the
center, Add Input Data, or click the “Add Input Data” icon in the upper-
left corner. Next, you will be presented with the “Add Input Data” window,
where you can add and search for the objects that you need. Additionally,
you can filter the list by selecting from the drop-down menu for just
datasets, external objects, or Salesforce objects - see Figure 3-9. You can
differentiate a dataset and object with the different icons in the list.
You can select multiple datasets or objects and then select (and search)
all the fields for each object that you want to use in the Recipe; it is good to
know the API Name of the fields to make sure you have selected the correct
fields. Then, click the Next button.
Figure 3-9 Add Input Data window
You can always add new input data when needed, not just upon recipe
creation. To add/remove fields from the input node, click the node and click
Change columns or click Replace to change the data source, see Figure 3-
10.
Tip Scroll down in the input node property; in the Data Preview
Sampling, select Sampling Mode = Filtered rows; this is useful if you
need to monitor specific values data only, and all data preview in the
following nodes will be based on these filtered rows.
Transform
The Transform node is one of the most used and important nodes in the
Recipe. In this node, you can create “columns” based on the logic defined.
There are a lot of functions offered by the Transform node; here are a few
items you can do in the Transform node:
Now: Return the date and time value in a specific format.
Custom Formula: Calculate and return a value based on the existing
value in columns; this is the most useful function to create a new column;
many items below can be used with a custom formula.
Trim: Select a dimension field, then select New Column (and Keep
Original), New Column (and Drop Original), or Original Column. Use
this function to remove leading and trailing whitespaces and set the
maximum character length from the left.
Substring: Select a dimension field; use this function to retrieve
characters from the specified position and of the specified length.
Split: Select a dimension field; use this function to split a column value
into two new values at the specified delimiter.
Uppercase and Lowercase: Select a dimension field, then select New
Column (and Keep Original), New Column (and Drop Original), or
Original Column. Use this function to get a value in upper- or lowercase
for the whole string.
Replace: Select a dimension field, then select New Column (and Keep
Original), New Column (and Drop Original), or Original Column. Use
this function to replace a specific value with an existing value.
Text to Number and Date: Select a dimension field, then select New
Column (and Keep Original), New Column (and Drop Original), or
Original Column. Use this function to change the text into a number or
date.
Format Date: Select a dimension field, then select New Column (and
Keep Original), New Column (and Drop Original), or Original Column.
Use this function to convert dates in the selected Text column to the
specified format.
Bucket: This function can be used in the dimension and measure field;
for the measure (number) field, you can organize values into buckets
based on ranges; for the dimension, organize values based on the defined
value for each bucket.
Edit Attributes: The purpose of this function is to change field attributes
for both columns Label and API Name.
Drop Columns: To remove columns that are no longer needed from the
Recipe.
Fill: This function is only available in the number column; use this
function to fill in null values in the data with the given replacement
value. You can select New Column (and Keep Original), New Column
(and Drop Original), or Original Column.
Is Transform node a must-have in a recipe? The Transform node is not a
must-have in a recipe; however, a recipe without any Transform node will
only add or remove rows or aggregate from the data source, which can be
achieved with the Join, Aggregate, and Filter nodes.
It would be best if you renamed the default Transform node name by
clicking the three-dot icon above the node, and at the same time, you can
add the description for that node. Another way is by clicking the node and
then clicking the pencil icon at the node properties to change the node name
to something meaningful.
Tip Make sure each node has a unique name that represents what the
node does.
In a Transform node, you can add multiple transformations, and they will be
run in order, for example, in step 1 you can create a new field called A, then
in step 2, you can use field A as the logic for new field B. To make it clear,
you can edit the transformation name to reflect what the transformation will
do, see Figure 3-11 to edit the node Name and Description.
Figure 3-11 A sample of a Transform node with multiple transformations
For Custom Formula, you can also work with data across rows; you need to
enable Multiple Row Formula, and you will be offered a set of “Windows
Functions.”
Filter
A Filter node is required to filter out rows that are not needed for our
dashboard or output. Remember that we usually sync all data from the
original data source; unless the data has been filtered out in the Connection
setting, this is usually only for objects that are used for a specific
dashboard.
You can add Filter nodes anywhere in the Recipe, and you can have it as
many as needed. As a best practice, you should put the filter at the start or
after the Join node (depending on the scenario), so the Recipe doesn’t
process unused data.
Adding a filter to the node is very easy; select the field, operator, and
value, for example, Amount Greater Than or Equal To 0. You can have
multiple filters in a Filter node, and by default, all the relation is AND. To
change the logic to OR, click the Add Standard Filter Logic from the
arrow drop-down in the Filter properties, so if you have multiple filters, you
can have filter logic, for example, (1 OR 2) AND (3 OR 4).
Another option is to use Custom Expression; this is useful for
complicated filters. Click Add Custom Expression from the same drop-
down menu in the Filter properties, for example, StageName =
'Closed Won' AND Amount > 0.
Aggregate
Use this node to summarize large amounts of data with aggregates and
groups. You can aggregate the data with
Unique
Sum
Average
Count
Maximum
Minimum
Then, group it by rows and columns (optional). As per the standard in
the Recipe, you can rename the node and add a description. In the preview
window, see the result after aggregate.
You can add multiple aggregates into a node; each aggregate will create
a new column in the output. As you see in the preview, after the Aggregate
node, the original raw data will no longer be available, see Figure 3-12. But
of course, you can have a branch from the previous node to keep the raw
data.
Depending on the needs, the Aggregate node is not very commonly used
in the Recipe, compared to the Filter, Join, and Transform nodes, which are
very common.
Join
As per the node name, use this node to join data from two nodes, for
example, to get the Opportunity Owner Name; by default, Salesforce only
has the “Opportunity Owner Id” field in the Opportunity object, so we need
to join Opportunity with the User object to get the Opportunity Owner
Name.
To perform join, drag + at the right of the lookup (right) node to the
main (left) node, then select Join, see Figure 3-13. Alternatively, click + at
the right of the lookup (right) node, select the Connect tab, select the main
(left) table, then select Join.
Figure 3-13 Connecting node with Join
For easy visualization and understanding, I will use the two datasets in
Figure 3-14 to explain each type of Join and the results.
Left Join: This join type will expand the number of rows of the left table
if the lookup from the right table has multiple rows with the same key. In
Figure 3-16, the Master Staff is the main data.
Figure 3-16 A sample result of Left Join
Right Join: Similar to left join, but the other way round, see Figure 3-17
Outer Join: This Join node will show all results; the one with the
missing key will be blank, see Figure 3-19.
Figure 3-19 A sample result of Outer Join
Cross Join: Each row from the left table will be combined with each row
on the right table, so there is no key to match, see Figure 3-20.
Figure 3-20 A sample result of Cross Join
For all types of Join, except Cross Join, we need to match the keys between
the left and right tables. The system will try to auto-set the keys, but we can
manually change them if they are incorrect.
For all types of Join, there is a property called API Name Prefix for
Right Columns; the value here will be added as the prefix in the API Name
for the right object fields; for example, if the value entered is Owner, the
result field is “Owner.Id”. You can see the field API Name from the
Columns tab, including the field type and source. You can use Edit
Attributes to change the Label and API Name.
Append
As the name suggests, the purpose of this node is to combine data from two
nodes, so the total number of rows will be the total of rows from both
nodes. If you have more than two nodes to join, then you need to have
additional Append nodes; for example, we need to Append node A, node B,
and node C; for this scenario, append A and B, say node D as a result, then
Append node D with node C with the final result in node E.
The system will try to map the columns from both nodes, but you can
manually fix it if incorrect. You can also select Map all columns and then
select Allow schema merge; this will add columns that do not match as
new columns.
Figure 3-21 A sample result of the Append node with Allow schema merge
Update
Use this node to replace column values with data from another data source
when key pairs match. See the example in Figure 3-22; instead of using the
original Name value, for each key matched, the New Name value will
replace the original Name value. However, the column name will stay the
original, which is the “Name” in the example.
Figure 3-22 A sample result of the Update node
Output
The Output node is the result of the Recipe, and you can have multiple
Output nodes in a recipe. There are three output options:
1. Dataset: This is the most common output from a recipe, where the
output is a dataset and can be used for a lens or dashboard.
3. CSV: The result will be written as a File in Salesforce; you will need a
developer to write a script with the REST API to retrieve the file.
In this book, we will cover Dataset only as the output result. There are a
few properties that we need to set in the Output node:
Dataset Display Label: This is the Dataset label.
Dataset API Name: This is the Dataset API Name.
App Location: This is where we want to store the Dataset; ideally, all
related assets (Dataset, dashboard, lens) are stored in the same app, so it
is easier for us to set the sharing access.
Sharing Source and Security Predicate: These will be discussed in
Chapter 8.
Summary
Finally, we learned one of the most powerful items in CRM Analytics. In
this chapter, we learned about Recipe. We did hands-on exercises by
converting a Dataflow to a Recipe. Lastly, we created a recipe from scratch
based on the given scenario.
We learned each node available in CRM Analytics’s Recipe by getting
data into the Recipe using the Input Data node. Use the Transform node to
do data transformation, including work with data across rows. Use the Filter
node to remove data that is not needed. Use the Aggregate node to
aggregate raw data into groupings and values in summary. Use the Join
node to look up or join data from two nodes. Use the Append node to
combine data from two nodes, even if they don’t have similar columns. Use
the Update node to replace data and the Output node to write the data into a
Dataset, CSV, or Salesforce.
We also learned how to back up and restore the Recipe using a JSON
file and version history.
In the next chapter, we will look into Datasets created in CRM
Analytics, which can be created from the CSV file, Dataflow, Recipe, or
Salesforce trend report. We will also learn, including hands-on exercises,
how to configure dataset metadata so that the Dataset will be displayed as
per our business needs.
OceanofPDF.com
© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2024
J. Yu, Getting Started with Salesforce CRM Analytics
https://doi.org/10.1007/979-8-8688-0479-3_4
4. Dataset
Johan Yu1
(1) Singapore, Singapore
From the Dataset properties, you can check and perform actions for the
Dataset, see Figure 4-2.
Figure 4-2 Dataset Properties
The following are the information and actions that can be performed on the
Dataset:
Dataset Label: Click the pencil icon next to the dataset name to change
the Dataset label, but not the API Name. When you explore or work in a
dashboard, you will see the dataset label, not the API Name.
Dataset Information
Dataset API Name: You cannot change it from here, but from Recipe,
or recreate the Dataset for the CSV file.
Dataset Created Date Time
Dataset Last Modified Date Time
Dataset Last Refreshed
Dataset Last Queried
Number of Rows
Source: Which Recipe or Dataflow creates the Dataset.
App: Where the Dataset is stored; you can move the Dataset to another
App by clicking the pencil icon.
Usage: All dashboards and lens use that Dataset.
Sharing Sources and Security Predicate: We will discuss these items in
Chapter 6.
Download and Replace Extended Metadata File: We will discuss this
item later in this chapter.
Replace Data: This is to replace the Dataset with a CSV file.
Configure Actions: Configure fields in the Dataset when they are open
in the dashboard or Lens.
Restore Dataset: Restore the Dataset from the previous two most recent
versions.
Delete Dataset: You cannot undelete the Dataset once it is deleted; you
also cannot delete the Dataset if it is still in use in a dashboard or Lens.
Explore: This is to explore datasets as a lens, including taking some
actions for the Dataset.
Dataset Fields
When you load a CSV file as a new dataset or replace an existing Dataset,
each column from the CSV file will become a field in the Dataset; you will
be prompted for the following:
Select a CSV file.
Dataset Name: The CSV file name would be the default for the Dataset
Name; however, you can change the Dataset Name.
App: This is to define where the Dataset will be stored; by default, the
Dataset will be stored in the “My Private App.”
Field Label: By default, it will be the same as with the column name, but
you can change it if needed.
Field Type: CRM Analytics will try to assign a field type (Dimension,
Measure, or Date) for each field based on the value of data; however, you
can change the field type as needed, for example, if all value in the
column is number, the system will set the field type as Measure
(number), but you can change it to Dimension (text).
As mentioned in previous chapters, you can monitor the data load
progress from the Data Manager. Once the data is loaded, search for the
Dataset name from Analytics Studio.
For the Dataset Created from a Recipe, if no data transformation
happens, the field name and field type will follow the Salesforce field name
and type. The Dataset API Name and Dataset Label are defined in the
Output node. By default, the Dataset will be stored in the “My Private App”
app, and you can change it.
Note The Dataset API Name must begin with a letter, can contain only
alphanumeric or underscores, can’t exceed 80 characters or end with an
underscore, can’t contain two consecutive underscores, and is case
sensitive.
Figure 4-3 Click Show Fields Panel to configure the Dataset Metadata, see Figure 4-3
Then, you will be presented with a list of fields grouped by field type.
Note Once saved, all existing labels in the dashboard or Lens using the
field will be renamed with the new label.
Hide Fields
In a scenario where you need to hide fields that exist in a dataset, you can
hide the fields from here. So, the user will not see the fields and will not be
able to use them in the dashboard or Lens.
Similar to renaming a field, from the field panels, hover your mouse
over the field, click the arrow icon, and select Hide, see Figure 4-5.
Figure 4-5 Hide fields
To show hidden fields, from the field panels, click the gear icon next to the
number of rows, then select “Show Hidden Fields.”
Note Once the field is set to be hidden, it will impact all existing
dashboards and Lens. If the fields are used in the dashboards or Lens,
this will cause errors in the dashboards or Lens.
Edit Values
This action only applies to the Dimension field; the purpose of this function
is to change the field value; for example, instead of showing “Partner” in
the Account Type field, let’s change the value to “Channel.” As previously
mentioned, any changes here will impact all existing dashboards and Lens.
You can also define the color of the selected field.
From the field panels, hover your mouse over the field, click the arrow
icon, and select Edit Values, see Figure 4-6.
Figure 4-6 Edit field values
Note If you change two or more different values to the same value,
CRM Analytics will not “combine” the data when you group it, even if
the value is the same after editing.
Format Numbers
For the Measures field only, we can set the value shown in a specific
format, such as percentage, currency, or custom format; this is very useful
when you show the data in Table format or even in a chart. From the field
panels, hover your mouse over the field, click the arrow icon, and select
Format Numbers, see Figure 4-7.
Similar Format Numbers can be found in Dashboard widgets or Lens.
CRM Analytics also offers you the ability to restore the Dataset from the
last two versions, whether the Dataset is overwritten manually using the
Replace Dataset function or overwritten after a Recipe run. CRM Analytics
automatically backs up the Dataset before overwriting it.
When you click the Restore Dataset icon, it will show two previous
versions of the Dataset, including information on when the Dataset was
created and the number of rows for that version. Select which version to
restore, and then click the Restore button, see Figure 4-12.
Figure 4-12 Restore Dataset
To configure an action
From the edit Dataset page, click the Configure Actions (gear) icon next
to the Replace Data icon.
Select the field to enable for action.
Select the Record ID Field. This field must be the Salesforce record ID,
and it is mandatory.
Select Display Fields. This is not mandatory; however, this is useful
when there are duplicate values of the field that are set for action. By
adding other fields here, users will be able to differentiate which record
they want to perform the action; we will see more in the following
sample.
In Figure 4-13, we configure an action for the Name field. The Record
ID Field is Opportunity ID, so when the user selects the action, it will act on
that Opportunity ID. For Display Fields, let us select Name, Stage, and
Opportunity Type; for Actions, let us select “Open Salesforce record.”
However, if there are duplicate values for Name, the system will prompt
users to select which record for the action. Because we select Display Fields
= Name, Stage, and Opportunity Type, the screenshot in Figure 4-15 shows
how the system will react when duplicate values are found; in this case, the
Name “Opportunity for Abbott1184” exists twice in the Dataset, so the user
needs to select a record to open the record in Salesforce. In short, configure
“Display Fields” to help the user in selecting the correct record when there
are duplicate values.
You can quickly notice fields have been enabled for “action” by hovering
the mouse over the field, and an arrow will appear right after the field
value; see Figure 4-14.
For a Table widget, you can set up one-click actions from table
properties, so clicking the field value will perform the action configured.
Summary
In this chapter, we discussed what can be done once a Dataset is created,
whether it is manually loaded from a CSV file or created from a Recipe.
We started with dataset properties, which show the Dataset Created,
Last Modified, Last Refreshed, Last Query, the Dataset usage, the Dataflow
or Recipe that created the Dataset, the number of records in that Dataset, the
security predicate defined, the dataset API Name, and the App name where
the Dataset is located.
Also, on the Dataset properties page, we can perform multiple actions,
such as changing the dataset label, replacing data, configuring Actions,
restoring the Dataset, deleting the Dataset, exploring the Dataset to a Lens,
downloading and replacing an extended metadata file, changing the app for
the Dataset, and defining a security predicate.
We also discussed how easy it is to manipulate data and fields in the
Dataset with extended metadata.
In the next chapter, we will discuss everything about Lens, how to
create Lens, how to make use of a Lens in analyzing CRM Analytics data,
how to use Lens to download and share data, and the types of chart and
formatting available in Lens.
OceanofPDF.com
© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2024
J. Yu, Getting Started with Salesforce CRM Analytics
https://doi.org/10.1007/979-8-8688-0479-3_5
5. Lens
Johan Yu1
(1) Singapore, Singapore
When we explored the Dataset and played around with Extended Metadata
in Chapter 4, without our awareness, we opened the Dataset as a new Lens.
A lens is a view of a dataset or dashboard widget, and we can use it to
explore the data and get insight. We have options to explore the data in a
Lens as a chart or table, including using a query with SAQL or SQL. CRM
Analytics provides many types of charts and table widgets for users to
explore the data, including Conversational Exploration, which will be
discussed later in this chapter.
If we compare Lens with Salesforce reports, there are similarities, but
mainly differences. A dashboard in Salesforce requires reports as the data
source, while a dashboard in CRM Analytics does not need Lens as the data
source but directly retrieves data from the Dataset.
In this chapter, we will learn everything about Lens, including
CRM Analytics App
Explore Dataset with Chart, Table, SAQL, and SQL
Explore Dataset with Conversational
Clip Lens to Designer
Download and share data
Creating App
From Analytics Studio, click the Create button, then select App, see Figure
5-1.
Run App
Open the App and notice the “Run App” button at the upper-right corner, or
you can also search the App name in the Analytics Studio or Analytics tab;
on the result, click the arrow at the end of the App name, then click “Run
App.”
Run App will open the Dashboard or Lens stored in that App; by
default, it will be in alphabetical order; however, you can edit the list to
hide or reorder the list, see Figure 5-3.
Figure 5-3 Run App and the ability to edit a list
Share App
Sharing an App in CRM Analytics is simple; this is similar to sharing a
dashboard folder in Salesforce. See Figure 5-2; click the Share icon (before
the arrow icon) at the upper-right corner of the App or the drop-down menu
when clicking the arrow after the App name in the Home or Browse page of
Analytics Studio. You can share the App by User, Group, and Role (option
to include Subordinates), see Figure 5-4 – this refers to User, Public Group,
and Role in Salesforce.
Figure 5-4 Give App access to other users
Exploring Dataset
Once we bring data into CRM Analytics, we should verify the data is
correct based on data completeness, quantity, and quality. Completeness
means the fields are complete as we expect, with no missing fields;
otherwise, we need to re-upload the Dataset or modify and rerun the
Recipe. Quantity means the number of rows is complete, with no missing
rows. Quality means all the fields contain the right values with the correct
data type.
With this simple chart, we can verify the data Quantity; from the chart, we
see that the Dataset has 1K of rows; we can compare this from Dataset
properties, as shown in Figure 4-2, and look for “Rows.” However, we
cannot verify if the Dataset contains complete fields, field type, and value
of fields; we need to change the chart to Table Mode and select the Values
Table to verify those items.
Before discussing Table Mode, let us explore the common things we can
do in Chart mode and analyze data using Chart mode, see Figure 5-6:
Change Bar Length to Sum, Average, Maximum, Minimum, Unique,
Median, First, Last, Stddev, Stddevp, Var, and Varp: All of them are
only applicable to the Measures field, with the exception of Unique,
which can be used in any type of field. I am not going to explain each of
the functions, but it is good to familiarize each of them.
Add Additional Bar Length: With this, you can analyze multiple
measurements at a glance, such as the Count of Rows and the Sum of
Annual Revenue.
Add Bars: This means that we are going to have a new grouping in the
chart.
Add Filters: We can add multiple filters for multiple fields, and we can
apply filter logic OR and AND here.
Change Chart Type: CRM Analytics offers more than 30 chart types for
us to use, but remember that each chart type has its own properties, so
your existing selection may be removed if the new chart type does not
have such properties or move as other properties. If you are confused
about which chart is best suited to you, click “Suggested Chart” to let
CRM Analytics offer a few options based on the data and selection.
Apply Chart Formatting: You can set the chart title, font size, show
axis, show legend, etc.
Using the Values Table, we will be able to verify if the Dataset contains all
the fields that we need to build a dashboard and if all fields contain correct
values, which we cannot verify in Chart mode. However, chart mode allows
us to group data and sort it quickly, so we can analyze the data on the fly,
get percentages of each group, or get data trends over a timeline.
Additionally, in the Table mode, we can switch to Compare Table,
where we can group the table based on fields, and Pivot Table, where we
can organize and summarize data grouped by rows and columns.
Saving Lens
After the Dataset opens as a new lens, hit the Save button on the upper-right
corner to save the configured Lens so that you or your team member can
reuse it in the future. You can store it in “My Private App” if you do not
want anyone else to touch it, in the “Shared App” to let everyone in the
organization access it, or in a Custom App if you need to share it with your
team or other users. Enter the Lens Name, Description (optional), and
Version History (optional).
When saving a Lens, all items within the Lens will be saved, from the
table or chart type, including all the filters, fields, grouping, sorting,
conditional formatting, etc. If you have edited the chart or table with the
custom query SAQL or SQL, this will be saved as well.
If you save an existing Lens to a different App, CRM Analytics will
move it to the new App, so it is not a Save As. If you need to save the Lens
as a new Lens, you should clone it, click the arrow at the corner, and select
“Clone in New Tab”, see Figure 5-9.
Present Lens
There is an icon called Present at the Lens. The purpose of Present Lens is
to show the Lens on the web browser at full screen. If you are using the
Google Chrome or Microsoft Edge web browser, this is similar to hitting
the F11 key. Press the F11 key again to exit from the full-screen mode.
The Present mode is useful when you need to present the Lens and not
be disturbed by other things or when you need to analyze the Dataset with
more real estate.
Note You can have the Lens and Dataset stored in different apps.
Get URL
Instead of manually copying and pasting the URL to your colleague, click
the arrow icon at the far right of the Lens, then click Share. Click the Get
URL tab, and you will see two options: open the link in the Analytics Tab or
Analytics Studio. So, which one should we get? Ideally, if your colleague
needs to edit the Lens, get the URL for Analytics Studio, but if they just
need to explore the Lens, get the URL for Analytics Tab, see Figure 5-11.
Post to Feed
With this feature, you can easily share the Lens to a User Chatter feed or a
Group Chatter feed. Posting this will add the chart or table as an image and
will be visible to all users in the group or users who follow the user. Even if
users do not have a CRM Analytics license, they will be able to see the feed
posted as an image.
Download
Does your team ask how to download data from a dataset? The answer is
that CRM Analytics does not give options to download directly from the
Dataset to an Excel or CSV file. However, they can explore a Dataset as a
table and then download the data into an Excel or CSV file, making sure all
the fields needed to download are added to the table.
If you notice, I mentioned fields added to the table; this means that you
should not use the Chart lens if you would like to download the raw data.
Downloading from chart lens will only give you a summary number based
on the chart configured.
CRM Analytics also gives you the option to download the Lens as an
image. The image will be in PNG format and will be similar to the one in
Post to Feed.
Tip If you do not see the Download option, check with your Salesforce
admin to enable the “Download CRM Analytics Data” permission on
your CRM Analytics permission set.
Note When the Lens is updated, the Subscription will be updated too;
the email will deliver the latest Lens saved.
You can access CRM Analytics assets added as favorites from Analytics
Studio as well, see Figure 5-15; however, this will not include Salesforce
assets here.
Figure 5-15 Accessing Favorites from Analytics Studio
Summary
In this chapter, we discussed everything about Lens. Usually, we use Lens
to explore a dataset, both from the Dataset or from a Dashboard widget. So
far, we have not discussed the Dashboard yet, but in the next chapter, we
will build a dashboard from scratch.
We had a hands-on experience exploring the Dataset into a new lens,
including both chart mode and table mode, and then we learned about
saving and cloning lens. We also discussed Clip Lens to Designer which
offers to copy Lens into an existing dashboard or to a new dashboard. We
also mentioned that Lens is not related to a dashboard; anything added to
the Dashboard will not impact the Lens or Dashboard anymore; they are
entirely independent, just sharing the same Dataset.
We discussed how to share Lens with your team or the whole company;
we can also post a Lens chart or table into someone’s Chatter feed or Group
feed, and with Lens, we are able to download raw data from CRM
Analytics. Subscriptions, Collections, and Favorites are additional CRM
Analytics features that can be added from Lenses.
We ended the chapter with a discussion on how to explore Lens with
conversational language, so instead of manually selecting and adding fields
and grouping, Conversational Exploration will do the job for us.
OceanofPDF.com
© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2024
J. Yu, Getting Started with Salesforce CRM Analytics
https://doi.org/10.1007/979-8-8688-0479-3_6
6. Building Dashboard
Johan Yu1
(1) Singapore, Singapore
After discussing the Recipe, Dataset, and Lens in previous chapters, we are
going to start building a dashboard in this chapter. Let us start with the
permission, layouts, dashboard template, widget, query, page, facet, and
using multiple datasets in a dashboard; you will use most of those items
when building a dashboard, although it is not a must to have all of them in a
dashboard.
What can we expect from a CRM Analytics dashboard? With CRM
Analytics, we can build a dashboard that shows numerous key metrics for
our business with specific needs, from sales, support, marketing, adoption,
etc. When building a dashboard, you can easily add dashboard filters using
any fields available in the dataset, so your users are able to analyze data,
including using facets.
For users on the road, CRM Analytics also comes with a mobile app
that can be downloaded from the App Store or Google Play Store. By
default, all CRM Analytics dashboards will work in the mobile app;
however, the layout will not be friendly when it opens on the mobile device
until you create a layout that is optimized for mobile.
In this chapter, we will learn the following topics related to creating a
dashboard:
Permission
Layout
Template
Widgets
Query
Pages
Faceting and global filter
Using multiple datasets
Permission
We discussed the “App” in Chapter 1; the App controlled user permission to
access items within that App, whether as a viewer, an editor, or a manager.
Only users with editor or manager access (defined in each App) will be able
to save dashboards into the App; otherwise, they will not see the App when
saving a dashboard.
On top of permission on the app, to create dashboards, the user also
needs to have a “Create and Edit CRM Analytics Dashboards” permission
in their Salesforce user via Permission Set assignment.
Layout
When we create a new dashboard, the default layout is called “Default,”
and it is optimized for viewing the dashboard with a web browser from a
computer, not from the mobile app. The CRM Analytics dashboard allows
you to create multiple layouts for a dashboard, which are optimized for web
browsers, tablets, and mobile devices.
Let’s start creating a new dashboard:
1. Log in to Salesforce and open Analytics Studio.
3. Select “Create Blank Dashboard”; this will bring you to the Dashboard
Designer with a blank canvas.
5. From this panel, we can change the layout name and other layout
properties, such as column, row height, cell spacing, background color,
etc. From this panel, let us change the layout name from default to
“Web Browser” and columns to 18.
6. At the left bar below the default dashboard name, New dashboard,
there is a + icon and an Untitled tab with an arrow. When you create a
dashboard, it will start with one page only and is called “Untitled”; we
can rename this by clicking the arrow and selecting Rename. Another
option is Hide from Navigation and Clone; for now, let us rename the
page to “Page-1” and click the Apply button.
7. A CRM Analytics dashboard can have multiple pages; click the + icon
to create a new page and enter the name; for now, let’s stick with one
page. Later in this chapter, we’ll discuss the dashboard with multiple
pages.
9. If you create a layout with the Mobile layout type, this template will
be auto-selected when the user opens the dashboard from the mobile
app. We also have the option to copy all content from the current
layout to the new layout and also to enable Sync widgets across
pages, see Figure 6-3.
10. Let us save the dashboard by clicking the Save icon at the upper right;
the dashboard name by default will follow the dashboard title, Global
Accounts; save it to My Private App.
Figure 6-3 Manage Layouts to see and rename layouts
Template
When you create a new dashboard, CRM Analytics will ask if you would
like to create it from a blank dashboard or a dashboard template. If you
select to create from a template, you can choose from ten templates
available:
Comparison Dashboard
Details Dashboard
GMT Blank Dashboard
Metric Trend
Performance Summary
Summary Dashboard
Table Expansion
Three-Columns Dashboard
Tile Dashboard
Time Series
Using a dashboard template, you can speed up the development process
in creating a new dashboard; the new dashboard will have widgets and
layouts based on the selected template but still give you the flexibility to
move, add, and delete widgets. Some templates come with filters,
containers, main charts, supporting charts, tables, and key metrics.
While some of them, such as Metric Trend, Performance Summary,
Table Expansion, and Time Series, will ask you a few questions, each of
these templates will ask for different questions, but the dataset will always
be asked.
Table 6-1 Questions for the Dashboard Template
Some of the templates are also marked as “smart,” which means the
dashboard requires little to no additional configuration; for example, in the
Time Series template, the dashboard visualizes how metrics change over
time and predicts future metric trends based on historical data.
We will not discuss each template in this book, but let us create a new
dashboard using the Time Series template (which is marked as smart); make
sure the dataset has a date field and a measure field.
1. Log in to Salesforce and open Analytics Studio.
5. You need to select a dataset and fields for a few questions, then click
“Looks good, next.”, see Figure 6-4.
However, not all dashboard templates may be suitable for our business
needs, so we may find ourselves creating blank dashboards more often.
Widgets
When you create a new blank dashboard, you will see a blank canvas with
12 column boxes and a list of icons at the left panel; see the blank
dashboard that we created earlier, “Global Accounts,” as in Figure 6-2, each
icon represents a widget that can be used in the dashboard designer for
different purposes. Let us walk through some of them and learn to use them.
Chart
The chart is the first icon from the top and is the most commonly used
widget in every dashboard. Use the chart widget to show data as a chart in
the dashboard. There are more than 30 types of charts provided by CRM
Analytics. Let us do a quick hands-on exercise to use this widget:
1. Open the Global Accounts dashboard created earlier and click the Edit
button.
2. Drag the chart widget to the dashboard designer.
6. Click the Done button and Save icon to save the dashboard.
2. Drag the table icon into the dashboard designer below the chart widget.
3. Click the “Table” icon at the center of the widget added. You may
notice that the system no longer asks you to provide a dataset; this is
because CRM Analytics remembers that you have selected a dataset
earlier and will be using the same dataset; however, if you need to
select a different dataset, click the “Back” button.
4. Even if this is a table widget, by default, we’ll get a bar chart with a
count of the number of rows; if you do not change the chart to table
mode, you will get only the number of rows in the table. To get record
details in the table, change the table by selecting Table Mode, then
Values Table.
8. To get better visibility of the table content, you can move and resize the
widget accordingly, see Figure 6-7.
Tip To have columns occupy the whole table width, from the widget
properties at the right, find the Spacing section, then set Column Width =
Fit to Widget; with this setting, the width of the columns will be auto-
adjusted when the web browser size changes.
Filter
Use this widget to make a global filter of the data displayed in the
dashboard. You can select to have a single or multiple global filters. Let’s
do a hands-on exercise to use this widget:
1. Open the Global Accounts dashboard, then switch to edit mode.
3. Select the “Single Global Filter” under widget properties on the right
panel.
4. Click the “Filter” icon at the center of the filter widget added.
5. Select the same dataset used earlier, then select a field from the selected
dataset.
7. Click the “Preview” button at the top panel to test if the added filter is
working correctly, see Figure 6-8; notice that the dashboard is no
longer in edit mode (there are no blocks in the background).
Tip You can simply hit the “e” key to switch to edit mode, hit the “e”
key again to go back to preview mode, and hit the “s” key to save the
dashboard.
Container
The container widget is useful for grouping a few widgets into a container,
so you can move them easily. You can also set the background or border
color to group multiple widgets with the same purpose.
1. Open the Global Accounts dashboard and switch to edit mode.
3. Resize the widget to be wider and occupy the whole width of the
dashboard.
5. Change the container widget background color to dark green; you can
do this by selecting the container widget, then looking for Widget Style
on the right panel, clicking the arrow under Background Color, and
selecting dark green, see Figure 6-9.
6. Hit the “e” and then the “s” key to exit from edit mode and save the
dashboard.
Date
Use the calendar widget to add a date field as a filter. You can only select a
date field for this widget.
1. Open the Global Accounts dashboard and switch to edit mode.
2. Drag the Date widget to the dashboard designer.
6. Select the widget from the right panel for widget properties, change
the widget title to “Date,” and enable “Update instantly.”
8. Move and resize the widget accordingly. I’ll move this widget to the
top-left corner, above the container created earlier, and the filter
widget next to it.
9. Click the Preview button (or hit the “e” key) to verify the Date filter is
working correctly, see Figure 6-10.
Link
Use this widget to navigate the user to
Saved Lens: Open an existing lens.
Saved Dashboard: Open an existing dashboard.
New Lens: Create a new lens based on the existing query.
URL: Open any URL into a new tab.
Page in Component: Open an existing component.
Page in Layout: Only available if there are multiple pages in the
dashboard.
Even the widget name is “Link,” it will appear as a button in the
dashboard. Let us continue with the hands-on exercise:
1. Continue with the Global Accounts dashboard and switch to edit mode.
2. Drag the Link widget to the container and drop it at the top-right
corner.
5. Destination = http://www.google.com.
8. Click the “Search with Google” link; it should open the Google website
as a new tab, see Figure 6-11.
Tip To get round corners for the link button, click the widget from the
widget properties, look for the Widget Style section, then set the border
radius to 8 or 16. You also can change the background color and border
color.
Image
As the name suggests, this widget is used to add an image to the dashboard.
It can be for a logo or other images to be embedded in the dashboard. Let’s
do a hands-on exercise:
1. Open the Global Accounts dashboard and switch to edit mode.
2. Move the Date widget to the right so we have space in the upper-left
corner for the image widget.
5. Click the Browse Files button and select the image for a logo from your
computer; image format supported gif, bmp, jpeg, jpg, png, and svg.
6. From widget properties, change the Image Scale to Fit Width or Fit
Height, arrange Image Alignment, and you also can resize the widget,
see Figure 6-12.
List
The list widget is another most commonly used widget, and its purpose is to
filter data shown in the chart or table. List values will be automatically
populated as a unique value from a selected field. Let’s do a hands-on
exercise:
1. Open the Global Accounts dashboard and switch to edit mode.
5. Select a field, and choose Account Type, then click the Create button.
7. Click the Account Type drop-down; in my case, I’ll see three options
with the radio button – you can only select one value, and there is a
number at the right, meaning the number of records for each value, see
Figure 6-13.
You can compare the visualization with the Filter widget using the
same Account Type field. Although they do similar things, the
experience is a bit different.
8. Let us edit the dashboard again; from the list widget properties, click
the Query tab and change Selection Type to “Multiple selections.”
Now, the radio button has changed to a checkbox, which means you
can select multiple values.
Number
In some cases, you would like to show numbers in the dashboard; this is
good for catching user attention, such as the total amount, the number of
open cases, etc. Let’s do a hands-on exercise:
1. Open the Global Accounts dashboard and switch to edit mode.
2. Resize the container bigger, move the table to the bottom, and chart to
the right so we’ll have space under the logo.
4. Resize the widget height to occupy three blocks’ width and three
blocks’ height.
5. Click the Number icon in the widget.
6. Let’s use the default value, which is the Count of Rows, and click the
Done button.
7. From the Number widget properties, look for the Text Style section,
change Number Size to 48, and Alignment to Center, see Figure 6-14.
Range
Use this widget and link it to a Measure field to filter dashboard data. This
widget allows users to filter data by entering from and to values or slide the
slider provided; the number will be adjusted as the user adjusts the slider.
1. Open the Global Accounts dashboard and switch to edit mode.
2. Drag the Range widget to a space at the top in the dashboard designer.
Text
In many cases, we need to inform the user about a chart added to the
dashboard; we can use a Text widget to add that information as a label; we
can also use this widget to inform the dashboard in general, including as a
dashboard title or subtitle. Apply text style and widget style to make the
widget attractive.
1. Open the Global Accounts dashboard and switch to edit mode.
2. Drag the Text widget to the empty space in the dashboard designer.
3. Look at widget properties on the right panel and modify the text to
“this dashboard contains global data”; you can change the font format,
color, and size, see Figure 6-16.
Toggle
Adding a toggle widget will allow our users to filter data easily with one
click. Only data that exists in the dashboard will appear in the toggle, for
example, you have Account Types Customer, Prospect, and Alumni, but
within a period, there is only Prospect and Customer, so your user will not
see the Alumni in the toggle. However, we can use a static step to handle
this; we will discuss a static step in the last chapter.
1. Open the Global Accounts dashboard and switch to edit mode.
6. Adjust the widget size as necessary, ideally making all values visible;
otherwise, the user will need to scroll.
Navigation
Before adding this widget, let us add a new page to the dashboard.
Remember that we can have multiple pages in a dashboard; we will discuss
pages in the next section.
1. Open the Global Accounts dashboard and switch to edit mode.
3. Enter the page name; I will enter “Page-2” and click the Add button.
5. Click the Page-1 tab, and now you will see all widgets added
previously.
8. Step 6 will add the Navigation widget to Page-1 only, not Page-2, so
select the widget:
a. Select “Add to Page” at the bottom left.
b. Click “Page-2.”
Page
As mentioned earlier, a dashboard can have multiple pages. For admins, this
is good in terms of maintaining dashboards; instead of showing many
dashboards in Analytics Studio, a dashboard with multiple pages will be
shown only as one dashboard. From the user perspective, this offers a better
experience as the user will not open the wrong or many dashboards; for
example, if we have a “main” dashboard with multiple “child” dashboards,
the system will open a new tab when clicking a link which will confuse by
having many web browser tabs opened.
However, it depends on the needs; sometimes, we must use multiple
dashboards instead of one dashboard with multiple pages. Let us go through
each use case, including when we need to use multiple pages in a dashboard
or when using multiple dashboards. We will have no hands-on exercise in
this section, but you can refer to the hands-on exercises in Figures 6-18 and
6-19 when we discussed the Navigation widget.
Sharing Widget
A multipage dashboard will offer the ability to share widgets across pages.
When you add a widget to other pages, they will share the same widget
style, meaning changing the widget style on a page will impact the widget
style shown on other pages; however, you still can shift the widget in the
dashboard designer, and this will not impact the location of the widget in
other pages.
CRM Analytics also offers the ability to unlink the widget from other
pages; select the widget and click the Unlink link above the widget to
unlink it, see Figure 6-20.
Dataset Filter
When you use a dataset across pages, and if there are filters set, the filter
selected on one page will also filter the result on other pages; this includes
faceting from other charts too. If you totally need to separate them, you
must use multiple dashboards or multiple datasets.
Dashboard Tab
One of the benefits of using multiple pages is transparency for users; the
user will not know if they are opening multiple pages because the tab and
URL are not changed, and it also does not open a new tab when users
switch across pages. Using the link widget will open the new dashboard as
a new tab so that multiple tabs will be opened.
Performance
Because the dataset was loaded when opening the dashboard, a dashboard
with multiple pages will offer better performance compared to opening
multiple dashboards.
Faceting
Faceting, which is enabled by default, is one of the most useful features in
CRM Analytics for a user to drill down and analyze data. For a dashboard
using a dataset, when the user clicks a group in a widget, the whole
dashboard will be filtered based on the selection on the widget; for
example, clicking a product in a widget will filter the whole dataset to the
specific product clicked, so other widgets using the same dataset will be
automatically filtered.
Let’s go back to the Global Accounts dashboard created earlier, edit the
dashboard, click a chart, and then click the Query tab. Notice there are two
checkboxes related to faceting:
a) Apply filters from faceting.
Both options are enabled by default. The first option is to accept filters
when other widgets broadcast faceting, and the second option is to
broadcast selection as facets to other widgets, see Figure 6-21, so if other
widgets have “Apply filters from faceting” enabled, the widget data will be
filtered based on the selection in the selected widget. You can have more
than one widget that broadcasts a facet; all selections will filter the dataset,
for example, the product is A and the region is US. However, you cannot
have more than one selection in a widget; this is different from using a List
as a filter.
Global Filter
When you need to use partial data from a dataset based on some criteria,
adding a global filter widget is the easiest option, rather than recreating a
new dataset using a dataflow or recipe, which will give us, as admins,
another item to maintain. Also, this option will save the number of rows
used by CRM Analytics because we do not create a new Dataset. This
method is also simpler than applying filters to each widget in the dashboard.
To achieve partial data usage, we should make the filter locked so our
users will see only related data in the dashboard, for example, we need to
build a Customer dashboard, but our dataset is combined between Customer
and Prospect, so we can add a global filter to filter only customers, then
lock the filter.
When the dashboard is added with the filter widget, in the dashboard
edit mode, notice the number in the filter icon is no longer zero (located at
the upper right, next to the layout drop-down), but tell us how many filters
were added, see Figure 6-22. You can add multiple filters into a global filter
panel as explained in the hands-on exercise earlier; check out Figure 6-8.
Tip To lock a filter widget, click the filter icon next to the layout drop-
down, click the pencil icon after the field name, enable “Locked”
properties, see Figure 6-23, and click the Apply button. Once the filter is
locked, notice the keypad icon in the filter widget.
Figure 6-23 Locked a filter widget
Tip To add values to the filter widget, make sure the field is not locked
in the Global Dashboard Filters. In dashboard edit mode, click the arrow
button at the upper-right corner and select Pick Initial Values, select the
filter widget, select values to filter, click the Apply button, click the
Done button, and then lock the field.
Name Target
Dennis Howard 10
Irene McCoy 20
Kelly Frazier 15
6. By default, it will auto-select the last dataset used; since we are going
to use a new dataset, click Change Data Source at the top right of the
window.
7. Select the Target Dataset just created and select a field; for this
scenario, select Name.
8. Click the Create button and change the widget title to Target.
10. Change the bar length to Sum of Target and click the Done button.
11. Now, let us connect the dataset; click the arrow button at the upper-
right corner and select Connected Data Sources.
12. Click the New Connection button.
13. Enter Connection Name = Sales Name and select a field for both data
sources – Data Source 1: User.Name; Data Source 2: Target:Name,
see Figure 6-24.
17. When selecting a Name from the Account owner widget, the Target
will be updated as in the Target dataset, see Figure 6-25.
Summary
In this chapter, we discussed everything a dashboard builder needs to know
to build a dashboard from scratch in CRM Analytics. We started with the
permissions needed for the user to build a dashboard. Layouts and
templates are something that a dashboard builder should know and make
use of when building a good dashboard.
We discussed widgets available in CRM Analytics, including hands-on
exercises for most of the widgets. Then, we looked into building a
dashboard with multiple pages, and we explained the benefits of using
multiple pages in a dashboard.
We discussed how faceting works across widgets, and faceting is one of
the most frequently used features in analyzing data in the dashboard. Then,
we shared how to use global filters in a dashboard; with global filters, we
can use only partial data of the dataset and lock it according to the
dashboard’s purpose.
We ended with a hands-on exercise to use and connect multiple datasets
in a dashboard. In the next chapter, we’ll discuss how to explore and make
use of a dashboard to analyze data.
OceanofPDF.com
© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2024
J. Yu, Getting Started with Salesforce CRM Analytics
https://doi.org/10.1007/979-8-8688-0479-3_7
7. Exploring Dashboard
Johan Yu1
(1) Singapore, Singapore
6. Query Details will show all queries and the time needed for each query
on the current dashboard page. You can sort the table by clicking the
Header and clicking each query to get the details:
Datasets: Dataset used for query and when the last data refresh.
Filters: All filters impacted that query, including broadcast from
other widgets and Global Filter.
Dimensions: All fields used related to the query.
Measures: All fields used and the aggregation, such as sum, count,
etc.
Last Run Metrics (ms): This includes metadata, waiting, and query
in milliseconds.
If you add a filter to the dashboard, the preceding value will be updated
immediately. The information here is similar to selecting “Show Details”
from a widget.
Additionally, there are two more icons on the upper right, see Figure 7-
2:
View Performance Details: This will tell the dashboard builder if any
data manipulation is not optimal.
View More Details: Use this feature if you need to debug the query.
Original Query
Final Query
Result
In this window, we see how a compact form query is translated into
SAQL and what the result from the query is.
4. Hover your mouse over the widget edited in step 2, click the arrow
icon, then click “Set Notification.”
5. Depending on the operator used for that widget, for example, count,
sum, average, etc., it will be used as the criteria, then select the operator
and value threshold.
6. Next, you should be notified only once if the threshold value is met or
every time when the schedule runs.
9. Once added, notice a number in a blue square appears when you have
the Notifications panel open.
10. The notification details from status, last modified, and criteria will be
shown in that panel.
11. Now go to the Analytics Studio main page and click the Notifications
tab; you will see all notifications that you have set up from all
dashboards and the status of whether the criteria have been met, see
Figure 7-4.
Figure 7-4 Monitor all notifications
12. Once the conditions are met, the user will get the notifications in the
Lightning bell notification (see Figure 7-5), as well as email and the
Salesforce mobile app.
Note If the query is built on the binding for a dynamic chart, you
cannot set a notification for that widget. For Notification on the value
table, you can select any Measure column added to the table.
Figure 7-5 Notifications in Lightning
Annotations
With the annotation feature, you can annotate dashboard widgets with
comments posted in the dashboard and Chatter. You can hold conversations
about the widget, including posting a screenshot of the whole dashboard.
Similar to Chatter, you can mention someone’s name or a Chatter group
name to get their attention on the post, and other users can comment on the
Annotation.
Different from notifications, Annotations are available on more widgets,
such as Toggle and Text widgets. You must enable “Show widget actions”;
otherwise, the arrow menu will not be available when your users hover the
mouse over the widget.
Once the post is considered done, you can select Resolve in the
annotation post, and the Annotation will be moved under the Resolved tab.
Also, you can reopen the annotations when needed. You can add as many
annotations as you need in a widget.
Following Annotations
Notice the Annotations icon on the CRM Analytics dashboard, see Figure 7-
6. Click this icon to show all Open and Resolved annotations for a
dashboard. Clicking the + Follow button will allow you to receive all posts
on the dashboard. Similar to Chatter in a record, when you follow a
dashboard, you will get a notification if someone annotates the dashboard.
Hands-On Annotations
1. Open Analytics Studio and open the Global Accounts dashboard built
in the previous chapter.
4. Hover your mouse over the widget edited in step 2, click the arrow
icon, then select “Annotate.”
8. Verify the Annotation is created under the Open tab and also in the
mentioned user’s Chatter feed, see Figure 7-7.
9. Click the arrow and select Resolve to move the Annotation from the
Open to Resolved tab.
Share Widget
When exploring a dashboard, users can share the Chart, Table, and Number
widgets. Hover the mouse over the widget and click the arrow drop-down,
see Figure 7-8.
Note The arrow drop-down is only available for the widget when
“Show widget actions” is enabled.
Figure 7-8 Share action from a widget
There are three tabs under the Share action: Post to Feed, Export to Quip,
and Download, see Figure 7-9.
1. Post to Feed
Post the widget as an image to the Chatter feed:
Users can share the widget as a Chatter post to a user feed or a
Chatter group.
Add comment for the post (this is optional).
The widget will be shared as an image.
Because this is a chatter feed, the image will be visible to all users
who have access to it.
2. Export to Quip
If your organization is using Quip, you can publish the widget as a
Quip document.
3. Download
From here, users can download the widget as
Image (PNG format)
Excel format
Excel format with metadata: This one will include the dashboard
title, timestamp, generated by, filtered by, grouped by, etc.
CSV format: This is useful when you need to get the raw data for a
table widget.
Show Details
From a widget dropdown menu, the Show Details action will show detailed
info of a widget, such as the dataset used, filters applied, dimensions and
measures field, and last run metrics (ms). Show Details is similar to
Dashboard Inspector, where it shows all the queries available on the page;
click a query, and the details will be shown.
While the Show Details action shows the same information as if we
click a query from Dashboard Inspector, sometimes we do not know easily
which query is related to a widget. So, clicking “Show Details” from a
widget will guide us precisely to the query name that powers the widget,
including all information related to the widget, see Figure 7-10.
This action is most useful for dashboard explorers to analyze data
shown in the widget, including dashboard builder, to make sure the widget
shows the correct data, for example, not using the wrong dataset, wrong
filters, etc.
Explore
Similar to previous actions, the Explore action is only available for the
Chart, Table, and Number widgets. In addition to enabling the “Show
widget action,” the “Show explore action” must also be enabled. But in
some scenarios, you may need to turn off the Explore action, so users will
not be able to explore and download the data.
When exploring a widget, CRM Analytics will create a new lens, and
the user can analyze it from the Lens, including changing chart type,
changing table mode, adding filters, and editing with SAQL. If users need
to store the modified Lens, they can store it in their private app or public
app when the user has editor or manager permission for the app. However,
unlike standard Salesforce reporting, the Lens created here will not impact
the dashboard or widget in the dashboard.
4. Hover your mouse over the widget edited in step 2, click the arrow
icon, and then click “Explore.”, see Figure 7-11.
Figure 7-11 Exploring a widget
6. If it is a bar chart, you can change the grouping by changing the fields
under Bar, or you can add another level of grouping.
7. Optionally, you can save the Lens to your private app or to a public app
to share with your team.
8. You can perform all features offered by Lens, such as Clip to Designer,
present, save, share, and clone. We have discussed this in Chapter 5.
In case you need to export data in the widget to an Excel or CSV file,
you can use the same method as shared in Chapter 5: open the widget as
Lens, change the format to the table (if necessary), click Share and then
Download, then select to download as Excel or CSV format.
Figure 7-12 Comparison edit query for SAQL and standard query without SAQL
Embedding CRM Analytics Dashboard to
Salesforce Lightning Page
As discussed in the previous chapter, to explore the CRM Analytics
dashboard from Salesforce, users need to open the Analytics tab and find
the dashboard to explore. However, for some scenarios, it would be great if
a user is able to access the dashboard on the Lightning record page, app
page, and Home page.
Similar to accessing the dashboard from the Analytics tab or Analytics
Studio, the user needs to have a CRM Analytics license to view the
dashboard from the Lightning page.
When you embed a dashboard, the whole dashboard will be shown; you
cannot just show a widget. To enable the dashboard sharing from Lightning,
the CRM Analytics component must have a minimum height of 612 pixels.
For widgets with the Explore action enabled, users will be able to explore
the widget from Lightning. Explore will open Analytics Studio and create a
new lens. Faceting and filtering will work as normal.
To add a CRM Analytics dashboard to a Lightning page, your
Salesforce system admin just needs to drag the “CRM Analytics
Dashboard” component to the Lightning page. Once added, there are a few
options that can be configured:
Dashboard Name: Select a CRM Analytics dashboard that has been
prepared, and make sure the dashboard and dataset are stored in the app
that is accessible to the users.
Height: This is the component height in pixels.
Filter: This is optional but most useful when we need to auto-filter the
dashboard based on the record ID.
Show Sharing Icon: This can only be enabled when the component
height minimum is 612 pixels.
Show Tile: To show/hide the dashboard title.
Show Header: To show/hide the header, which includes the title, dataset
last refresh, and Analytics Studio icon.
Open Links in New Windows: If there is a link in the dashboard,
clicking this will open the target as a new window.
Hide on Error: To show/hide if an error occurred in the dashboard.
Enable Notifications: If this is enabled, clicking the arrow at the widget
will have the Set Notification option.
Enable Subscriptions: If this is enabled, clicking the arrow at the
number widget will give you the Subscribe option.
Set Component Visibility: This is a standard Lightning component
feature if we want to show the component just for a group of users, such
as profile or record values.
Figure 7-13 A recipe pulls data from Account, Opportunity, and User objects
3. We’ll not go through the steps of creating the recipe and dashboard, as
we already covered them in previous chapters. Check Figure 7-14 for a
sample of the dashboard; you can create your own Opportunity
dashboard, but make sure the fields mentioned earlier are included in
the recipe. Let’s name the dashboard “Current & Next Quarter
Opportunities.”
4. Let’s embed the dashboard into the Lightning Home page. Navigate to
the Lightning Home page and click “Edit Page” under the gear icon on
the upper-right screen.
7. Click the Save button, then the Back button; if this is your first time
editing the Home page, you need to click the Activate button, then
Assign as Organization default.
8. You should be able to filter and facet the dashboard as you open it from
the Analytics tab, but note that the Share and Annotate actions are not
available here. Figure 7-15 show Lightning Home page with a CRM
Analytics dashboard embedded.
3. Modify the dashboard accordingly; for this dashboard, let us remove all
the filters, as the dashboard should show all opportunities for the
Account, see Figure 7-16.
4. Open an Account record where you want to embed the dashboard, then
click “Edit Page” under the gear icon at the upper-right screen.
7. Make sure “Filter Builder” is selected, then click the “+ Add Dashboard
Filter” button.
Select the dataset
Dataset Source Field: Account ID
Operator: Equals
Object Field: Account > Id
8. Click the OK button, click the Save button, then the Back button; if this
is your first time editing the Account Lightning page, you need to click
the Activate button, then Assign as Organization default. Figure 7-17
show a Lightning Account page with a CRM Analytics dashboard
embedded and filtered by the Account opened.
Figure 7-17 Account Lightning page embedded with the CRM Analytics dashboard
In the same way, you can embed the CRM Analytics dashboard into any
other Lightning pages without the need to write any script.
You can also embed a CRM Analytics dashboard into the Lightning app
page, where the app page can be used in both web browsers and mobile
apps.
Summary
In this chapter, we discussed everything about exploring a dashboard. We
started with Dashboard Inspector; dashboard explorers can use this tool to
understand the widgets, and dashboard builders can use this tool to debug
dashboard widgets, analyze queries, and optimize dashboard performance.
Next, we learned how to set notifications on widgets; this notification is
personal and will not impact other users; we’ll get notifications once all the
criteria defined are met. Annotation is the following action; we can use it to
collaborate with our team in discussing business metrics shown in a widget.
Annotation directly integrates with Chatter; users can set the Annotation as
resolved so it will not appear as an Open tab.
We discussed the Share action, which is sharing the widget as a Chatter
feed or downloading the widget as an image, Excel file, or CSV file. The
Explore action, as it is named, is very useful for users to explore the widget
as a lens; all existing filters from the dashboard will be automatically added
to the Lens.
Embedding CRM Analytics dashboards to the Salesforce Lightning
page is another great feature, so the dashboard can easily be accessed by
Salesforce users from Lightning Home, record, and app pages or show data
related to a record.
Next, in Chapter 8, we will learn how to set security to the dashboard
and the data, so stay tuned!
OceanofPDF.com
© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2024
J. Yu, Getting Started with Salesforce CRM Analytics
https://doi.org/10.1007/979-8-8688-0479-3_8
8. Applying Security
Johan Yu1
(1) Singapore, Singapore
This chapter will discuss all aspects of security that can be implemented in
CRM Analytics. Same as other reporting tools, you always need to secure
access from multiple points of view, for example, hide a particular
dashboard from all users and only make it visible to a specific group of
users, or make the dashboard visible to users but not allow them to edit it.
In CRM Analytics, we can use Apps to control dashboard visibility.
For a more advanced technique, you can show the dashboard result
based on who the user is, so everyone will not see the same result in a
dashboard; this is controlled in the Dataset.
But before looking at Apps and Dataset security, we can also control the
basic permissions for the user, which are things that a user can do in CRM
Analytics in general. Hence, this is a blanket permission given for that
particular user. For example, users are not allowed to download data from
CRM Analytics or upload external data to CRM Analytics. This permission
is controlled under the Permission Set.
In this chapter, we will learn the following topics:
Permission Set Assignment
Apps Level Sharing
Security Predicate
Sharing Inheritance
Security Predicate
A security predicate is a filter condition that defines row-level access for
users to a dataset, and it is defined in the Dataset. Every time users access a
dataset (including those from the Dashboard or Lens), the system checks
the running user details to compare them with the security predicate defined
in the Dataset. You can use any fields in the Salesforce user object, such as
Profile Name, Role ID, User ID, and Department, or you can also create
custom fields.
The security predicate is not configured in Salesforce, so it will also
work for datasets that do not originate from Salesforce. The security
predicate will check running user detail with the Dataset; in some cases, we
may need to add additional columns in the Dataset, for example, as an
exception to let a profile have visibility to all data in the Dataset, no matter
what the Profile is – in this case, the Profile is defined in the security
predicate.
Syntax
The following syntax is fixed; you cannot put the dataset column after the
operator; it will not work.
Note The security predicate does not support using IN or comma, for
example, if you have multiple profiles that need to see all rows, you need
to have multiple fields for each Profile, for example, ‘Region’ ==
“$User.Region__c” || ‘View_All_1’ == “$User.ProfileId” || ‘View_All_2’
== “$User.ProfileId” .
Hands-On Security Predicate
In this hands-on, you will see the use of a security predicate to limit record
visibility. We will use the Department field in the Salesforce user detail to
set record visibility:
1. Open Analytics Studio.
2. Create the Dataset from CSV files; you must change the View_All
value in Table 8-1 to a valid Profile Id in your Salesforce organization.
If you are unsure about the Profile Id, check with your Salesforce
administrator; the ID should have prefix 00e.
Table 8-1 Load This Table As a New Dataset and Name It “Top Account”
Note: You must use 18 characters instead of 15 characters for the ID.
3. Find the Dataset created, click the Dataset to open it, and verify that the
data loaded is correct; you should see six records.
4. Back to the Analytics Studio, find the same Dataset, click the arrow at
the far right, and select Edit.
5. Click the pencil icon under the Security Predicate, and enter
‘Department’ == “$User.Department” || ‘View_All’ ==
“$User.ProfileId”; click out from the box to exit and then click the “Got
It” button from the pop-up window.
6. When you click the mouse out of the Security Predicate box, the
system will auto-check and reject if the security predicate syntax is
invalid, such as “$User.Department” == ‘Department’ (wrong order),
and if the field does not exist, such as ‘Department ==
“$User.UserDepartment” (the UserDepartment field does not exist in
the User object). However, the system will not validate and not reject if
the column name in the Dataset does not exist, such as
‘UserDepartment’ == “$User.Department” (the UserDepartment field
does not exist in the Dataset).
7. If the syntax check is passed, the security predicate will be saved
automatically.
8. Change your Department in your Salesforce user detail to Sales, see the
result in Figure 8-2.
9. Back to Analytics Studio and open the Top Account dataset again; now,
you should only see three records.
11. Now, log in as a user with the Profile as in step 2, and open the
Dataset again; it should show six records because we made the Profile
ID the exception, see Figure 8-3.
Figure 8-3 Security Predicate filter with exception
Figure 8-6 Output to the Dataset with fields from the flatten transform
Sharing Inheritance
As you see in the security predicate, we defined row-level security based on
criteria we defined in CRM Analytics, and this has no relationship with
Salesforce record security. Sharing Inheritance will give us the ability to use
the same row-level security defined in Salesforce; this includes object
sharing, role hierarchy, manual sharing, team sharing, and sharing rules
added for the object.
Sharing Inheritance sounds perfect for Salesforce customers to set data
visibility as defined in Salesforce; however, Sharing Inheritance has
limitations; it only works for five standard objects:
Account
Case
Contact
Lead
Opportunity
Additionally, if the record access is granted by more than 3000 sharing
descriptors, Sharing Inheritance will not work, and the backup security
predicate will take effect. But users with the “View All Data” permission
will be covered by Sharing Inheritance. You can use “Sharing Inheritance
Coverage Assessment” from the Salesforce setup menu to evaluate the
user’s eligibility to use Sharing Inheritance.
Sharing Inheritance is defined in the Recipe on the output node when
creating a Dataset.
Configure Recipe
Let us create a very straightforward Recipe with two nodes, see Figure 8-7:
1. Input: This is to get data from an object.
Figure 8-7 A simple recipe to get data from Salesforce and store it in a Dataset
Figure 8-9 shows the Opportunity object (as my example) can use the
Sharing Inheritance. However, it does not mean that it can cover all CRM
Analytics users.
To evaluate user coverage, click the View User Coverage button;
depending on the number of CRM Analytics users that you have, the
process can take some time, see sample result in Figure 8-10.
9. Advanced Topics
Johan Yu1
(1) Singapore, Singapore
Congratulations, you’ve reached the last chapter of this book. By now, you
know what a Dataset is, how to import data into CRM Analytics, enable
data sync with Salesforce, work with dataset, explore dataset with lens, how
to build a dashboard from scratch, create a simple recipe, explore the
dashboard with features offered, and also learned on security
implementation.
In this chapter, we will learn a few techniques that we may face when
creating a dashboard in CRM Analytics:
Edit Attributes, Drop Columns, Custom Formula, and Filter
Augment node with multiple value lookup
Real-time data pull from Salesforce with SOQL (Salesforce Object
Query Language)
JSON
SAQL (Salesforce Analytics Query Language)
Binding
Recipe Nodes
In Chapters 3 and 7, we have hands-on building simple recipes with nodes:
Input
Output
Transformation
Join
We have also discussed each node in Chapter 3, section “Data
Transformation in Recipe,” so we will not repeat them here. But let us see a
few features and scenarios that can be performed in the Transform node.
Edit Attributes
Scenario: Create a recipe with join nodes for Opportunity, Account, and
User, which gets an Opportunity owner and Account owner (Figure 9-1).
Figure 9-1 Recipe with input nodes of Opportunity, Account, and User
If you look at the dataset label result, there are duplicate field names,
such as Owner ID, Account ID, User ID, and Full Name (Figure 9-2).
Figure 9-2 Recipe with duplicate names
As a dashboard builder or data analyst, it is never good to have
duplicate field labels. For this scenario, we can add a Transform node using
Edit Attributes to change the field name; let us do a quick hands-on
exercise:
From the last node before Output, add the Transform node.
Click the new node added, then from the Preview or Columns tab, click
the field that we want to relabel, then click the “Edit Attributes” icon.
Change the label, for example, from Owner ID to Opportunity Owner ID,
and click the Apply button.
Perform the same for other fields so it is clear without duplicate labels.
See Figure 9-3 after the field name updated with Edit Attributes.
Update the recipe by adding a Transform node to edit the attributes, see
Figure 9-4.
Figure 9-4 Recipe with a Transform node
Drop Columns
Let us continue with the preceding recipe if you notice that we still have
duplicate labels: the Account Owner ID and Opportunity Owner ID. The
API Names are different, which explains how the data is transformed.
However, do we need both similar fields? It is always a best practice to
remove unnecessary items to keep the dataset clean.
For some scenarios, you may want to keep the field, but for this
exercise, let us remove the Account.Owner.Id and Owner.Id fields.
Using the same recipe, let us add Drop Columns transformation in the
same Transform node; we can rename the node to “Transform” since the
node is not only Edit Attributes.
Click the Transform node.
Switch to the Columns tab and look for Owner.Id, then click the “Drop
Columns” icon, which is next to the Edit Attributes icon. Leave Drop
selected and click the Apply button.
Repeat the same for Account.Owner.Id.
Here is the updated result of our dataset, see Figure 9-5; nothing has
changed in the recipe layout.
Figure 9-5 Remove unnecessary fields with Drop Columns
Custom Formula
I want to say this is the most essential item in a recipe. With the Custom
Formula in a recipe, you can create new calculated fields in the dataset
based on some logic, including from existing fields, without the need to
change the data source. It would be a good practice to standardize new
fields created using a Custom Formula, as we may have many fields created
using this method.
Scenario 1: For Accounts with Billing Country = USA or Canada and
Type <> Customer, show them as “Yes,” and the rest as “No.”
Let’s do a quick hands-on exercise:
From the Account input node, click the “Change columns” button and
add the Billing Country field.
Click the Transform node and look for the formula (fx) icon; select
Custom Formula from the drop-down.
Enter the following formula, see Figure 9-6:
At the left panel, scroll down and change the Column Label and API
Name to “Target.”
In Output Type, select Text, and click the Apply button.
Figure 9-6 Formula editor
Scenario 2: Look for the latest opportunity created for each Account and
mark it with Latest Opportunity = Yes. In this scenario, the formula will
scan data across many records with the same partition value defined.
Use the same recipe:
From the Opportunity input node, click the “Change columns” button and
add the Created Date field.
Click the Transform node and look for the formula (fx) icon; select
Custom Formula from the drop-down.
Enable the “Multiple row formula” switch at the upper right of the
transformation panel.
Enter the following formula:
Filter Node
In Chapter 3, we discussed the Filter node, where we can use a simple filter,
add filter logic, and use Custom Expression.
Let us have a quick hands-on exercise using Custom Expression to
filter:
Hover over the Transform node, click the small icon at the right, and
select filter from the drop-down menu.
Click the arrow at the upper right of the Filter panel and select “Add
Custom Expression.”
Now, you should see an editor where you can type in criteria for data to
be selected; data that does not match the criteria here will be filtered out.
We can use “fields” created in the Transform node in the section “Custom
Formula”; let us enter Latest_Opportunity = 'Y'.
Click the Apply button.
Now, we need to break the link between the Transform and Output
nodes; click the arrow between these two nodes, and select Delete (the last
option), see Figure 9-8.
To link the Filter node to the Output node, simply drag from the plus icon
next to the Filter node to the Output node and select Connect Nodes, see
Figure 9-9. You must delete the link earlier before you are able to link the
node.
Figure 9-9 Connecting nodes
Append Node
Use Append to combine data from two nodes; you can map the fields
between the first and second nodes; if the fields are different, the fields in
the second node will be removed.
Another option is to enable “Allow disjoint schema.” Prior to enabling
“Allow disjoint schema,” the “Map all column” option must be enabled;
otherwise, you will not see the option for “Allow disjoint schema.” CRM
Analytics will auto-match the fields with the same name and add new fields
if no matching field is found. The fields with no matching will have null
values for unmatched nodes; see the example in Figure 9-10.
Figure 9-10 Append result with “Allow disjoint schema” enabled
From Figure 9-11, the Account is the granular record, and Opportunity is
the child. An Account may have zero, one, or multiple opportunities.
Because we enable “Look Up Multiple Values,” CRM Analytics will pull all
opportunities and store them into a field so that the Opportunity ID may
have multiple values; see the last row in the figure.
Hands-On
In this scenario, we need to show open opportunities from Salesforce, group
by Stage:
1. Open Analytics Studio.
3. Drag a Chart widget to Dashboard Designer and click the Chart icon
at the center.
4. Click the Salesforce Object tab, then find Opportunity and select it.
5. In the query, click + under Bars, select Stage, and add filter Closed =
false.
7. Drag the Table widget and perform the step as the chart widget.
8. Change to Table mode and select Values Table to show the data.
11. Now you should see the dashboard as shown in Figure 9-12.
Figure 9-12 Dashboard with widget query data from Salesforce directly
Note
Every time the dashboard opens or the browser refresh or the “Return
to Initial View” button (next to the dashboard title) is clicked, it will
pull data from Salesforce, so it is live data.
As in Figure 9-12, when you click a stage from the chart, the selection
will broadcast and facet by other widgets that query from the same
object or child objects.
JSON
JSON stands for JavaScript Object Notation and is commonly used in data
interchange language; however, we are not going to discuss JSON in depth
in this book. But as you have read earlier in this book, we mentioned JSON
many times. So, what is the relationship between JSON and CRM
Analytics? Most CRM Analytics assets are stored in JSON format.
Although JSON is a subset of the JavaScript programming language, the
good thing is that it is pretty friendly to human eyes; we do not need an
extra tool to generate or decode it.
If you make changes in JSON manually, when you hit Done, the system
will check if the JSON format is valid; otherwise, it will prompt for
“Invalid JSON”; you may delete or add a comma or quote, etc., to fix it. If
you cannot find the issue, you can copy and paste it into a text editor (such
as Notepad++) as a backup, then hit the Cancel button to redo and edit the
dashboard JSON.
You may also see the “Invalid JSON” error with some messages, which
may be caused by some dependency issues or missing items, such as a step
or query is deleted or renamed but is still used in a widget, see Figure 9-14;
manually renaming a step in JSON mode will not rename the step in the
widget automatically; therefore, the system will not exit from JSON mode
as well.
Figure 9-14 Invalid JSON error
Recipe
When we build a recipe using the graphical interface and produce the
nodes, CRM Analytics will store it in JSON format. You can download the
recipe into a JSON format file on the local computer (see Figure 9-15),
open the file with a text editor to edit the JSON, and upload it back to
overwrite the existing recipe.
It is always best practice to back up the original JSON file downloaded
before making changes, then store the updated file as a new JSON file.
Figure 9-15 Upload and download recipe as a JSON file
Ideally, you do not need to update the recipe in JSON manually; however, it
would be useful and faster to edit the recipe JSON for scenarios, such as
mass adding fields to multiple nodes or removing fields that no longer exist.
Another scenario for downloading a JSON file is to back up a working
recipe locally.
Dataset
The Dataset’s Extended Metadata File is also stored in JSON format. You
make changes to the dataset metadata by exploring the dataset and editing
the field, such as changing the number format; the changes will be stored in
the Extended Metadata File.
To download the Extended Metadata File, edit the dataset (not explore),
and look for the Extended Metadata File at the upper right (see Figure 9-
16), download the file to your local computer, then use a text editor to open
and change the JSON file. You can replace the Extended Metadata File by
uploading the edited JSON file.
As mentioned earlier, it is always a good practice to back up the original
JSON file before making any changes.
SAQL
Same with JSON, we have discussed SAQL many times in this book. While
JSON is used in CRM Analytics to store dashboards and other configuration
items using industry standard format, SAQL is CRM Analytics’ proprietary
query language. If you come from a Salesforce developer or technical
background, please do not relate SAQL with SOQL, SOSL, or SQL.
SAQL stands for Salesforce Analytics Query Language. CRM Analytics
uses SAQL to query the dataset and produce the result in the widget for a
dashboard or lens. When you build a widget with clicks in the dashboard
designer, CRM Analytics builds the SAQL at the back end. You can see the
query by clicking Show Details from the widget, then selecting the “View
more details” icon and the “Final Query” tab, see Figure 9-17.
2. Click the number widget and click the pencil icon at the bottom to edit
the widget.
3. Click the Query Mode icon at the upper right of the lens window. You
should see something similar to JSON as follows:
q = load "Open_Opportunities_more_than_0";
q = group q by all;
q = foreach q generate count(q) as 'A';
q = limit q 2000;
q = load "Open_Opportunities_more_than_0";
q = filter q by 'StageName' == "Closed Won";
q = group q by all;
q = foreach q generate count(q) as 'A';
q = limit q 2000;
5. Click the Run Query button; you should now see the result change to
show only the count of Closed Won opportunities.
6. Click the Update button, and the widget will be updated with SAQL.
Because the widget has been updated using SAQL, we are no longer
able to configure the widget using a click, but we have to use SAQL.
If you go to the dashboard JSON by pressing Ctrl+E or Command+E,
you will find the SAQL for the query that is used by the widget:
4. Click the “Create Custom Query” link at the bottom left of the window,
see Figure 9-18.
5. This exercise depends on your dataset fields, but for this sample, I will
enter the following details:
a. Change the label at the center from “New Custom Query” to
“Static_Group.”
7. Notice that a new static query called “Static_Group” has been added.
9. Drag the static query created to the toggle widget; now you should see
two values in the toggle: Account Type and Stage.
10. Select the widget, click the Query tab at the right, and select “Single
selection (required).”
13. Select an Opportunity dataset and it must have the Account Type and
Stage fields.
17. Switch the dashboard to preview mode, but when you click the toggle,
the chart grouping is not changed because we have not linked the
toggle with the chart. Next, we need to create a binding for the chart
to use the value from the selected toggle.
18. Switch back the chart to edit mode (hit the “e” key), click the chart,
and click the “Advanced Editor” button below the Widget tab.
19. Under the Widget tab, look for “columnMap” under that widget, and
delete the whole group of columnMap, as columnMap does not
support binding.
20. Click the Query tab and do the same to delete the whole group of
columnMap.
21. On the left panel, select Source Query = “Static_Group_1” and Source
Data, as shown in Figure 9-21, and Interaction Type = “Selection.”
Figure 9-21 Advanced Interaction Editor
23. Click the Save button, and it will go back to the dashboard edit mode.
24. Hit “e” to switch to Preview mode. Now, let us try to change the
toggle to Stage, and you should see the chart now grouped by Stage,
see Figure 9-22.
Figure 9-22 Binding in action
25. Notice that “Modified” and an arrow appear next to the dashboard
title; this is the same when you filter or facet from the widget. You can
click the arrow to restore to the initial selection.
Widgets
We discussed most of the widgets available in CRM Analytics in Chapter 3,
but there are three more that have not been discussed, which are newer and
considered more advanced.
Input
There are a few settings that you can set for the input widget:
Input Type: Slider or Freeform Input
Display Format: None, Percent, Currency
Minimum Value, Maximum Value, and Start Value
Input Style
Different from other widgets, when you add an input widget, it will not
ask to link to a dataset. How to use this widget? Let us do a quick hands-on.
Scenario: Calculate a formula based on the number of rows divided by
two times the input value.
1. Create a new blank dashboard.
c. Start Value = 10
7. Select the input query that was created in step 2, then click the Add
button.
9. You can add the Column Header, for example, Formula Result. Under
the formula, enter A/(2*B); note that A = Count of Rows and B =
value from the input widget. Click the Apply button, then the Update
button.
10. Add another number widget; do not create a new query (click 123
Number in the widget), but drag the query created in step 3 to this
new number widget.
11. You will see the same label and value as the existing Count of Rows
widget; look at the right “Measure Field” and change the drop-down
value from Count of Rows to Formula Result, then also change the
Title to Formula Result.
12. Click the Preview button to test; as you drag the slider, the formula
result will be updated, see Figure 9-24.
The input widget can also be used in SAQL and binding, so that the query
result is filtered based on the selected input value.
Repeater
The concept of the Repeater widget is to show a query result as an
individual value. There are two areas to configure for a repeater widget:
1. In the widget itself, configure the “Items per row.”
2. Add a repeater widget and click the Repeater icon at the center of the
widget.
3. The system will create a query; for this example, I will group by
Account Name and change the Bar Length to the Sum of Amount.
4. Click the Done button, and we will be in the Editing Repeater Content
window.
6. Add a Text widget, remove the default “Add text…,” click the “Add
Query Data” button, select Account Name from the “Dynamic Text
Field,” and click the Done button. To make it look better, change the
text color to dark red; you need to select the [Account_Name], then
select the color.
7. Add a Chart widget to the repeater content; change the chart widget to
occupy the whole repeater, which is three boxes in width with four
boxes in height; and change the chart type to Gauge. Notice that the
available charts here are fewer than the standard chart widget.
8. Set the Title = Total Amount, Title Font Size = 12, Range Values Min
= 0, and Max = 1,000,000.
9. Under the Gauge panel, uncheck “Show band range” and “Show band
label.”
10. Click Done at the upper-right corner to exit from the repeater content.
11. Resize the repeater content to occupy the whole dashboard width.
13. Here is your result, and you can switch to preview mode, see Figure
9-25.
Component
The Component widget is different from other widgets, where usually a
widget is only built within, and for a dashboard, however, a Component can
be used in multiple dashboards. So, you create a “mini dashboard” that
contains a collection of widgets and reuse it.
When you update a component, it will update all dashboards that “use”
the Component; by using the Component, the dashboard builder can
maintain dashboards more easily.
Let’s have a quick hands-on session using the Component widget.
Scenario: We need to create two similar dashboards, one for managers
and one for team leads; the one for managers needs to have additional
widgets.
1. From Analytics Studio, create a new Component, see Figure 9-26.
8. Select the “Won Opportunity” Component and click the Done button.
10. Drag a toggle widget to use the same dataset and group it by Account
Type.
Now, if you click the toggle widget, it will filter charts inside the
component, and the same thing happens when you click the chart inside the
component; it will filter other widgets, even if they are not part of the
component, but using the same dataset, see Figure 9-28.
For the other dashboard for managers, switch the existing dashboard to edit
mode, clone the dashboard by clicking the arrow at the upper-right corner
and selecting “Clone in New Tab,” rename the dashboard to “Dashboard for
Manager,” and add more widgets as needed for the manager.
When you edit the Component, both dashboards will be updated, which
makes it simpler and easier to maintain the dashboards.
Summary
Now, we have reached the end of this chapter, which is also the end of this
book. I believe that by now, you have gathered basic skills in CRM
Analytics and the ability to build powerful dashboards for your clients or
your employer.
CRM Analytics is becoming popular as it is integrated well with
Salesforce and also has the ability to get data from external sources. With
Salesforce reporting and dashboard, you can only build a simple dashboard
with many limitations; however, with the CRM Analytics platform, the
power is limitless; you can build dashboards as per your creativity and also
give your users the power to analyze, and slicing data easier with
outstanding performance.
The more dashboards you build and the more challenges you face, the
more skill you will acquire; practice makes perfect.
One more thing before ending this book: The CRM Analytics
community is very powerful and massive; currently, it has more than 73,000
members. I would advise you to join the community:
https://trailhead.salesforce.com/trailblazer-
community/groups?tab=all. Click Log In with your Salesforce
credentials, and search for CRM Analytics. There is a lot of information on
Groups, from new features in every release, or you can ask questions about
the technical issues or best practices, and you can also answer questions
from other community members.
I wish you all the best in building awesome dashboards by applying the
new skills acquired, and see you around!
OceanofPDF.com
Index
A, B
Analytics Studio app
Application programming language (API)
C
Comma-separated values (CSV)
browse tab
dataset
fields panel
field type
mapping/reference
pencil icon
Sales Rep Quota
upload file button
CRM Analytics
analytics tab
components
apps
architecture
dashboards
dataset
lens
concepts/data integration
CSV files
dashboard
See Dashboard
dashboards
data manager
dataset
data sources
See Data sources
data visualization
definition
environment
JSON format
lens
license information
lightning page
mobile app
permissions
recipe
reports/dashboard features
Salesforce
See Salesforce platform
security
step-by-step instructions
Studio user interface
Customer relationship management (CRM)
See CRM Analytics
D
Dashboard
data source connection
exploring
See Exploring dashboards
faceting options
global filter/filter properties
layout
multiple datasets
pages
adoption/maintenance
dashboard tab
dataset pages
performance
sharing widget
templates
time series template
user permission
widgets
chart
container
date field
filters
image widget
link
list widget
navigation
number
queries
range
record values/compare/pivot table
text style/widget style
toggle
Dashboards
binding/custom query
binding
Custom Query
designer/field
details
interaction editor
preview mode
toggle and chart widgets
widgets
component
gauge charts
input
query
repeater
Dataflow
conversion
older version
save/run button
source information
Wave/Einstein Analytics
Data Manager
accessing data
connections tab
data assets
data usage
external data
jobs monitor
recipe/dataflows
user interface
Datasets
actions configuration
display fields
record action
types
extended metadata file
configuration
edit field values
fields panel
format numbers
grain label
hide fields
rename
set default fields
fields
information/actions
properties
replace/restore
Data sources
API enables
existing datasets
external data source
multiple connections
salesforce trend report
E, F, G, H, I
Exploring dashboards
annotations
feature
hands-on
icon
dashboard inspector
details
features
icons
performance bottlenecks
query details
explore action
hands-on
learning process
Salesforce
SAQL
set notifications
features
lightning
monitor
number widget
share widgets
show details action
Extended metadata (XMD)
J, K
JavaScript Object Notation (JSON)
dashboard/lens
error message
extended metadata file
upload/download recipe
L, M, N, O, P, Q
Lens
analyze data
chart mode
clip/designer button
clone
collection
completeness
conversational exploration
CRM Analytics apps
creation
run app button
sharing
types
favorite feature
present mode
quantity/quality
save button
sharing data
download data
posting/feed
URL tab
subscription
values table
Lightning app page
home page
dashboard
hands-on
properties
recipe/dashboard
recipe pulls data
options
record page
account page
dashboard
dashboard modification
hands-on
properties
R
Recipe
aggregate node
append node
backup/restore JSON file
dataflow
data transformation
filter node
hands-on
input data
join
connecting node
cross join
datasets
inner join
left join
LookUp
nodes
outer join
right join
types
objects/fields
opportunities
output node
in progress
search dataset
Transform node
update node
user interface
version history
Recipes
nodes
append node
clean duplicate
connecting nodes
custom formula
deleting links
drop columns
duplicate names
edit attributes
filter node
formula editor
input nodes
joining nodes
options
transform node
value lookup
S, T, U, V, W, X, Y, Z
Salesforce analytics query language (SAQL)
CRM Analytics
Salesforce platform
direct data queries
dashboard
stage
integration
Lightning page
local vs. external data
retrieve data
sharing inheritance
trend report
benefits
configuration
dashboard
fields
hands-on
monitor trend progress
opportunity report
schedule report
snapshot date
trend job progress detail
Security
apps level sharing
learning process
permission set assignment
predicate
definition
exception
flatten node properties
flatten transform
hands-on
role hierarchy access
syntax
sharing inheritance
Sharing inheritance
configuration
coverage assessment
definition
enable option
standard objects
user process
OceanofPDF.com