The strategy, as the name suggests, determines which recommendations need to be considered and filters out non-applicable recommendations.

Strategy screenshot

A strategy looks a little like a pipeline and also acts a bit like it. It is sort of survival of the fittest for the recommendations. It all starts on the left side by loading the recommendations. You might ask: “Why not load all the recommendations in one go?”. We’ll get to that one later. For now, just accept that we have multiple loads of Recommendations happening on the left. Then based on the context (what object are we running on, which user do we have) combined with maybe external data we start filtering out recommendations that don’t apply. This continues all to the Output step on right where the surviving Recommendations are shown to the user.

A strategy can be either related to a specific object or it can be a generic one. Linking it to an object gives you access to the active record when the strategy is shown on a object detail page.

Within a Strategy we have two global variables that gives use access to the context data:

  • $Record, gives you access to the active record on which the Strategy is shown, assuming you specified the right object type on the details of the Strategy.
  • $User, gives you access to currently logged in user (Employee or Community User).

Strategies are created in Setup -> Next Best Action.

Back to General Principles

1666 reads