Loading
Salesforce Enforces New Security Requirements in Summer 2026Read More
Extend Salesforce with Clicks, Not Code
PREDICT

PREDICT

Returns an Einstein Discovery prediction for a record based on the specified record ID or for a list of fields and their values.

Use

PREDICT(PredDefId, [recordId] | [field, value, ...]). Replace PredDefId with the Prediction Definition ID of a deployed prediction in your org. Specify the recordId of the record to predict or a list of fields and their associated values ([field, value, ...]).

Tips

  • The specified PredDefId must link to a deployed and active prediction in your Salesforce org. To insert a value, select PredDefId, click Insert Field, select SmartDataDiscovery > Prediction Definitions, select an available prediction, select Prediction Definition Id, and then click Insert.
    Note
    Note The syntax for PredDefId must match the following pattern:
    $SmartDataDiscovery.PredictionDefinitions.<predictionDevName>.Id
  • If you specify a recordId, the function returns a prediction for the data values in that record.
  • If you specify a list of field names and values, the function returns a prediction for the data values you provided. Be sure to provide all the fields that the prediction requires as input.
  • To view Einstein Discovery predictions, users must have the View Einstein Discovery Recommendations system permission. To learn more, see Assign Einstein Discovery Permission Sets to Users.
  • The PREDICT function is available when defining formulas for the following Process Automation components: approval processes, flows, processes (in Process Builder), workflow rules, and Next Best Action.
  • The PREDICT function is not supported in formula-based fields on Salesforce objects.
recordid Example
recordid Example
PREDICT($SmartDataDiscovery.PredictionDefinitions.Recommende_kFjqS_1370.Id, Id)

This example calls the PREDICT function and passes a prediction definition and recordId.

List of Fields and Value Example
List of Fields and Value Example
PREDICT($SmartDataDiscovery.PredictionDefinitions.Recommende_kFjqS_1370.Id, 
‘Customer_Typec’, Text(Customer_Typec), ‘List_Price__c’, List_Price__c)

This example calls the PREDICT function and passes a prediction definition and list of fields with associated values.

 
Loading
Salesforce Help | Article