---
schema_version: "1"
id: 652026a2b21f723d7ed84cf8f8565b6c52f25707828e52c877af4ecc9b002eb6
title: Use Outputs from Predictive Models
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/data/264-0-0/c360_a_get_predictions_from_your_model.md
canonical_url: https://help.salesforce.com/s/articleView?id=data.c360_a_get_predictions_from_your_model.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 7c8fcfbb46f62165efcff6499a257059bf57554f91784219867126981d8d36d0
description: There are many ways in which you can consume predictions, prescriptions, and top factors returned from predictive models.
products:
  - Data 360
release: "264"
---
# 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

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>All Editions</strong> supported by Data 360. See <a href="https://help.salesforce.com/s/articleView?id=data.c360_a_dc_editions.htm&amp;language=en_US" target="_blank">Data 360 edition availability</a>.</td></tr></tbody></table>

## Consumption Patterns

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col style="width:15.384615384615385%">
          <col style="width:61.53846153846154%">
          <col style="width:23.076923076923077%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d112114e66">PATTERN</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d112114e69">DESCRIPTION</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d112114e72">OPTIONS</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="PATTERN" class="slds-cell-wrap" style="vertical-align:top;" headers="d112114e66 ">on demand</td>

            <td data-label="DESCRIPTION" class="slds-cell-wrap" style="vertical-align:top;" headers="d112114e69 ">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</td>

            <td data-label="OPTIONS" class="slds-cell-wrap" style="vertical-align:top;" headers="d112114e72 ">
              <ul>
                <li>Flow</li>

                <li>Apex</li>

                <li>Predict API</li>

              </ul>
            </td>

          </tr>
          <tr class="">
            <td data-label="PATTERN" class="slds-cell-wrap" style="vertical-align:top;" headers="d112114e66 ">batch</td>

            <td data-label="DESCRIPTION" class="slds-cell-wrap" style="vertical-align:top;" headers="d112114e69 ">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) </td>

            <td data-label="OPTIONS" class="slds-cell-wrap" style="vertical-align:top;" headers="d112114e72 ">
              <ul>
                <li>batch data transforms</li>

                <li>batch predict jobs</li>

              </ul>
            </td>

          </tr>
          <tr class="">
            <td data-label="PATTERN" class="slds-cell-wrap" style="vertical-align:top;" headers="d112114e66 ">streaming</td>

            <td data-label="DESCRIPTION" class="slds-cell-wrap" style="vertical-align:top;" headers="d112114e69 ">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. </td>

            <td data-label="OPTIONS" class="slds-cell-wrap" style="vertical-align:top;" headers="d112114e72 ">
              <ul>
                <li>predict jobs</li>

              </ul>
            </td>

          </tr>
        </tbody>
      </table>

## Consumers

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col style="width:15.384615384615385%">
          <col style="width:61.53846153846154%">
          <col style="width:23.076923076923077%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d112114e165">Consumer</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d112114e168">Description</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d112114e171">More Information</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Consumer" class="slds-cell-wrap" style="vertical-align:top;" headers="d112114e165 ">Flows</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d112114e168 ">Connect any data that’s accessible within a flow to a predictive model and generate
              on-demand predictions and prescriptions.</td>

            <td data-label="More Information" class="slds-cell-wrap" style="vertical-align:top;" headers="d112114e171 ">
              <a href="https://help.salesforce.com/s/articleView?id=data.c360_a_ai_flow_builder_predictions.htm&amp;release=264.0.0&amp;type=5" title="Create automation using outputs from an activated model for decision-making. Predictive models that are activated in AI Models (formerly Einstein Studio) are surfaced in Flow as actions. You can use all flow types and choose a flow based on your goal. For example, if a business process requires user input or you want to display specific data to users, use a screen flow. If you want to automate possible actions to take after a record is created, updated, or deleted, use a record-triggered flow.">Use Predictions in Flow Builder</a>
            </td>

          </tr>
          <tr class="">
            <td data-label="Consumer" class="slds-cell-wrap" style="vertical-align:top;" headers="d112114e165 ">Prediction Jobs</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d112114e168 ">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.</td>

            <td data-label="More Information" class="slds-cell-wrap" style="vertical-align:top;" headers="d112114e171 ">
              <a href="https://help.salesforce.com/s/articleView?id=data.c360_a_ai_prediction_job_get_predictions.htm&amp;release=264.0.0&amp;type=5" title="A predict job enables an active model to write predictive outputs to a data model object (DMO). Create a streaming or batch job in Model Builder and use the model's outputs in Salesforce workflows.">Use Predict Jobs</a>
            </td>

          </tr>
          <tr class="">
            <td data-label="Consumer" class="slds-cell-wrap" style="vertical-align:top;" headers="d112114e165 ">Batch Data Transforms</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d112114e168 ">Generate predictions, top factors, and prescriptions from one or more models. Perform
              additional transformations and choose where all the transformed results are written
              back.</td>

            <td data-label="More Information" class="slds-cell-wrap" style="vertical-align:top;" headers="d112114e171 ">
              <a href="https://help.salesforce.com/s/articleView?id=data.c360_a_ai_batch_transform_append_predictions.htm&amp;release=264.0.0&amp;type=5" title="Enrich a data model object (DMO) with outputs. Use a data transform to add predictive and prescriptive intelligence to your data. Run data transformations and save the outputs, such as prediction scores, on a DMO. Use each row of the output to create derived columns and run calculations. You can also build data visualizations using output data saved on the DMO in other Salesforce applications, such as in Tableau, CRM Analytics, and app templates.">Transform Data with Predictions and Prescriptions</a>
            </td>

          </tr>
          <tr class="">
            <td data-label="Consumer" class="slds-cell-wrap" style="vertical-align:top;" headers="d112114e165 ">Agents</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d112114e168 ">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.</td>

            <td data-label="More Information" class="slds-cell-wrap" style="vertical-align:top;" headers="d112114e171 ">
              <a href="https://help.salesforce.com/s/articleView?id=ai.copilot_intro.htm&amp;type=5&amp;language=en_US" target="_blank">Agentforce Agents</a>
            </td>

          </tr>
          <tr class="">
            <td data-label="Consumer" class="slds-cell-wrap" style="vertical-align:top;" headers="d112114e165 ">Prompt Templates</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d112114e168 ">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.</td>

            <td data-label="More Information" class="slds-cell-wrap" style="vertical-align:top;" headers="d112114e171 ">
              <a href="https://help.salesforce.com/s/articleView?id=ai.prompt_builder_about.htm&amp;type=5&amp;language=en_US" target="_blank">Prompt Builder</a>
            </td>

          </tr>
          <tr class="">
            <td data-label="Consumer" class="slds-cell-wrap" style="vertical-align:top;" headers="d112114e165 ">REST Applications</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d112114e168 ">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. </td>

            <td data-label="More Information" class="slds-cell-wrap" style="vertical-align:top;" headers="d112114e171 ">
              <a href="https://help.salesforce.com/s/articleView?id=data.c360_a_ai_rest.htm&amp;release=264.0.0&amp;type=5" title="Use the Salesforce Data 360 Connect REST API to programmatically interact with predictive models. Get predictions, top factors, and prescriptions using the predict endpoint.">Get Predictions in REST APIs</a>
            </td>

          </tr>
          <tr class="">
            <td data-label="Consumer" class="slds-cell-wrap" style="vertical-align:top;" headers="d112114e165 ">Apex</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d112114e168 ">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.</td>

            <td data-label="More Information" class="slds-cell-wrap" style="vertical-align:top;" headers="d112114e171 ">
              <p>
                <a href="https://help.salesforce.com/s/articleView?id=data.c360_a_ai_apex.htm&amp;release=264.0.0&amp;type=5" title="Use Apex code to get predictions, top factors, and prescriptions from a no-code model in Model Builder.">Get Predictions in Apex</a>
              </p>
              <p style="margin-bottom:0;">
                <a href="https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_namespace_Invocable.htm" target="_blank">Invocable Namespace</a>
              </p>
            </td>

          </tr>
        </tbody>
      </table>

## 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.

#### See Also

- [_Salesforce Help:_ About Predictive AI](https://help.salesforce.com/s/articleView?id=data.c360_a_ai_predictive_about.htm&release=264.0.0&type=5 "Learn key concepts for working with predictive models in AI solutions.")