salesforce-einstein-sentiment-analysis icon indicating copy to clipboard operation
salesforce-einstein-sentiment-analysis copied to clipboard

Demo for Salesforce Einstein Sentiment Analysis (Natural Language Processing)

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