Blog

Einstein Prediction Builder: next steps to build an automated flow

This article is prepared by our Salesforce Administrator Dzmitry Pimenau.
Automation of actions based on predictions

In the first part of the article we described the scope of application, limitations, configuration of Prediction Builder and metrics provided based on the obtained prediction results.

In general, setting up predictions can be limited to the actions from the first part of the article. However, Salesforce offers tools for further automating the flow of work with predictions, which will help simplify decision-making and speed up the work of agents who use predictions.

Recall that the chain of setting up forecasts and automatic actions is as follows:
  • Setting up predictions in Prediction Builder
  • Setting up Recommendations (standard object)
  • Setting up Actions (based on Flows)
  • Setting up strategies in Strategy Builder
  • Adding Einstein Next Best Action to Lightning pages

Let’s start describing the next steps after setting up Prediction Builder itself.

Recommendations & Actions

After creating the predicted results, Salesforce allows you to create recommendations.
The predicted result says something about the object in question, for example: "This contact most likely has interest in buying a tour to a ski resort."

A recommendation is a proposed action: "Offer a contact to buy our new tour","offer this contact extended insurance", "remind the contact by email about special offers before the ski season", “offer a discount on the purchase of equipment in our store", etc.
In Salesforce recommendations, this is a standard object that is accessible from the app menu to create an object record.
Actions are just created in the Salesforce flow builder which allows to do some things automatically. When creating new recommendation a flow should be defined for each one.

Thus, the new recommendation consists of a name, a description of the recommendation, a shortcut to confirm/cancel the recommendation and a mandatory link to the created active Salesforce flow in the Action field. An image with 1000 by 380 pixel size can be uploaded as well to make a recommendation more intuitive.
Strategies

Once recommendations are created, they need to be linked to predicted outcomes to provide the agent with individualized optimal actions they can take for each customer.

Overview

Strategies are sets of recommendations, we can say that they are “filters” for the recommendations that are available to the agent depending on the prediction:
  • a referral program may be offered to a contact with full service contribution;
  • for a contact who is likely to join the full service support, it may be suggested to invite the client to an event demonstration;
  • for contacts with limited interest, we can offer a free car wash to increase brand loyalty;
  • for contacts who are not likely to join full service support at the current stage or the offer to join has been declined, it may be suggested to focus on promoting related products through mailings (sales of auto tools, fuel, navigators and software, etc.).

Setting up strategies in the Strategy builder

* In the example below the strategy will be built in the Strategy builder, but in the nearest time Salesforce plans to move all available features of Strategies Builder to the Flow builder to build all strategies there.

1. To create a new strategy go to the settings > Next Best action > New Strategy.

2. We have to select the object for which the strategy is being built and the name of the strategy. When installing from the managed package, we can also open the template in Strategy builder and save it as a new strategy.
3. We can load a recommendation into a strategy by dragging the Load icon onto the palette. After that, we can fill in a filter to sort the records to fit the criteria of the strategy.
4. After dragging the Branch Selector icon onto the palette we should give it a name.
5. It is possible to create several Branch Selector elements and connect Load elements to it. After setting the filtering conditions, the last step is saving the strategy for use with Next Best Action.
Elements in the Strategy builder

Recommendations
  • Load – an element for loading and filtering object records.
  • Enhance, Generate – elements to use from invocable methods Apex logic.

Recommendation Logic
  • Filter – an additional record filter.
  • Limit Reoffers allow adjusting the frequency of displaying recommendations.
  • Map – an element allows to redefine the names of fields to display new names in the recommendation.
  • Sort – sort recommendations into a sequence for the order in which they are displayed.

Branch Logic
  • Branch Merge – the ability to merge recommendations from several branches into one branch.
  • Branch Selector – filter multiple branches by selecting branches. If the expression is true, the recommendations in the branch are skipped and combined into one branch.
  • First NonEmpty Branch allows you filtering branches in the order in which they are located on the canvas from top to bottom. Only the first branch containing recommendations is taken, all other branches are ignored even if they are suitable.

Einstein Next Best Action

When configuring the Lightning page, a new Einstein Next Best Action component has appeared in the available actions, which can be configured just like any other component, and as a source of available data, we need to select a strategy from the previously created ones.