Wilson Mar bio photo

Wilson Mar


Email me Calendar Skype call

LinkedIn Twitter Gitter Instagram Youtube

Github Stackoverflow Pinterest

Artificial Intelligence built into the Saleforce you already have

US (English)   Español (Spanish)   Français (French)   Deutsch (German)   Italiano   Português   Estonian   اَلْعَرَبِيَّةُ (Egypt Arabic)   中文 (简体) Chinese (Simplified)   日本語 Japanese   한국어 Korean


Salesforce users are able to enjoy the productivity gains from advances in AI quicker and easier than most other systems because AI is being built under the UI users are already familiar with.

The Salesforce advantage in AI

Unlike many other companies which have customer-built systems, building AI capabilties requires hiring expers, then integrating AI into existing systems, Salesforce users already have data structured and stored for use by AI.

Einstein can be “simply” added to process existing data. For example, text users enter into a service request form can be designated for analysis. The Einstein Intent API processes the text to automatically determine how to routed the request to the correct department.

CEO Benioff has also been a lead investor in machine translation company Cloudwords since its seed funding days.

Shubha Nabar (Senior Director, Software Engineering) is the Einstein boss at Salesforce. See her talk Mar 7, 2017 [18:58]:

API Endpoint

Salesforce purchased 200 data science people by its acquisition of Metamind. Thus, “api.metamind.io” was the previous endpoint to APIs, which is now:


To get an RSA Token used to make service calls:


Save that in a safe place.

Use your key to get a token at:

https://www.youtube.com/watch?v=0ryXVwJTWxQ Salesforce Einstein Intent API deep dive with Daniel Peter https://github.com/salesforceidentity/jwt/blob/master/JWT.apex

https://www.youtube.com/watch?v=YDw1GieW4cw Auto-Machine Learning: The Magic Behind Einstein by Salesforce Developers

The Einstein Intent API categorizes unstructured text into user-defined labels to better understand what users are trying to accomplish. Use this API to analyze text from emails, chats, or web forms to: Determine which products prospects are interested in, and send customer inquiries to the appropriate sales person. Route service cases to the correct agents or departments, or provide self-service options. Understand customer posts to provide personalized self-service in your communities.

Einstein Offerings


Based on this Einstein: AI in the Salesforce Platform Dec 15, 2016 teaser music video followed by the high-level Marketing pitch breakout session at Dreamforce ‘16:

The “AI-Powered” Einstein features listed in the Sales Cloud pricing sheet at additional cost for Enterprise+ (not Pro): PDF

Einstein Prediction Builder makes predictions about almost any field in Salesforce with just a few clicks. For example, it predicts the likelihood that customers show up for a reservation, so you can prioritize which customers to call for confirmation. This enables more appropriate scheduling of restaurant staff, fill more seats, and make more diners happy.

Einstein Lead and Opportunity Scoring automatically prioritizes the leads and opportunities most likely to convert and close based on history and past deals.

Einstein Account and Opportunity Scoring/Insights shows key business developments on accounts and opportunities. Know whether or not a deal is likely to close by identifying customer sentiment, competitor involvement, and company updates.

Einstein Activity Capture and Automated Contacts to automatically capture data and add new contacts so you can spend less time on data entry and more time selling.

Salesforce Inbox extends the full power of the Salesforce platform to email and calendar and never miss a buying signal.

Sales Analytics to quickly gain pipeline visibility, track team performance, and uncover opportunities to grow business.

https://www.youtube.com/watch?v=R07CtsAmrd0 Einstein Analytics Overview Jun 14, 2017 [1:30]

Image classification





https://www.youtube.com/watch?v=1l6D4TWnDq0 Introducing Einstein Voice Oct 16, 2018

Salesforce Social Studio Vision

Salesforce Social Studio integrated with Einstein Vision was one of the first Einstein capabilities released. It enables users to “visually listen” for attributes about an image, such as detecting a brand logo or that of its competitor in photos – in order to learn more about the subjects’ lifestyles and preferences.

Trailhead Projects:

Einstein Language

“Einstein Language” builds natural language processing (NLP) into apps and unlock powerful insights within text. Einstein Language contains two NLP services: Einstein Intent and Einstein Sentiment APIs:

  • The Einstein Sentiment API classifies text into positive, negative, and neutral to understand what the words people use can tell us about how they’re feeling. Use this API to analyze emails, social media, and text from chat to: Identify the sentiment or emotion in a prospect’s emails to trend a lead or opportunity up or down. Provide proactive service by helping dissatisfied customers first or extending promotional offers to satisfied customers. Monitor how people perceive your brand across social media channels, identify brand evangelists, and note customer satisfaction.

Einstein Bots

Create one:

  1. In the “Quick”, type “bots” to click “Einstein Bots”.
  2. Toggle “Einstein Bots” on.
  3. Click “I’m authorized by my company to accept these terms.”
  4. Click “Try Einstein”.
  5. Click “New” for the Welcome page.
  6. Click Next.
  7. Enter Bot name and description.

Einstein Dataflow


Users with the “Edit Wave Analytics Dataflows“ user permission and an organization with replication enabled.

Salesforce + IBM Watson

The pool of top people who can build AI is limited, and so expensive. https://www.linkedin.com/pulse/einstein-my-dear-watson-predicted-salesforce-joins-ibm-cummins/

So Salesforce has partnered up with IBM.*

https://github.com/watson-developer-cloud/salesforce-sdk is a Salesforce library for Salesforce Apex to communicate with IBM Watson Assistant (Conversations) using REST APIs. See http://www.ibm.com/watson/developercloud/

IBM introduced a service which automatically detects bias and explains how AI makes decisions—as the decisions are being made—runs on the IBM Cloud. IBM is open sourcing their AI bias detection and mitigation toolkit. https://trailhead.salesforce.com/en/projects/surface-data-from-ibm-watson-discovery-in-salesforce Surface Data from IBM Watson Discovery in Salesforce

Get an Einstein org

  1. Spin up an


  2. Verify account in your email.
  3. Click the Object Manager tab.

    Note two new custom objects: AcquiredAccount__c and OpportunityHistory__c.

Einstein Analytics - Setting up Apps Sep 25, 2017 [11:00]:

Get an Einstein Platform Services Account

  1. Use a Google Chrome browser. The Download Key button is only supported in the most recent version of Google Chrome.

  2. Create an Einstein Platform Services APIs account and download keys associated with that account.


  3. Choose whether to sign up using the Salesforce or Heroku account you already have: Click “Salesforce” for a new Lightning org, such as under this URL:


  4. Wait for email “Welcome to Salesforce Einstein Platform Services”.
  5. Click the blue “Sandbox Users”. Select a Salesforce certificate: Production Users Sandbox Users.
  6. At https://test.salesforce.com/, login to your Einsteain org account.

    Reset private key

  7. At https://api.einstein.ai/reset click “Reset my private key”.
  8. Provide your email.
  9. In your email inbox look for subject “Finish resetting your Einstein account’s public key”.
  10. In the email, click “reset you private key”.

    If you see “{“message”:”During update, principal name cannot be null or empty”}”

  11. Click “Download Key”.
  12. On you machine, rename “einstein_platform.pem” with a file named containing your email and date, such as:


    On the activation page, if you’re using Chrome, click Download Key to save the key locally. The key file is named einstein_platform.pem. If you’re using any other browser, cut and paste your key from the browser into a text file and save it as einstein_platform.pem.

  13. Read docs at https://metamind.readme.io/v1/docs

    NOTE: Keys are like a password. But it’s based on key pairs. It’s attached to every request.

Generate OAuth Token

This is done within code,

  • To clone the JWT repo by using command:
git clone https://github.com/salesforceidentity/jwt
  • To clone the Apex code repo by using command:
git clone https://github.com/MetaMind/apex-utils

But to do it manually:

  1. https://api.einstein.ai/token
  2. Type in your account’s email address.
  3. Click “Choose File” and select the einstein_platform…pem (private key) downloaded.
  4. Click “GET TOKEN”.
  5. Double-click the Token and press command+C to copy it to your Clipboard.

Now paste the Token in your API form.

Internal tools

Job Descriptions for Machine Learning Engineer reveal the technologies used behind the scenes:

  • Apache PredictionIO to train and serve models

    It can be installed as a full machine learning stack, bundled with Apache Spark, MLlib (Spark machine learning library), Apache HBase (Hadoop database), Spray and Search engine Elasticsearch (Elastic Stack), which simplifies and accelerates scalable machine learning infrastructure management.

  • Kubernetes for scaling services

  • JVM based languages (Java, Scala) (no Python?) because …

  • SparkML, Google Tensorflow, and Apache Mahout (linear algebra Scala DSL & native solvers for CPU/GPU/CUDA acceleration) machine learning algorithm libraries for Personalization

  • Spark and Amazon EMR (Elastic Map Reduce) on AWS cloud to process massive amount of data in large-scale data pipelines and computation systems

  • Model feature engineering by collecting and processing both batch and streaming data (Kafka)

  • Various machine learning and deep learning techniques for targeted goals to implement and fine-tune, new personalization algorithms

  • Responsive (RESTful) web services that serve contextual recommendations

  • Offline experimentation and online A/B tests

  • Systems to analyze and discover insights from user behaviors

  • Machine learning statistics behind techniques such as collaborative filtering, co-occurrence matrix, and natural language processing (NLP)


Shubha Nabar, Director, Data Science (SalesforceIQ):

Learning resources


  • https://metamind.readme.io/docs/introduction-to-the-einstein-predictive-vision-service

  • https://metamind.readme.io/docs/intro-to-einstein-language

Trail: https://trailhead.salesforce.com/trails/get_smart_einstein Get Smart with Salesforce Einstein</a> [5 hrs 55mins]

  • https://trailhead.salesforce.com/modules/ai_basics Artificial Intelligence Basics 200 points

  • https://trailhead.salesforce.com/trails/get_smart_einstein/modules/einstein_intent_basics Einstein Intent API Basics [1 hr 25 mins]

https://metamind.readme.io/docs/intro-to-einstein-language Einstein Platform Developer Guide



Official:Einstein Analytics for Partners (SIs and ISVs).

For SI Partners:

  • SI PARTNER GUIDE http://sfdc.co/AC_Partner_Guide
  • DEMO ORGS for PARTNERS (A) Add EINSTEIN ANALYTICS/APPS to an Existing ORG or Extension of Expired Demo ORG - OPEN A TICKET: (Partner Community > Support tab > New Request > License Request (under the Salesforce Technology) section)
  • (B) Create NEW Demo ORG Einstein Analytics is available in Partner Developer Edition, Partner Test Enterprise Edition, and Consulting Orgs, which may be created via the Environment Hub.
  • https://partners.salesforce.com/s/education/general/Environment_Hub Einstein Analytics - Org Enablement Guide
  • https://partners.salesforce.com/06930000005LUZ7 Use this guide to enable new users to access Analytics

For ISV Partners: Einstein Analytics for ISVs Getting Started Guide https://partners.salesforce.com/06930000005LUZM


https://trailhead.salesforce.com/en/users/00550000006FDjQAAW/trailmixes/einstein-analytics Phil Choi’s Trailmix for Einstein Analytics

More about Salesforce

This is one of a series about Salesforce

  1. Salesforce index

  2. Salesforce Ohana (about the Salesforce company, offices, mascots, emojis, and store)
  3. Salesforce Glossary (of acronyms)
  4. Salesforce Events (Conferences, local Meetups, ) to meet people face-to-face
  5. Salesforce Exhibitors (at Dreamforce)
  6. Salesforce Onboarding (Trailhead and IDEs)
  7. Salesforce Rock Stars (and influencers)

  8. Salesforce Offerings (Clouds, Industries, Domains, GitHub, editions, pricing, features, versions)
  9. Salesforce Certifications (training and exams)
  10. Salesforce Projects, Superbadges, and Sample Apps
  11. Salesforce myTrailhead for custom Trailhead content

  12. Salesforce Project Plans
  13. Salesforce Jobs (within Salesforce, with partners, etc.)
  14. Salesforce User Roles and Personas

  15. Salesforce Apps (in AppExchange)
  16. Salesforce Alexa
  17. Salesforce Heroku (external apps)
  18. Salesforce DX (Developer eXperience)

  19. Salesforce Non-Profit support
  20. Salesforce NPSP (Non-Profit Success Pack) performance (with Gatling)

  21. Salesforce Data Management
  22. Salesforce Einstein
  23. Salesforce Selenium (test automation)