Pilot Tutorial -Einstein Next Best Action on Flow(Blog 2 of 4 series)
Bonus: You also get to check out the brand new Sort collection processor element on Flow!
This tutorial will help you create your first Recommendation Strategy on Flow! This is a pilot feature, so contact your Account Executive to get nominated for the pilot. Also if you haven’t already, check out this blog for an overview on the product. As an added bonus, this tutorial also helps you check out the brand new Sort collection processor element on Flow!
You can also download this pdf to follow along:
NBA-on-Flow-Pilot-4WHAT’S NBA ON FLOW?
You can now create Next Best Action Strategies using the powerful Flow Builder and leverage the power of Salesforce’s mature Automation Platform .
NBA customers will now have a brand new way of creating recommendation strategies on flow builder that is packed with powerful platform features such as Templates, Versioning, Packaging 2.0 support, Sub Strategies, Debugging enhancements and also will be home to low code AI driven Recommendation, OOTB Reporting and analytics , OOTB Integration with Bots, Enhanced Display component with Mobile support and many other cutting edge decisioning builder elements. Planned GA in Spring ‘22 (Safe Harbor applies)
WHAT WILL BE AVAILABLE AS PILOT IN SUMMER ‘21
Try the following pilot tutorial out by creating a sample flow as follows. The use case is to show recommendations on a Case object. For a customer whose CSAT is greater than 50 show Cross-sell and Upsell offers (stored as recommendation records) and for a customer whose CSAT is lower than 50 show some Promotional offers. For every customer irrespective of CSAT, show any other recommendations. Also check out the demo video that explains all the features.
Let’s try and build the following flow and see some recommendations .
- Use Flow Builder to Create a new Recommendation Strategy
- Open Flow Builder: From Setup, enter Flows in the Quick Find box, select Flows, and then click New Flow.
- Select Recommendation Strategy on the, which is a new process type Recommendation Strategy, and click Create.
2. Create Recommendations :cRecommendations are created the same way as they are with the use of Strategy builder. Recommendations are standard Salesforce records, similar to accounts and contacts, that are processed by strategies and associated with flows (Make sure the flows associated with recommendations are Activated).Read ‘Create Recommendations’ from the documentation here.
3. Load Recommendations using GetRecords :
Use the GetRecords element to load Recommendation records that are evaluated in the strategy when the strategy executes. In the Beta version, you will be able to load records of any object and use a Map element to convert them into Recommendations.
Use the Decision element to conditionally evaluate the flow based on conditions such as in the example shown below: If CSAT is lower than 50, load promotional offers to retain the customer.
4. Sort recommendations( upto 3 levels deep)
With the Collection Sortnew element, you can reorder the recommendations using Recommendation fields up to 3 levels deep. Choose whether you want to sort in an ascending or descending order, and decide how many recommendations to allow through.
5. Save the flow and Activate it.
6. Display the resulting recommendations using the Next Best Action component on record pages
After creating a Recommendation strategy in Flow Builder, choose a page to display your recommendations and run your strategy. You can use a Lightning record page or an app’s Home page by following the steps below.
Lightning Page (Lightning App Builder)
- In Lightning App Builder, create, edit, or clone a record page.
- Drag Einstein Next Best Action from the component list to the location on the page where you want to display it.
- In the property editor,Choose an action strategy and the number of recommendations you want the component to display.
- Other properties, remain the same as mentioned in Einstein Next Best Action component documentation.


7. Accept/reject a recommendation and launch a flow from the runtime component. The screen flow associated with the recommendation can be launched on Accept /reject as specified in the configuration.
8. Report on accept/reject recommendations from the runtime component
As with Strategy Builder, custom reports can be easily created to report on and track recommendation data and strategy metrics. You can see the monthly total recommendations that a Salesforce org’s strategies served. And you can analyze which recommendations are accepted and rejected, who responds to them, and more.
For the NBA on Flow pilot, the one primary difference is that the the primary objects to report on are Recommendation Response (As opposed to Recommendation Reactions) and Recommendation Strategy Metrics (Same as previous – for monthly metrics)
Refer documentation on
- Creating Reports on Recommendation Response metrics
- Creating Reports on Monthly Strategy metrics
9. And finally .. you can also enable Recommendation Strategy process type to be invoked by the Flow Action endpoint.
- In addition to being able to display recommendations on the Home page or Lightning record page, a recommendation strategy can also be executed via a call to the Flow Action endpoint.
- Display recommendations on a custom component or call the recommendation strategy from a scheduled flow by making a call to the API and retrieving recommendations.
The following example illustrates strategy execution via REST API
Thanks for following along this tutorial! Hope you had fun creating your first Recommendation Strategy on Flow! Wondering what more is coming up in subsequent releases?
With Beta/GA (Safe Harbor applies) you will have access to other collection processor and decisioning elements that is currently available in Strategy Builder such as Filter , Map , Branch Selector and Limit Reoffer elements in the new Recommendation Strategy process type in Flow.
In addition to having functional parity with Strategy builder, several other features such as OOTB low code AI recommendations, Scheduled/ Triggered Recommendations , Reporting enhancements, Display component enhancements, OOTB integration with Bots, Support for Mobile display and much more! Check out the blog for an in depth roadmap.
Check out these other blogs in the series for more information
Summer ’21 Pilot Preview: Einstein Next Best Action on Flow! (Blog 1 of 4 series)
Pilot other considerations and requirements: Einstein Next Best Action on Flow(Blog 3 of 4 series)
Pilot FAQs-Einstein Next Best Action on Flow (Blog 4 of 4 series)
Happy Next Best Actioning!!