You are here:
Drive Better Decisions with Predictive and Generative AI
The Predictive Model reference action in Agentforce enables an AI agent to invoke a predictive model created in AI Models (formerly Einstein Studio). Use the action to generate on-demand, data-driven predictions, interpret the results, and provide recommendations for how to improve an outcome. The integration of predictive and generative AI improves the interpretability of results for taking the best actions.
Here’s how the reference action works.
- Model Connection, Creation, and Training: First, you connect an existing model or create and train predictive models in AI Models using historical data. These models predict outcomes based on specific input variables, such as customer behavior, sales trends, or service requests.
- Integration with Agentforce: For a predictive model to become available in Agentforce, you need to create a predictive action. Users can then select the right model for their use case and set the necessary parameters for the action.
- On-Demand Predictions: During a user interaction, the agent triggers the Predictive Model reference action. This action sends the relevant data (such as the customer information and interaction context) to the predictive model.
- Prediction Generation: The model processes the input data and generates an output—the prediction. For example, the likelihood of a customer making a purchase to the probability of a service issue occurring.
- Actionable Insights: The prediction is displayed to the agent in a clear and understandable format. In addition to the prediction, the model can provide top predictors that influenced a prediction and actionable recommendations, such as follow-up actions or personalized offers for a customer.
- Enhanced Decision-Making: Predictions and recommendations from models enable users to make better decisions. This can lead to improved customer satisfaction and business outcomes.
Some best practices for setting up the agent action include:
- Identify use cases where predictive AI can be useful by analyzing what questions your users would ask an agent. For example, when predicting churn, users may want to know things such as: "what's the risk of churn for my customer?"
- Build and train models that provide the predictions as answers for these questions.
- Get data from a flow, Apex, a Salesforce record, or directly from the context of the interaction.
- Because actions can be reused, we recommend creating one action per model. In the action setting, you can edit the agent instructions to describe the general purpose of the model. You can also customize the number of top factors and recommendations to display.
- Select the Show in Conversation checkbox for all outputs that you want the agent to display to the user.
- Create recommendation variables to provide dynamic recommendations, such as to suggest a particular upsell offer to maximize long term value. Or, use instructions to trigger an action based on a prediction result, such as a proactive service intervention if the likelihood of an escalation is high.
- Model input values are case-sensitive. If you know that your data can look different from what the model requires, add instructions on how to format the inputs in the way that the model inspects it, such as convert month to a number.
- Customize a topic by adding instructions to guide Agentforce for when to invoke a predictive model and connect it to your topic actions. You can create a new topic or use an existing one. Add instructions to help the agent understand how to answer questions about results provided by the model.
An topic instuction can look like this:
“If the user has questions about customer churn, first make sure to get inputs for the model and pass them into the Predict Churn Account action.”
The model returns an output in JSON. Because you don’t want to display the results in the raw JSON format and want to show the conversational insights instead, you can add this instruction to your topic.
“Don't show the raw output of the Predict Churn Account action to the user. Summarize the results to the end user in simple English. Use the top predictive factors to explain why the customer has a high or low churn score.”
- Use the Predictive Model Agent Reference Action to Enhance Predictions
For an AI agent to provide and interpret outputs from a predictive model, you must create a custom agent action in your org. Let's look at how Agentforce can enhance predictions from a Predicted Attrition model that was created in Model Builder.

