Recommendation Strategy
A Recommendation Strategy is the decision logic in Salesforce Einstein Next Best Action that decides which recommendations to show a user.
Definition
A Recommendation Strategy is the decision logic in Salesforce Einstein Next Best Action that decides which recommendations to show a user. It pulls recommendation records, filters and ranks them against the current context, and returns the short list that appears on a page.
A strategy is built as a flow of the Recommendation Strategy type in Flow Builder. It runs every time a page needs recommendations, evaluates your data and rules in order, and hands back the final set in the outputRecommendations collection.
How a Recommendation Strategy decides what to surface
What a strategy is and where it fits
Einstein Next Best Action shows users a small set of suggested actions on a record page, a home page, or an Experience Cloud site. Each suggestion is a recommendation record with a title, description, and an action the user can accept or reject. The Recommendation Strategy is the piece that picks which of those records to display, and in what order. Think of the strategy as the rules engine behind the panel. You author recommendation records once, then write a strategy that reads them, narrows them to the ones that fit the current account or case, and ranks the survivors. When the page loads, Next Best Action calls the strategy, runs it against live data, and renders whatever the strategy returns. Change the strategy and the suggestions change everywhere it is used. This split between the records and the logic is what lets one library of recommendations serve many different situations.
Built as a Recommendation Strategy flow
Modern strategies are flows. In Setup you open the Flows page, click New Flow, choose Use a Template, and pick the Recommendation Strategy flow type. That gives you a flow canvas wired for recommendations instead of a generic screen or autolaunched flow. You retrieve candidate recommendations with Get Records elements. The element reads the Recommendation object, or an object related to the record on screen, and you set condition requirements so only relevant rows enter the collection. Collection Filter and Collection Sort elements then trim and order that collection. An Assignment element moves the chosen recommendations into outputRecommendations, the reserved collection the component reads. Only records placed in outputRecommendations are shown, so anything you filter out simply never appears. Building strategies this way means you get the full Flow Builder toolset, including loops, decisions, and debugging, rather than the smaller set of nodes the original builder offered.
Combining data, rules, and AI
A simple strategy is mostly eligibility filtering. You load every active recommendation, drop the ones that do not apply, and show the rest. That alone is useful for things like reminding an agent to confirm contact details or flagging an open renewal. Stronger strategies add scoring. You can call Einstein Recommendation Builder or an Einstein Discovery model to attach a likelihood or priority to each recommendation, then sort by that value so the highest-impact action sits at the top. You can also branch on business data: route to different recommendation sets for a high-value account versus a routine one, or suppress an offer when a product is out of stock. The point is to blend three inputs, your record data, your written rules, and a model score, into one ranked answer. Each input is optional. A rules-only strategy is perfectly valid, and many teams run for a long time without any model at all.
Generate, Enhance, and Map elements
Newer strategy flows include elements that reduce manual recommendation upkeep. The Generate element creates recommendations on the fly from Salesforce records or an external data source, so you do not hand-author a record for every possible offer. The Enhance element adjusts a recommendation as the flow runs. If a referenced product becomes unavailable, for instance, the recommendation can be updated or removed before it ever reaches the user. The Map element connects fields from a source object to the recommendation fields the component expects, which keeps titles and descriptions accurate when the underlying data changes. Together these elements let a strategy stay current without someone editing static records each week. They are most useful when recommendations are tied to fast-moving data like inventory, pricing, or campaign membership, where a static library would go stale quickly.
Apex and external logic
When declarative elements are not enough, a strategy can call Apex. You expose an Apex method as an invocable action and add it to the flow like any other element. The method can run complex eligibility math, call an external service, or assemble recommendations that would be awkward to express with Get Records and filters alone. This is the path teams reach for when ranking depends on logic that lives outside Salesforce, or when a single query cannot describe the candidate set. The Apex action returns recommendations into the flow, and from there the usual filter, sort, and assignment steps apply. Keep the Apex focused on the part that genuinely needs code, and let Flow Builder handle the rest. Mixing both keeps the strategy readable for admins while still allowing developers to solve the hard cases. It also means the bulk of day-to-day tuning stays point-and-click, which matters when the people maintaining the strategy are not all developers.
Where strategies run and how to iterate
A strategy does nothing on its own. You surface it by dropping the Einstein Next Best Action component onto a Lightning record page, an app home page, or an Experience Cloud site page in Lightning App Builder, then pointing that component at your strategy. Visualforce pages and external sites can host recommendations too, which is how the same logic reaches customers outside the core app. Treat a strategy as something you refine over time. Start with plain eligibility rules, ship them, and watch which recommendations users accept or dismiss. Use what you learn to adjust filters, add a model score, or split into separate strategies for different scenarios. Keeping distinct strategies for distinct contexts, say one for service cases and another for a sales home page, makes each one easier to reason about than a single strategy crammed with branches for every case.
From the original Strategy Builder to Flow
Einstein Next Best Action originally shipped with its own Strategy Builder, a separate canvas with components like Load Recommendation and Branch Selector. You assembled a strategy from those nodes outside of Flow. It worked, but it was a distinct tool to learn and lacked the depth of Flow Builder. Salesforce moved strategy authoring into Flow Builder so that recommendations use the same automation engine as everything else on the platform. The Recommendation Strategy flow type is the current, recommended way to build new strategies. If you maintain an older strategy created in the original builder, plan to recreate it as a flow so you benefit from ongoing Flow Builder improvements and a single skill set across your automations. New work should start in Flow Builder directly, since that is where the platform investment now goes and where the richer element set, like Generate and Enhance, is available.
Build and deploy a Recommendation Strategy
Create a Recommendation Strategy as a flow, fill it with logic, then attach it to the Einstein Next Best Action component on a page.
- Create the strategy flow
In Setup, open Flows, click New Flow, choose Use a Template, then select the Recommendation Strategy flow type and click Create.
- Load candidate recommendations
Add a Get Records element that reads the Recommendation object or a related object. Set condition requirements so only recommendations that fit the context enter the collection.
- Filter and rank
Add Collection Filter and Collection Sort elements to trim the list and order it. Optionally call Einstein Recommendation Builder, an Einstein Discovery model, or Apex to score and prioritize.
- Set the output
Add an Assignment element that places your final recommendations into the outputRecommendations collection, then save and activate the flow.
- Surface it on a page
In Lightning App Builder, drop the Einstein Next Best Action component onto a record page, home page, or Experience Cloud page and point it at your strategy.
The flow template that gives you a canvas wired for recommendations and the outputRecommendations collection.
The reserved collection the component reads. Only recommendation records placed here are displayed to the user.
Filters applied as records are retrieved, so ineligible recommendations never enter the strategy in the first place.
An optional Einstein Recommendation Builder model, Einstein Discovery model, or Apex action that ranks recommendations.
- Recommendations not in the outputRecommendations collection are silently dropped, so an empty panel often means nothing was assigned to it.
- The strategy decides which recommendations show, but you still have to author the recommendation records and the actions they launch.
- One strategy can serve many pages. Splitting scenarios into separate strategies is easier to maintain than one strategy with branches for everything.
- Strategies built in the original Strategy Builder should be recreated as Recommendation Strategy flows, since new investment goes into the Flow Builder path.
Prefer this walkthrough as its own page? How to Recommendation Strategy in Salesforce, step by step
Trust & references
Cross-checked against the following references.
Straight from the source - Salesforce's reference material on Recommendation Strategy.
Hands-on resources to go deeper on Recommendation Strategy.
About the Author
Dipojjal Chakrabarti is a B2C Solution Architect with 29 Salesforce certifications and over 13 years in the Salesforce ecosystem. He runs salesforcedictionary.com to help admins, developers, architects, and cert/interview candidates sharpen their fundamentals. More about Dipojjal.
Test your knowledge
Q1. What is a Recommendation Strategy in Salesforce Einstein Next Best Action?
Q2. What does Strategy Builder combine inside a Recommendation Strategy?
Q3. What is a common pitfall when building a Recommendation Strategy?
Discussion
Loading discussion…