A couple of months ago I started working on integrating IBM Watson with Salesforce. The original post described the overall design, in this follow up I discuss how to install and use the lightning component.
Pre-requisites
- Knowledge of Apex and the force.com platform
- IBM Watson Developer Account - You need valid IBM Watson developer account see here on how to get started
- Twitter App - The Personality Insights service uses this as input. Guide on creating a Twitter App
Getting Started
This section highlights all the necessary config required in your Dev Org to get up and running with the component.
- Deploy the components to a Dev org. Head over to the GitHub Repo and deploy using the Deploy to Salesforce button
Update Custom Settings
- IBM Watson Service Credentials - Setup a IBM Watson Developer Account and create a Personality Insights Service
- Grab the credentials and store in the
IBM_Watson_PersonalityInsights
Custom Setting. The URL for the service is actuallyhttps://gateway.watsonplatform.net/personality-insights/api/v2/profile
*Twitter API - Create a App onhttps://apps.twitter.com/
and grab the key and access token - Store the credentials in
Twitter_API
Custom Setting
- Enable My Domain - Find the option in Setup and select a domain, make sure its enabled before progressing to the next step.
- Add Component to Contact Page -The Personality Insights Component should be placed on the Contact Record Home page. In order to do this you need to enable App Builder for Lightning Pages if you haven't done so already.
- Remote Site Settings - API callouts to the Twitter API and IBM Watson need to be setup as remote sites.