---
schema_version: "1"
id: de2b062963eccce15d2a7011c141c3a1f8c234bb2ccbf7f20f9bd66bf10f9100
title: Flow Builder Strategies
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/nba_building_flow_builder_strategy.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.nba_building_flow_builder_strategy.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 612fdd47b4542e3061c467a7eaba7dce6e0cc33abc478a29b7042c384dcde9f3
description: A Flow Builder strategy specifies business logic and generates output for an Einstein Next Best Action component on a Salesforce Lightning record page.
products:
  - Flow Builder
  - Salesforce Platform
release: "264"
---
# Flow Builder Strategies

A Flow Builder strategy specifies business logic and generates output for an Einstein Next Best Action component on a Salesforce Lightning record page.

### 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.nba_ref_editions.htm&amp;release=264.0.0&amp;type=5" title="Learn about the editions and user interfaces that support Next Best Action.">View supported editions for Next Best Action</a>.</td></tr></tbody></table>

In a Flow Builder strategy, you generate recommendations in either of the following ways:

- [Use predefined recommendations created in the Recommendations object](https://help.salesforce.com/s/articleView?id=platform.nba_building_flow_builder_strategy.htm&release=264.0.0&type=5 "Build a strategy flow based on predefined recommendations. This method works best if you have a small number of recommendations and want to make them available to multiple Einstein Next Best Action components. For example, you can create a recommendation that offers a discount to a customer. You can then use the same recommendation when creating a strategy for birthday discounts and for new customer discounts."). With this method, you create recommendations individually in the Recommendation object and then use them in one or more Next Best Action components. This method is best if you’re creating a small number of recommendations.
- [Create recommendations on the fly without using separate recommendation records](https://help.salesforce.com/s/articleView?id=platform.nba_building_flow_builder_strategy.htm&release=264.0.0&type=5 "Build a strategy flow with multiple recommendations that you create dynamically in bulk. For example, you can create a strategy that offers a different upsell recommendation for each product in your product list. With this method, you create recommendations directly in the strategy flow without using separate Recommendation records."). With this method, you create multiple recommendations dynamically in the strategy flow. This method is best if you’re creating a large number of recommendations. For example, if you have an extensive product list, you can create a different upsell recommendation for each product in the list.

## Build a Strategy Flow Using Predefined Recommendations

Build a strategy flow based on predefined recommendations. This method works best if you have a small number of recommendations and want to make them available to multiple Einstein Next Best Action components. For example, you can create a recommendation that offers a discount to a customer. You can then use the same recommendation when creating a strategy for birthday discounts and for new customer discounts.

Before building your strategy flow, [create recommendations in the Recommendations object](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.").

![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 If you want to create a large number of recommendations dynamically at one time, you can [build a strategy flow with on-the-fly recommendations](https://help.salesforce.com/s/articleView?id=platform.nba_building_flow_builder_strategy.htm&release=264.0.0&type=5 "A Flow Builder strategy specifies business logic and generates output for an Einstein Next Best Action component on a Salesforce Lightning record page.") without creating separate records in the Recommendation object.

1. From Setup, in the Quick Find box, enter Flows, select **Flows**, and then click **New Flow**.
2. On the **Alt + Templates** tab, select the **Recommendation Strategy** flow type, and click **Create**.
3. Load the records you want to use for your recommendation by adding a Get Records element to the flow.
    1. Enter a label and API name.
    2. Select the object to use for the recommendations, such as the Accounts, Cases, or Contacts object.
    3. In the Filter section, add conditions to limit which records from the object are used in your strategy.
4. Bring a predefined recommendation into the strategy by adding a Get Records element.
    1. Enter a label and API name.
    2. Select the **Recommendations** object.
    3. In the Filter section, use conditions to specify the recommendation that you want to use.
5. Add other flow elements as needed to define the strategy.
6. Make your recommendation available for use in an Einstein Next Best Action component.
    1. Add an Assignment element.
    2. For Variable, select **outputRecommendations**.
    3. For operator, select **Equals**.
    4. For Value, select the predefined recommendation.
7. Save your flow.
8. Activate your flow.

You’re now ready to [add a Next Best Action component to a Lightning record page.](https://help.salesforce.com/s/articleView?id=platform.nba_admin_using_strategies.htm&release=264.0.0&type=5 "After creating a strategy, choose a page to run your strategy and display your recommendations. You can use a Lightning record page, an app’s home page, an Experience Cloud site page, a Visualforce page, or an external site, depending on where you want recommendations to appear.")

## Build Strategy Using On-the-Fly Recommendations

Build a strategy flow with multiple recommendations that you create dynamically in bulk. For example, you can create a strategy that offers a different upsell recommendation for each product in your product list. With this method, you create recommendations directly in the strategy flow without using separate Recommendation records.

![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 If you want to reuse recommendations in multiple Einstein Next Best Action components, use [pre-defined recommendations created in the Recommendations object](https://help.salesforce.com/s/articleView?id=platform.nba_building_flow_builder_strategy.htm&release=264.0.0&type=5 "A Flow Builder strategy specifies business logic and generates output for an Einstein Next Best Action component on a Salesforce Lightning record page.").

1. From Setup, in the Quick Find box, enter Flows, select **Flows**, and then click **New Flow**.
2. On the **Alt + Templates** tab, select the **Recommendation Strategy** flow type, and click **Create**.
3. Load the records you want to use for your recommendations by adding a Get Records element to the flow.
    
    - Enter a label and API name.
    - Select the object to use for the recommendations, such as the Product object.
    - In the Filter section, add conditions to limit which records from the object are used in your strategy.
4. Add a Recommendation Assignment element.
    
    - Enter a label and API name.
    - For Record Collection Variable, select the variable that you generated with Get Records.
        
        When you select the variable, the target fields are populated automatically.
    - Set values for the target fields:
        - AcceptanceLabel—Button label to accept the offer.
        - RejectionLabel—Button label to reject the offer.
        - ActionFlow—API name of the flow that performs an action when the offer is accepted or rejected.
        - Description—Text that appears above the buttons in the Next Best Action component.
5. Make your recommendation available for use in an Einstein Next Best Action component.
    
    - Add an Assignment element.
    - For Variable, select **outputRecommendations**.
    - For operator, select **Equals**.
    - For Value, select the recommendation from the Recommendation Assignment step.
6. Save your flow.
7. Activate your flow.

You’re now ready to [add a Next Best Action component to a Lightning record page](https://help.salesforce.com/s/articleView?id=platform.nba_admin_using_strategies.htm&release=264.0.0&type=5 "After creating a strategy, choose a page to run your strategy and display your recommendations. You can use a Lightning record page, an app’s home page, an Experience Cloud site page, a Visualforce page, or an external site, depending on where you want recommendations to appear.").

#### See Also

- [Add and Edit Elements](https://help.salesforce.com/s/articleView?id=platform.flow_build_elements.htm&release=264.0.0&type=5 "Use elements to define actions that the flow can run. When they’re on the canvas, connect them to create the order in which they run.")
- [Get Records Element](https://help.salesforce.com/s/articleView?id=platform.flow_ref_elements_data_get.htm&release=264.0.0&type=5 "The Get Records element finds all Salesforce or Marketing Object records that meet the filter and sort conditions and stores values from the retrieved records in variables. You can retrieve Salesforce standard and custom object records, or Marketing Object records, by using the Get Records element.")
- [Assignment Element](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.")
- [Recommendation Assignment Element](https://help.salesforce.com/s/articleView?id=platform.flow_ref_elements_recommendation_assignment.htm&release=264.0.0&type=5 "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.")