Skip to content
This repository has been archived by the owner on Nov 9, 2020. It is now read-only.

Demo for Salesforce Einstein Sentiment Analysis (Natural Language Processing)

License

Notifications You must be signed in to change notification settings

hleb-kastseika/salesforce-einstein-sentiment-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Salesforce Einstein Sentiment Analysis Demo

License

Steps for using

  1. Sign up for an Einstein Platform Services Account. Follow this link to know more details – https://metamind.readme.io/docs/what-you-need-to-call-api#section-get-an-einstein-platform-services-account

  2. Upload the Key obtained in step 1 into Salesforce Content. Follow this link to know more details – https://metamind.readme.io/docs/upload-your-key

  3. Deploy Demo stuff to Salesforce (using bellow button or manually)

Deploy to Salesforce

  1. Create Remote Site Setting for Einstein APIs (read more here)

  2. Populate Custom Settings

custom_settings_screenshot

  1. Use EinsteinService class for getting sentiment of text. Example for Anonimous execution in Developer Console:
EinsteinService einstein = new EinsteinService();
SentimentAnalysisResponse response = einstein.findSentiment('I love Salesforce!');
System.debug('Response = '+ response);

In log we get next result:

Response = SentimentAnalysisResponse:[probabilities=(Probabilities:[label=positive, probability=0.49315557], Probabilities:[label=neutral, probability=0.3688144], Probabilities:[label=negative, probability=0.13803007])]

Copyright © Gleb Kosteiko