Prerequisites

This section covers the steps required to experiment with Google Prediction API and Salesforce:

  1. You have Salesforce login credentials. If you do not have one, sign up at https://developer.salesforce.com/signup.
  1. Sign up for a Google account at https://accounts.google.com/SignUp?hl=en.
  1. Enable the Prediction API by visiting https://console.cloud.google.com/home/dashboard.
  1. Create a Google Cloud Project, as shown in the following screenshot. Once you create a project, note the Project ID as we will be using the Project ID in the API request:
The project creation screen in the Google console
  1. Sign up for a free Google cloud storage at https://console.cloud.google.com/storage/browser.
  1. Create a folder called salesforceeinstein and upload the provided CSV (The CSV is shared in the git repository located at (https://github.com/PacktPublishing/Learning-Salesforce-Einstein/blob/master/Chapter1/SFOpportunity.csv) in the Google Cloud storage. Name the file as SFOpportunity.csv:

  1. Open the prediction API explorer the (https://developers.google.com/apis-explorer/#s/prediction/v1.6/) to train the model via API. We will need to first enable OAuth for the project and use the right scope. The screenshot shows the OAuth 2.0 screen and scope enablement screen. You will need to select the auth/prediction checkbox:

  1. We will be using the v1.6 version of Prediction API. The training and prediction is covered in the next section.

Note that the CSV data here is a report extract of opportunity data from Salesforce. You can extract data using the Salesforce standard reporting interface. You will need to create a custom probability field on the Salesforce opportunity object to track the probability from the prediction API.

Check the following screenshot of the Dataset sample. The data samples can be taken from your Salesforce organization, and, in case you want to use the one used in this book, you can get it from the git repository (https://github.com/PacktPublishing/Learning-Salesforce-Einstein/blob/master/Chapter1/SFOpportunity.csv):

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset