Skip to content
This repository has been archived by the owner on Dec 24, 2021. It is now read-only.
Steve Martinelli edited this page Mar 6, 2018 · 6 revisions

Short Name

Use Watson Services with Salesforce Apps

Short Description

Learn how to use Watson Services in your Salesforce applications.

Offering Type

Cognitive

Introduction

We'll show how to use the Watson SDK for Salesforce to easily access Watson AI services inside Salesforce applications. Using the new Watson Salesforce SDK, you will be able to write Apex applications that access services such as Conversation, Language Translator, Discovery, and more.

Author

By Steve Martinelli

Code

Demo

N/A

Video

Overview

In November 2017 IBM announced the availability of the new Watson Salesforce SDK, it is just one of the many exciting things resulting from the IBM & Salesforce partnership. An SDK is an important tool in a developer's toolbox. The Watson Salesforce SDK allows Salesforce developers to integrate Watson AI into their Salesforce applications more easily than ever before. In simple terms, its a bunch of pre-packaged code that developers can use to quickly to properly access the Watson APIs. Using an SDK saves a developer immeasurable time and frustration. Integrating Watson using the Apex codebase typically requires hundreds of lines of code to be written. Using the SDK, you can accomplish the same feat with as few as five lines of code!

In this code pattern we will be using the new Watson Salesforce SDK by interacting with various Watson APIs in Apex, a Salesforce specific programming language. The Watson Salesforce SDK currently supports:

  • IBM Conversation V1
  • IBM Discovery V1
  • IBM Language Translator V2
  • IBM Natural Language Classifier V1
  • IBM Natural Language Understanding V1
  • IBM Personality Insights V3
  • IBM Speech To Text V1
  • IBM Text To Speech V1
  • IBM Tone Analyzer V3
  • IBM Visual Recognition V3

When the reader has completed this code pattern, they will understand how to:

  • Create a Salesforce account.
  • Install the Watson Salesforce SDK.
  • Use the Watson Salesforce SDK to make calls to Watson Visual Recognition, Watson Discovery, and Watson Tone Analyzer APIs.
  • Use the Lightning UI debugger to view the results of the APIs.

Flow

  1. User logs into the Salesforce platform and brings up the Developer Console.
  2. Write Apex code into the Developer Console using the Watson Salesforce SDK.
  3. Execute the Apex code that calls the Watson APIs.
  4. The Watson API results are returned to the Salesforce Developer Console debugger.

Included components

  • Watson Visual Recognition: Visual Recognition understands the contents of images - visual concepts tag the image, find human faces, approximate age and gender, and find similar images in a collection.
  • IBM Watson Discovery: A cognitive search and content analytics engine for applications to identify patterns, trends, and actionable insights.
  • IBM Watson Tone Analyzer: Uses linguistic analysis to detect communication tones in written text.

Featured Technologies

  • Salesforce DX: An integrated, end-to-end platform designed for high-performance agile development.
  • Apex: A strongly typed, object-oriented programming language that allows developers to execute flow and transaction control statements on the Lightning Platform server, in conjunction with calls to the API.

Blog

Links