Mastek Blog

Salesforce Einstein Next Best Action

23-May-2023 11:20:38 / by Sujitha Kumar

Are you planning to improve your business? Are you thinking of providing optimal recommendations to your Customer or Employee? Great!! Here is a cool feature introduced by Salesforce to provide an impactful recommendation to the Customer/ Employee based on our CRM data.


Yes, Einstein Next Best Action is the feature provided by Salesforce to automate the business process. An optimal recommendation can be delivered to the business scenarios by using this feature. We can configure this using click and not code! 

The business rules can be automated using the AI technology in Einstein Next Best Action. The data can be connected from CRM or any external Systems to implement this feature. It can be achieved in any of the Salesforce records and Communities to make huge difference in our business based on the business need.  

Setup Einstein Next Best Action: 

          1. Choose type of recommendations 
          2. Create Action Strategies 
          3. Integrate sources of insights (optional – based on the need)  
          4. Embed recommendations 
          5. Take an action 

Business Scenario: Update Opportunity Close Date when it is overdue  

1.Choose type of recommendations: 

To get started with this feature, we need to initiate the process automation by selecting and creating the recommendations which could help us invoke the business scenarios in a record. The type of recommendation can be created based on our business need. It can be either 

       a. Most relevant addon offers/ discount to the customer based on their recent/ last purchase. 

       b. Support system that can provide some perfect troubleshooting solutions to their recent/ last purchased items. 

Salesforce is providing a standard object called Recommendation to create a New Recommendation to update the Close Date. We can create a new record under the Recommendation object, or we can re-use an existing recommendation record, if it meets our need. Here, we are going to create a New Recommendation record as below: 

                                                           Fig 1  

Fields  Description 
Name (1)  Name of the recommendation 
Description (2)  Description for the recommendation 
Image (3)  Display image for the recommendation (Optional) 
Acceptance Label (4)  Display label for accepting the recommendation 
Rejection Label (5)  Display label for rejecting the recommendation 
Action (6)  Option to select the automated business process 

                                                             Tab 1  

2. Create Action Strategies: 

The strategies are the combination of insights and business rules to create the recommended actions for the end users. When creating the action strategy, object should be clearly specified where we are planning to surface this recommendation. So that the errors can be avoided when building the actions in the expression builder.  

                                                             Fig 2 

It can be built through Next Best Action – Strategy Builder. Now, the new Strategy is created as below: 

                                                                          Fig 3  

3. Integrate sources of insights: 

It is an option available to integrate the external data source with Salesforce. In this business scenario, we are going to use the Salesforce data.   

4. Embed recommendations: 

We can add the recommendation in any Salesforce record or external page. The recommendation created by us (Fig 1) will be loaded in the Next Best Action – Strategy Builder. Here, we have filtered the Opportunity records based on the Close Date since the recommendation should not be displayed for the Opportunity which is not overdue on the Close Date. The Action Strategy can be embedded as below: 

                                                 Fig 4  


Flow is a huge part of this implementation as it has the automated business to  

            1. Get the Opportunity records that have overdue Close Date 
            2. Prompt the user to update the Opportunity Close Date if the Close Date is overdue 
            3. Provide the screen to enter the new Close Date if the user accepts the       recommendation 
           4. Else, no update will be happening on the Opportunity. 

This flow is already invoked in the recommendation’s Action field (Fig 1-6). 

The flow is implemented as below by automating the above actions:  

                                                               Fig 5  

Add Einstein NBA: 

The Einstein NBA (Lightning Component) can be added to the Opportunity record page from the Lightning Builder as below:  

                                                                          Fig 6  

5. Take an action: 

Once the recommendation is displayed, it can be accepted or rejected. As it is Lightning flow, the action (i.e. update) will be sent quickly.  

Now the action is ready, and the recommendations can be displayed based on the criteria (Opportunity Close Date) we have defined in the flow. Now, the below Opportunity has an overdue Close Date. 

                                                                          Fig 7 

 The system is prompting the user to enter the new Opportunity Close Date, once the user has accepted the recommendation as below:  

                                                                         Fig 8  

Now, the Opportunity record is updated with the new Close Date based on the user’s input:  

                                                                             Fig 9  

The recommendation will not be shown, if the record does not meet the criteria  

                                                                            Fig 10


We can make use of Einstein Next Best Action feature to improve our business. The Sales and Service teams can improve their business visibility by providing a suggestion which is really powerful and impactful for their business.

Topics: Salesforce

Sujitha Kumar

Written by Sujitha Kumar

Subscribe to Email Updates

Lists by Topic

see all

Posts by Topic

see all

Recent Posts