---
schema_version: "1"
id: 48c91ad6435f0c9d061ebe5774f42cc7f7d64e2870ceeab228f02896d94036cb
title: PREDICT
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/customize_functions_predict.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.customize_functions_predict.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 87b8af251e7c6ce37fbc18b65666dd64fd7fd424e64a8be78b575d35395ba249
description: Returns an Einstein Discovery prediction for a record based on the specified record ID or for a list of fields and their values.
products:
  - Salesforce Platform
  - Security
release: "264"
---
# 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](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_note.png)
    
    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](https://help.salesforce.com/s/articleView?id=analytics.bi_edd_setup_assign_permsets.htm&type=5&language=en_US).
- 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](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_example.png)

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](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_example.png)

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.