Newer Version Available
AIRecordInsight
An Einstein insight is created every time an Einstein feature, such as Prediction Builder or Reply Recommendations, makes a prediction. An insight is represented by a root AIRecordInsight and the following child objects: AIInsightAction, AIInsightFeedback, AIInsightReason, and AIInsightValue.
AIRecordInsight contains information on the Einstein prediction, the AI prediction field where results were written to, and other details such as the type of prediction.
Supported Calls
delete(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), undelete()
Special Access Rules
Prediction insight objects are only available in orgs that have Einstein features, such as Prediction Builder or Case Classification, enabled.
Fields
| Field | Details |
|---|---|
| AiApplicationId |
|
| Confidence |
|
| MlPredictionDefinitionId |
|
| Name |
|
| PredictionField |
|
| RunGuid |
|
| RunStartTime |
|
| Status |
|
| TargetField |
|
| TargetId |
|
| TargetSobjectType |
|
| Type |
|
| ValidUntil |
|
Usage
- An AIRecordInsight record is created and populated with information about the prediction insight. AIInsightAction, AIInsightReason, and AIInsightValue records are also created and made children of the AIRecordInsight record.
- If the Einstein feature uses AI prediction fields, prediction result values are written to the target AI prediction field.
- An AIPredictionEvent platform event is created, and any subscriber to AIPredictionEvent is notified.
Custom fields can’t be added to Einstein insight objects.
Einstein insights contain information about target fields and predicted value. Be aware that your org may have created Einstein predictions that are associated with target fields with field-level security restrictions. Use data access features of Salesforce, such as user profiles and permission sets, if you need to control how users access Einstein insights records.
Considerations for Case Classification
To generate reports about how well Einstein Case Classification predictions are working, use the root AIRecordInsight object and its child objects, AIInsightFeedback and AIInsightValue. For example, you can determine how many cases received predictions or how often agents accepted or rejected them.
- To determine how many cases received recommendations, the AIRecordInsight table identifies the case and contains a row for each field and each recommendation. In AIRecordInsight, the TargetId field contains the case ID. The PredictionField indicates which case field is being predicted. Each field value recommendation is contained in a separate AIInsightValue object with AIRecordInsight as the parent. For a picklist field, Einstein creates AIInsightValue objects with up to 10 field value recommendations. However, just the top three predictions appear to agents in the Einstein Field Recommendations component.
- To learn whether agents acted on any of the top three predictions, use the AIInsightFeedback object. When an agent updates fields after viewing Einstein’s recommendations, or when Einstein applies a recommendation automatically, the object’s AiInsightFeedbackType field contains Explicit. If the agent updates fields without viewing the predictions, such as on the case details tab, AiInsightFeedbackType is set to Implicit. When the agent applies the recommended value, the object’s AiFeedback field is set to Positive; if the agent applies a different value, AiFeedback is Negative.