salesforce x aws machine learning

9
Salesforce Campaign Members Prediction with AWS Machine Learning

Upload: akihiro-iwaya

Post on 09-Feb-2017

104 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Salesforce X AWS Machine Learning

Salesforce Campaign Members Prediction with AWS Machine Learning

Page 2: Salesforce X AWS Machine Learning

Overview : How to work with AWS Machine Learning

2

DM Campaign to Top Customers

1

3

2

Trigger AWS ML

1. Add members from Contact / Lead records

2. Once members are added to the campaign, Apex trigger passes each member’s attributes to AWS ML to get predictions, who are likely to

respond the campaign and who are not

3. The predictions via AWS ML are shown here

Page 3: Salesforce X AWS Machine Learning

Architecture

Trigger

DM Campaign to Top Customers

Completed campaign records store each

campaign member’s status such as sent or

responded.

csv file

Report

Create the ML model based on csv file stored in SFDC. The ML model is a

collection of patterns that Amazon ML finds in your data during training

Campaign members are added and then the trigger is called to execute callout

request to AWS API Gateway to get the

predictionsFeed those data to

Machine Learning for prediction

Page 4: Salesforce X AWS Machine Learning

Prepare Training Data for AWS Machine Learning

4

Campaign

Each campaign members (Contact) has specific attributes for ML such as education, job category, and so on

Once the campaign is completed, the trigger converts campaign member’s status (sent or responded) along with all attributes on his contact/lead record into AWS Training Datasources record. This example generates three AWS Training Datasource records because there are three campaign members for this campaign.

Same data

Target 1 : respondedTarget 2 : sent

Contact

AWS Training Datasource

Page 5: Salesforce X AWS Machine Learning

Upload Training Data source to S3

5

1. In order to feed training datasource to AWS Machine Learning, save all records as csv file via report function

csv file

2. Upload csv file to S3 backet

Page 6: Salesforce X AWS Machine Learning

Set up AWS Machine Learning and API

6

1.Create ML Model from csv file on S3 bucket

2.Review the ML Model’s Predictive Performance

3.Create Lambda function to call the ML model

4.Create Rest API to receive parameters and pass them to Lambda function in order to get prediction based on the ML Model

1

2

3

4

Page 7: Salesforce X AWS Machine Learning

Call the API from Salesforce

7

Once campaign member is added to a campaign, Apex calls the prediction API with the member’s attributes based on his contact record.

Page 8: Salesforce X AWS Machine Learning

Result

8

The API returns Yes or No which the member is likely to respond the invitation and purchase products.

Page 9: Salesforce X AWS Machine Learning