Displaying Next Best Action Recommendations In Different Environments

The most straightforward way to display NBA Recommendations is to drag the Next Best Action component from the palette of the App Builder onto a record page.

If you want to display recommendations in other places, here are your choices:

On Community Pages

This is straightforward. In Community Builder, the Next Best Action component is called “Suggested Actions”

Use Lightning Out

Lightning Out allows typical, unmodified lightning components to be placed in standard web pages. It provides a container that hosts the component. We typically recommend this approach for surfacing recommendations in Salesforce Classic via Visualforce pages, or on completely non-Salesforce web pages.

Get the Recommendations Via an API Call to Salesforce, and then Display Them Yourselves

It’s actually quite easy to write a piece of javascript that requests the latest Next Best Action recommendations. The api that you call is here and the process for calling it is discussed here. The return value will be a JSON data structure that includes the recommendations and their associated flows. You can then display the recommendations in your own UI experience and launch the flows via a second call when the user accepts a recommendation.