Install Product Recommendation for SalesForce

By for November 9, 2016

Report Abuse
Step by step guide to install product recommendation provided by Microsoft Cognitive API inside SalesFoce
Prerequisites: SalesForce subscription Azure Subscription Azure Powershell Steps: 1. Install the package (to display recommendations in SFDC) from Sales Force App Exchange using below link (If using sandbox environment please replace the ‘’ part of the URI with ‘’) 2. After installing the package, please configure the Visual Force page to Opportunity default view. Follow the steps to configure the default view to Visual Force page. In your Salesforce organization home page, <ul>Click on Setup.</ul> <ul>Type “Opportunities” in Quick Find / Search …</ul> <ul>Select Buttons, Links and Actions option in the opportunities entity.</ul> <ul>Select Edit link opposite to View. Select Visualforce Page as “recommendationapi”.</ul> <ul>Click Save button.</ul> ![Recommendation API in sales Force][1] Recommendation API in sales Force Select Edit Link opposite to View. Select VisualForce page as recommendationapi. ![Override properties][2] Override properties <h3>Set up Microsoft cognitive API</h3> 3. For Recommendation API subscription please go to and click on New >> Intelligence + analytics >> Cognitive Services APIs. 4. In Create dialogue provide the Account Name as ‘SFDC-Recommendation’, Subscription, Resource group as ‘SFDC-Reco-RG’, Pricing Tier and Resource group location. In API type section, select Recommendations API, then select create. In Pricing Tier section select an appropriate pricing tier according to your requirement. ![Azure Portal][3] ![Signup for Cognitive API to setup crosssell][4] ![Add Account Name][5] 5. In All Resources section of the portal, please search for your Cognitive Services account. From Keys section copy and save any of the two Cognitive Services account keys. ![Select all resources][6] Filter items ![Filter items][7] ![Keys for Cognitive accounts][8] <h3>Upload test data in Sales Force</h3> 6. To test the package in developer org, please upload the test data to the Dev org following the below instructions. Ignore this step if the organization contains sufficient data or sandbox version of Salesforce organization is used for testing. a. Download TestDataUploader from and extract the files to a local directory. b. Click on the exe file TestDataUploader.exe. Command line will prompt the user to enter SFDC user id Password Security token. Enter security token ![Enter security Token][9] Please enter these details for your salesforce org and press enter. 7. It will start loading data to the following SFDC’s objects. i. Product ii. PriceBook iii. PriceBookEntry iv. Account v. Opportunity vi. OpportunityLineItem 8. Open Windows Power shell in your system and run following command and provide the below inputs when prompted. Command: cd “<file path where files were extracted>” Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass -Force .\SetProdRecommendation.ps1 ![Powershell][10] Inputs: Salesforce User Id Salesforce Password Salesforce Security Token Cognitive Services account registration User Id (azure registered Id) Cognitive Services account Key <h3>Training pipeline</h3> 9. Monitoring the Recommendation API Training Azure Data Factory. <ul>Go to >> All Resource >> Filter Items… text box and enter ‘SFDCReco’. </ul> <ul>In the Subscriptions filter option select ‘Select All’ option. </ul> <ul>From the displayed resources, click on the resource of TYPE ‘Data Factory’ with name of format SFDCRecoXXXX in Resource Group ‘sfdcrecorg’, where XXXX can be a random number between 0 – 9999999.</ul> <ul><ul>In Data Factory Overview pane click on Monitor and Manage option. Which opens a new window (or tab) for </ul> Select any activity from left pane to review its state and logs related to it.</ul> [1]: [2]: [3]: [4]: [5]: [6]: [7]: [8]: [9]: [10]: