Manage Prediction Jobs

The Einstein Prediction Service provides REST API endpoints to run bulk scoring jobs for a prediction. Bulk scoring jobs enable you to score predictions on multiple records at a time. For example, after deploying an updated model, use bulk scoring to refresh all prediction scores. You can also run bulk scoring on historical data to see how well your model performs. With bulk scoring, you can score all records, a segment of the records, or records that haven’t reached the terminal state.

Bulk scoring jobs are configured in Model Manager. To set up Bulk Scoring jobs, see Score Records in Bulk.

If the daily predictions limit is reached in your org, active scoring jobs are paused, then resumed the next day.

Note

Run a Bulk Scoring Job for a Prediction

POST /smartdatadiscovery​/predict-jobs

POST Request Body

Use the Smart Data Discovery Job Predict Input to create your request body. In the request body, specify the prediction definition Id associated with the bulk scoring request job, along with a user-defined label, and optional filter settings.
{
   "predictionDefinition":{ "id":"{{predictionDefinitionId}}" },
   "label":"{{label}}",
   "useTerminalStateFilter" : false,
   "filters":{
      "filters":[
         {
            "fieldName":"Opportunity.Name",
            "values":[ "My Opportunity" ],
            "operator":"Equal"
         }
      ]
   }
}
You can retrieve a list of available prediction definition Ids using the following API request:
GET ​/smartdatadiscovery​/predictiondefinitions

Get Scoring Jobs

GET smartdatadiscovery/predict-jobs