Pages

Tuesday, December 31, 2019

Einstein Prediction Builder: Getting Started

Einstein Prediction Builder allows you to easily build predictions across any Salesforce standard or custom object with clicks, no code! It predicts a field based on a set of historical data.

If you have Einstein Predictions or Einstein Analytics Plus license, then Einstein Prediction Builder is available for you to use, source Einstein Analytics Pricing (as of 31 Dec 2019).



If you org. have Einstein Prediction Builder license, you should see Einstein Prediction Builder in the setup menu.



There is a few blogs have shared on Einstein Prediction Builder use cases and how to configure it:
Einstein Prediction Builder. The Artificial Intelligence by Salesforce
Einstein prediction builder to predict
Einstein Prediction Builder

Einstein Prediction Builder comes with a wizard-style configuration, you need to select an object, a field for prediction, a set of records as "example", and field to store the prediction result.

Currently, it only supports to predict a checkbox field, while the result would be in number between 0 to 100. In summary, here are the steps:

1. Object
Select a Salesforce object you would like to use for prediction.

2. Segment
Do you want to use the whole data of the object for prediction and learning? Select:
- No segment, to use all data, or
- Yes, enter filter of fields to be included
Make sure you have a minimum of 400 records (after filter if you segment the data).

3. Field to Predict 
This is a very important field, Einstein will do the prediction based on historical value of this field, and it needs to be a checkbox or formula that returns checkbox.

In this blog, I have a picklist field called "Status" with value: Sent, No Show, and Attended. No Show and Attended is historical data, while Sent is new records, and Einstein will help us to predict the attendance for all Sent records.

Because it needs to be a checkbox field, let us create a formula field that returns checkbox called "Attend", ISPICKVAL(Status__c,"Attended"), this field will return True if the Status field is Attended.



4. Define a set of data as examples (for learning)
As mentioned that Einstein needs historical data to predict, we need to define historical data for learning. Einstein will not predict records set as examples, but use it to learn the value of "field to predict".

The more samples data (historical) is a better prediction, but make sure to have a minimum of 400 example records, with both Yes and No records should have a minimum of 100 records.


From the above sample screenshot:
- 407 is the historical data for learning, which are records with Status does not equal to Sent
- 188 of them is Yes <-- this means Attend value is True
- 219 of them is No <-- this means Attend value is False
- 3399 records with Status = Sent, this needs to be predicted for the attendance



The below image explains dataset scope:

- Green: whole data in an object
- Yellow: data filtered after segment, data outside yellow will not be used for prediction and learning
- Dark Yellow: historical data set for learning (Status = No Show and Attended)
- Light Yellow: new data set for prediction (Status = Sent)


5. Set a field to store prediction values
Once the predictions enabled, the values will be range from 0 to 100.


Depends on your data size, Einstein may take up to 24 hours to build the prediction, then you can review the scorecard. Once you enable the prediction, Einstein will start to populate the prediction field with a score, including new records.



Reference:



Friday, December 27, 2019

Einstein Analytics: Working with Null Dimension with Default Value

A dimension field in Einstein Analytics is equal to a string field. However, by default Einstein Analytics does not show NULL value in grouping or sorting.

From the sample report below, we have 1004 accounts, and 5 of them do not have Account Source.



With dataflow, we get all the Account from Salesforce to Einstein Analytics, this clearly shows the number of Accounts in the dataset is 1004.



Then, let us group it by Account Source



Notice from the above screenshot, Accounts with null Account Source do not show at all, the same if we change it to Compare Table.



In Values Table, Account with null Account Source still appears.


But, if we sort by Account Source column, the rows will no longer show.


So, instead of keeping it null, we can transform the value as N/A in Einstein Analytics. We can do this from sfdcDigest note in Dataflow.
Open the sfdcDigest node for Account and click the pencil icon next to Account Source.



In the Default Value, populate N/A, and click the Save button.



Notice the pencil icon next to Account Source is changed, this tells us that something has been updated for that field, click Save button again to close sfdcDigest window.



If you check the dataflow JSON, defaultValue is added

"sfdcDigest_Account": {
    "action": "sfdcDigest",
    "parameters": {
      "fields": [
        {
          "name": "Id"
        },
        {
          "name": "Name"
        },
        {
          "name": "AccountSource",
          "defaultValue": "N/A"
        }
      ],
      "object": "Account"
    }
}


Now, update the dataflow and run it again, then group the lens with Account Source, notice N/A added for all null values Account Source.




Wednesday, December 25, 2019

Einstein Analytics: Use Image as Link

In Einstein Analytics, link by default only offers text. But instead of only text, can we use an image as a clickable link?
Yes, the trick is to use a container then add a link widget on the container, then make the link widget background as transparent and the text as transparent too.

Container
- Add a small container widget with the size similar to image size for the dashboard
- From widget properties, under "Background Image" section, click Upload Image then select an image
- Set the Image Scale and Image Alignment properly



Link
- Add link widget in the container widget added
- Resize the link widget size, to cover the whole container widget
- Set "Link To" to a dashboard or lens or page or URL as needed
- In the "Text Style" section, change the color as transparent, by click Custom and drag the slider to the far left


- Same for "Widget Style", set the Background Color to transparent too, make sure it is "rgba(x,y,z,0)" with the last number is 0.



Tuesday, December 24, 2019

Einstein Data Insights: Analyze Reports Data

Einstein Data Insights requires the Einstein Analytics Plus license. Einstein Data Insights analyze your report data and provide you with insights, complete with charts and explanations.

Setup
1. Enable Einstein Data Insights
From Setup, enter Einstein Data Insights in the Quick Find box. Under Einstein Data Insights, click Getting Started.

2. Grant User Access
Users need to have the standard permission set "Einstein Analytics Plus User" or "Einstein Analytics Plus Admin", or custom permission set include the "Can Run Einstein Data Insights" permission.


Analyze Report Data
1. The report must be in tabular or summary report type, matrix and joined report is not supported. If you use the summary report, make sure the "Detail Rows" are shown.
2. Report column: 2 - 50 columns.
3. Report row: 50 - 500,000 rows, even report only display 2,000 rows, einstein will analyze the whole data, not just 2,000 records shown.


Insights button
You will not see the Insights button or the button will be disabled in the report if any of the above criteria are not fulfilled, from the license, user permission, report format, number of rows and columns.



Start Analysis
You can create an analysis by:
- record occurrence
- a number field in the report

Then tell the system if you would like to Maximize or Minimize before analyzing the report, in my case, I would like to maximize Won Opportunities. You will get the analysis almost immediately, depends on the report rows result and number of columns.



Click "learn more" below each box to get the detail of the analysis. You also can click the title to get a bigger view of the analysis.




ReferenceAnalyze Reports with Einstein Data Insights




Page-level ad