You are here:
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
| View supported editions for Next Best Action. |
In a Flow Builder strategy, you generate recommendations in either of the following ways:
- Use predefined recommendations created in the Recommendations object. 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. 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.
- From Setup, in the Quick Find box, enter Flows, select Flows, and then click New Flow.
- On the Alt + Templates tab, select the Recommendation Strategy flow type, and click Create.
-
Load the records you want to use for your recommendation 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 Accounts, Cases, or Contacts object.
- In the Filter section, add conditions to limit which records from the object are used in your strategy.
-
Bring a predefined recommendation into the strategy by adding a Get Records element.
- Enter a label and API name.
- Select the Recommendations object.
- In the Filter section, use conditions to specify the recommendation that you want to use.
- Add other flow elements as needed to define the strategy.
-
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 predefined recommendation.
- Save your flow.
- Activate your flow.
You’re now ready to add a Next Best Action component to a Lightning record page.
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.
- From Setup, in the Quick Find box, enter Flows, select Flows, and then click New Flow.
- On the Alt + Templates tab, select the Recommendation Strategy flow type, and click Create.
-
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.
-
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.
-
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.
- Save your flow.
- Activate your flow.
You’re now ready to add a Next Best Action component to a Lightning record page.

