Loading
About Salesforce Data 360
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Use Outputs from Predictive Models

          Use Outputs from Predictive Models

          There are many ways in which you can consume predictions, prescriptions, and top factors returned from predictive models.

          Required Editions

          Available in: All Editions supported by Data 360. See Data 360 edition availability.

          Consumption Patterns

          PATTERN DESCRIPTION OPTIONS
          on demand Generate predictions dynamically within the flow of work. Map the input fields to the model. The model generates a prediction which can be actioned within any automated or manual business process. On-demand predictions aren’t persisted anywhere unless done so manually
          • Flow
          • Apex
          • Predict API
          batch Use batch predictions when analyzing large sets of data. Ideal for comparing models on various sets of data, performing predictive analytics, or for creating audience segments when the most up-to-date prediction value isn’t business critical. Batch predictions can be written back to Data Lake Objects (DLOs) or special Data Model Objects (DMOs) that don’t have mapped DLOs (Transform DMOs or ML Prediction DMOs)
          • batch data transforms
          • batch predict jobs
          streaming When the most up-to-date prediction is critical to an automated or manual business process across a large set of data, streaming predictions stay up to date in near real time as input data changes. Streaming predictions are persisted in a special Data Model Object (DMO) of type ML Prediction that doesn’t have a mapped Data Lake Object (DLO). Streaming predictions are great for kicking off Data Cloud Triggered flows when a prediction value changes.
          • predict jobs

          Consumers

          Consumer Description More Information
          Flows Connect any data that’s accessible within a flow to a predictive model and generate on-demand predictions and prescriptions. Use Predictions in Flow Builder
          Prediction Jobs Map a DMO and related DMOs to a single model. Generated predictions are persisted in a newly created DMO (of type ML Prediction) that is automatically related back to the base DMO. Use Predict Jobs
          Batch Data Transforms Generate predictions, top factors, and prescriptions from one or more models. Perform additional transformations and choose where all the transformed results are written back. Transform Data with Predictions and Prescriptions
          Agents Create a flow that generates predictions and/or prescriptions and turn that into an agent action. Agents can use the results to make further decisions and generate even better responses. Agentforce Agents
          Prompt Templates Predictions, top factors, and prescriptions generated from a model can be hard for a human to decipher. Prompts can help to generate a more human-readable view of the prediction and guide a user on what they possibly want to do next. Create a flow that generates predictions, top factors and/or prescriptions as outputs. Then use a prompt to read the information and generate the most relevant content to users. Prompt Builder
          REST Applications Integrate on-demand predictions into any experience inside or outside Salesforce using the public REST API to generate predictions. Use this API to build custom Lightning Web Components or embed predictions into an external system. Get Predictions in REST APIs
          Apex When activating a predictive model, a custom invocable action is automatically created for that model so it can be used in flow. The same custom invocable action can also be executed within Apex using the Invocable namespace.

          Get Predictions in APEX

          Invocable Namespace

          Tips for Interacting With Predictive Models

          To produce predictions, a predictive AI model requires input variables with values that you supply at run time.

          • During setup for batch data transforms, flows, and prediction jobs, you map each model input variable to the data source that supplies the value.
          • For REST and Apex code, you programmatically supply the input data in the request to the predictive model.
          • For on-demand predictions, these values can come from anywhere, including CRM data, user input, Data 360, and other sources. For example, in a flow, a user can provide one of the input values.
          • Your training data is not the source for input variables.

          After processing the request, the predictive model returns a prediction and, optionally, prescriptions and top predictors.

          • For prediction jobs and batch data transforms, the model output is automatically saved in the associated DMO.
          • For flows, you must configure in Flow Builder where you want the output returned from the predictive model.
          • For REST and Apex code, you must programmatically handle the output returned from the predictive model.
           
          Loading
          Salesforce Help | Article