One of the most desired outcomes from any AI-based system is to enable reliable predictions. Salesforce, having already introduced Einstein (the first comprehensive AI for CRM), has made significant progress in data predictions.
One of the prediction models we will be talking about in this blog is Einstein Case Classification. Salesforce’s Einstein Case Classification is a tool that utilises machine learning to suggest or automatically populate Case record fields. Einstein Case Classification always uses an organisation’s closed cases from the last six months, to recommend or populate picklist or checkbox field values. In short, it removes the guesswork in completing case fields so that agents can resolve cases quickly, accurately, and consistently.
Now we know what it is, let’s start configuring it. For our example we are showing how to enable Case Classification for new Cases.
Step 1: First and foremost you have to have the relevant licence. The paid version of Einstein Case Classification and Case Wrap-Up is available with the Service Cloud Einstein add-on licence. This licence allows for five models per app. Einstein Case Classification also includes automatic field updates and Einstein Case Routing. To upgrade, you’ll need to talk to your Salesforce Account Executive.
However, all is not lost! If you just want to experiment, you can create a scratch org using this link, and select Classify Citizen Requests option.
Step 2: Now we have all we need to start. From Setup, in the Quick Find box, search for and select Einstein Classification. Next Click the toggle to turn on Einstein Classification Apps. This can take a few minutes.
Step 3: Click on Get Started on the Einstein Classification setup page.
Step 4: On the next screen select Case Classification, enter the name for your model and click next.
Step 5: This is one of the important steps as this is where we tell the system for which type of Cases we wanted the values to be predicted. This means you can ask the model to consider all the new Cases, or new Cases specific to a business unit or a category.
Step 6: So now we have decided which new Cases we want to have predictions for, it’s a good time to ask ‘how do these predictions come to be?’ The model considers the existing Closed Cases to build the prediction model. You have the flexibility to either use all the recent (up to six months) cases, or to select a specific set.
Step 7: Next identify which field values you need to set the prediction on.
Step 8: When you click next on the screen you will see something like a summary of what we have done. The table at the bottom shows which fields will be predicted. An important factor to note is that fields should contain diversity in values, otherwise the prediction model will fail. For example if there are 10000 records where the Priority is set to Medium for all, the model will not have enough variety of data to work. Also important to keep in mind is that your org should have enough data to effectively build the model -the minimum is 400 but even this is very low. In either case, if these criteria are not met, you will get an error message when you try to save your settings.
Step 9: Once you successfully click finish and your settings are saved, it’s time to move on to the next step.
Step 10: It’s time to build your Classification Predictive Model. Once again go to the Einstein Classification Setup page and select the model name. Click the Setup tab. From the Setup tab, you can remove a field from the model and select Remove from the Action menu if you need to. To add fields, select Edit under Configure Data. At last, you can now click Build to generate the model.
This will take a few hours depending on the amount of data your org holds. Salesforce will send you an email once the build is finished.
Step 11: We are inching towards the end, and now we need to Configure Field Prediction Settings. What we are doing here is that we are asking the model that is built to decide the level of prediction automation. With the lowest level of automation, Einstein recommends the top three field values (based on the number of records that reference them) for each field in your model. Or you can have Einstein select and save the best value automatically.
You can do this by clicking edit under Configure Predictions and selecting a field. Alternatively, select edit next to a field in the list.
Below you are telling the model to show the top values for those fields which need to be predicted. The model will show the values but will not set or select for you. Here you will also need to set the prediction confidence threshold, which is your minimum required confidence level for selecting the best value. A prediction’s confidence level represents the likelihood that the recommendation for the field value is correct.
We can also ask the model to prepopulate the fields with the best values determined by the model. You can click on the Automate value tab and turn on the Automate value. The field will show the best value already selected with the BEST label next to the value. Again you will need to set the prediction confidence threshold.
Step 12: Select Save & Close. Your changes take effect immediately, and the prediction settings appear in the field list. You can now click on the Activate button.
Step 13: Grant Users access to Einstein Classification. A new Permission set named Einstein Case Classification has already been created in Step 2 of this blog. So now you just need to Manage Assignments and assign users to the permission set.
Step 14: In order to view the prediction model working, we need to edit the page layout and drag and drop the Einstein Field Recommendations (Classification Apps) component onto the page. To set the properties for the component select Case Classification and assign a relevant Update Action. Save your changes and do the necessary activation.
Note: You will need to update Action’s layout to determine which fields appear in the component. You will also need to add your prediction fields if not already exposed.
Step 15: Now this is ultimately what the user will see when they create a Case.
You will see the Einstein Recommendations Available clickable link. If you click on the link you will see fields you selected for the prediction model, highlighted with a green dot.
If you click on any prediction-enabled field, you will see the Einstein Recommended Values.
Step 16: If you want to see the performance of the model you created, you can again go back to the Einstein Classification and click on the name of your model.
Click on the performance tab to see how the model is performing and decide which field values to automate.
The Top 3 Recommendations chart indicates how often one of the top three recommended values matches the final field value at the time the case is closed.
The Top Recommendation chart shows how often the top-recommended value matches the final field value when the case is closed.
When a case with field predictions is closed, the dashboard refreshes.
Summary (as per the Salesforce guide)
- At a minimum, Einstein recommends the top three values for picklist and lookup fields on new cases, and the top value for checkboxes (enabled or disabled). Agents can click into a picklist or lookup field to see which values Einstein recommends.
- For both classification apps, if you enabled Select Best Value for a field and the prediction confidence is above your threshold, Einstein shows the field with the best value already selected next to the word BEST.
- For Einstein Case Classification, if you enabled Automate Value for a field and the prediction confidence is above your threshold, Einstein saves the best field value automatically and triggers any case routing or assignment rules that you’ve put in place.