AIPredictionEvent
Notifies subscribers when an Einstein feature, such as Prediction
Builder or Case Classification, has written prediction results back to a target object and AI
prediction field. This object is available in API version 46.0 and later.
Supported Calls
describeSObjects()
Supported Subscribers
| Subscriber | Supported? |
|---|---|
| Apex Triggers | ![]() |
| Flows | ![]() |
| Processes | ![]() |
| Pub/Sub API | ![]() |
| Streaming API (CometD) | ![]() |
Subscription Channel
/event/AIPredictionEvent
Special Access Rules
Users with Customize Application permission have read access.
Event Delivery Allocation Enforced
No
Fields
| Field | Details |
|---|---|
| Confidence |
|
| EventUuid |
|
| FieldName |
|
| HasError |
|
| InsightId |
|
| PredictionEntityId |
|
| ReplayId |
|
| TargetId |
|
Usage
When Einstein writes prediction results back to AI prediction fields, record save custom logic, such as Apex triggers, workflow rules, and assignment rules, aren’t run for efficiency reasons. To add custom logic based on Einstein prediction results, subscribe to AIPredictionEvent for notifications of prediction result updates. Every time prediction results are written back to a Salesforce record, an AIPredictionEvent event is created and AIPredictionEvent subscribers are notified.
