---
schema_version: "1"
id: 24b85226d4181238c57e1abe57a354c6f148c7eb3decda6bbab36bb9ff69ef5f
title: Recommendation Assignment Element
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/flow_ref_elements_recommendation_assignment.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.flow_ref_elements_recommendation_assignment.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 9c95559e83d14c00fbb0deafe6ce9444dbd70841ca4a821d758fc4a799268503
description: Generate Einstein Next Best Action recommendations by combining data from records in the recommendation object, records in other objects, values in collections, and manually entered values.
products:
  - Flow Builder
  - Salesforce Platform
release: "264"
---
# Recommendation Assignment Element

Generate Einstein Next Best Action recommendations by combining data from records in the recommendation object, records in other objects, values in collections, and manually entered values.

### 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;"><a href="https://help.salesforce.com/s/articleView?id=platform.flow_ref_supported_editions.htm&amp;release=264.0.0&amp;type=5" title="Learn about the editions and user interfaces that support Flow Builder. Some Flow Builder features integrate with other Salesforce products that require additional licenses.">View supported editions.</a></td></tr></tbody></table>

The Recommendation Assignment element is similar to the [Assignment](https://help.salesforce.com/s/articleView?id=platform.flow_ref_elements_assignment.htm&release=264.0.0&type=5 "Set values in variables, including collection variables, record variables, record collection variables, and global variables.") element: both set values in variables. However, there are important differences:

- Use Recommendation Assignment to output a new recommendation collection variable. In contrast, use Assignment to add or change values in an existing variable.
- Recommendation Assignment can’t update values in existing variables.
- Recommendation Assignment can set a field’s value across all recommendations in the output collection. For example, if you set the AcceptanceLabel to Accept, the AcceptanceLabel for all records in the output collection is set to Accept.
- Recommendation Assignment can create recommendations from another object’s records. For example, use leads in the source collection to create recommendations that have the same names as those leads.
- Recommendation Assignment is available only in Recommendation Strategy flows.

## Set Source Collection

Select a record collection variable with the data that you want to use to create recommendations. Recommendation Assignment creates one recommendation for every record in the source collection.

If you select a record collection variable that contains recommendations, you can choose the fields that set values in the target collection. If you select a record collection variable that contains any other object’s records, the element requires certain recommendation fields.

## Set Target Collection Values

Assign values to [recommendation fields](https://help.salesforce.com/s/articleView?id=platform.nba_recommendation_fields.htm&release=264.0.0&type=5 "Recommendations are suggested actions that users see and interact with through Einstein Next Best Action strategies. When creating a recommendation, use these fields to define its look and feel.") in the output recommendation collection. Values defined in this section are set in every record in the output collection. If there are values in the source collection variable that aren’t set here, those values are passed to the output recommendation collection.

To use the source collection records’ values from a specific field, select **currentItemFromSourceCollection** in the Value column, then select the desired field.

![The New Recommendation Assignment window, with the currentItemFromSourceCollection variable highlighted in the Record (Single) Variables section of the resource picker.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/platform_automation/images/flow/flow_recommendation_assignment.png)

Each value is modified by the operator and value combination.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d304940e143">Column Header</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d304940e146">Description</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Column Header" class="slds-cell-wrap" style="vertical-align:top;" headers="d304940e143 ">Recommendation Field</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d304940e146 ">The recommendation field whose value you want to change. Select an existing
              field.</td>

          </tr>
          <tr class="">
            <td data-label="Column Header" class="slds-cell-wrap" style="vertical-align:top;" headers="d304940e143 ">Operator</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d304940e146 ">Select <strong class="uicontrol">Equals</strong> to set the value in a field. Select
              <strong class="uicontrol">Add</strong> to add the text that you enter or select for
              <strong class="uicontrol">Value</strong> to the end of <strong class="uicontrol">Recommendation Field</strong>.
            </td>

          </tr>
          <tr class="">
            <td data-label="Column Header" class="slds-cell-wrap" style="vertical-align:top;" headers="d304940e143 ">Value</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d304940e146 ">
              <p><strong class="uicontrol">Recommendation Field</strong> and <strong class="uicontrol">Value</strong> in the same
                row must have compatible data types. </p>
              <p style="margin-bottom:0;">Options: </p>
            </td>

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

Einstein Next Best Action always requires certain recommendation fields to display a recommendation. However, the Recommendation Assignment element only requires these fields if you select a source collection that contains non-recommendation records. If you select a source collection with recommendations, Recommendation Assignment doesn’t require the fields because it’s possible that your source collection already has values in those fields. However, the fields are still required to display the recommendation.

- **AcceptanceLabel**
- **ActionReference**
- **Description**
- **Name**
- **RejectionLabel**

## Usage

Recommendation Assignment outputs a collection with the assembled recommendation records and doesn’t change the contents of the source collection. The output collection is null until its corresponding Recommendation Assignment element runs.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/images/icon_note.png)

Note A Recommendation Assignment’s output collection is named after its API name. For example, if a Recommendation Assignment element is named CreateRecs, its output collection is called Recommendations from CreateRecs.

However, recommendations display to users only if they’re in the outputRecommendations variable. To add recommendations to the outputRecommendations collection, use an [Assignment](https://help.salesforce.com/s/articleView?id=platform.flow_ref_elements_assignment.htm&release=264.0.0&type=5 "Set values in variables, including collection variables, record variables, record collection variables, and global variables.") element.

#### See Also

- [Get Started with Einstein Next Best Action](https://help.salesforce.com/s/articleView?id=platform.nba_implementation_checklist.htm&release=264.0.0&type=5 "Just getting started with Einstein Next Best Action? Follow these steps to complete each phase of the Next Best Action setup process, create personalized recommendations for your users, and put decisions into action.")
- [Create Recommendations](https://help.salesforce.com/s/articleView?id=platform.nba_recommendations_app.htm&release=264.0.0&type=5 "Create offers or actions to recommend to users using Einstein Next Best Action. Recommendations are standard Salesforce records, similar to accounts and contacts, that are processed by strategies and associated with flows. Strategies determine which recommendation records are surfaced using business rules, predictive models, and other data sources. The result of this process is context-specific recommendations that you present to your users.")
- [Recommendation Fields](https://help.salesforce.com/s/articleView?id=platform.nba_recommendation_fields.htm&release=264.0.0&type=5 "Recommendations are suggested actions that users see and interact with through Einstein Next Best Action strategies. When creating a recommendation, use these fields to define its look and feel.")
- [Einstein Next Best Actions Considerations](https://help.salesforce.com/s/articleView?id=platform.nba_considerations.htm&release=264.0.0&type=5 "Keep these considerations in mind when working with strategies and recommendations.")