Using the NBA Component in a Visualforce Page

Step1: Setup > My Domain and follow through all the steps; ensure it’s enabled for all users.

Step 2: Open Developer console > https://www.screencast.com/t/GI91jcIqc

Step 3: File  > New > Lightning Application- call it “lcvfTest”

<aura:application extends=”ltng:outApp” >

<aura:dependency resource=”ui:button”/>

<aura:dependency resource=”lightning:nextBestActions”/>

</aura:application>

Step 4: File > New >  VisualForce page

<apex:page >

    <apex:includeLightning />
    <div id="nbaWidget" />
    <script>

$Lightning.use("c:lcvfTest", function() {
$Lightning.createComponent("lightning:nextBestActions",

{
widgetTitle : "EinsteinRecommendations" ,
singleColumn : "true" , 
strategyName : "testData",
recordId : "recId" 
          },
          "nbaWidget",
          function(cmp) {
            // do some stuff
              debugger;
          });
        });
    </script>

</apex:page>

Step5: click on preview from VF page, click on propositions will open flow in a new browser tab.