The Now Platform® Washington DC release is live. Watch now!

Help
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Grant Hulbert
ServiceNow Employee
ServiceNow Employee

IBM Watson Services Application now available on Share!

[Update Nov 19, 2018] Watson Service deskside chat with Michael Thompson and Darius Koohmarey

 

Introduction

IBM Watson provides many cloud-based microservices, such as language translation, natural language understanding, speech to text, text to speech, visual recognition, etc. Using the attached scoped app, you will be able to easily call these services from within your own ServiceNow applications. This post demonstrates how to sign up for Watson services via IBM Cloud, install the ServiceNow wrapper library that makes Watson REST calls, and concludes with a small demonstration of image recognition to prove that your instance is able to call Watson services. 

PrerequisitesYou will need administrative access to a ServiceNow instance (Kingston or newer), and a IBM Cloud account (with ability to Create services).

Configure Watson/IBM Cloud

If you already have a IBM Cloud account, great! You'll need to know your credentials for each of the Watson services you plan to use -- for the example at the end of this post, you'll need your visual recognition username and password. If you don't have a IBM Cloud account, sign up for one following these instructions.
 
  1. Once you have signed in, navigate to the catalog, scroll down to AI, and select a service supported (Note: Services supported by the application highlighted below in red boxes).find_real_file.png

  2. Then select the plan you wish to use and click Create. The Lite plan will provide everything you need to begin testing.find_real_file.png

  3. Once the Service is created, click show credentials and save the username/password or API Key (depending on the service) as they will be used to update the Authentication Profiles inside ServiceNow.find_real_file.png

Install and Configure Watson Services app on ServiceNow

We've provided a scoped app that has everything you need to call Watson services from ServiceNow. Log in to your ServiceNow instance as administrator, and follow these instructions to install the app and configure it to communicate with your IBM Cloud account that you set up in the previous step.
  1. Log in to your ServiceNow instance as admin
  2. Download and install the scoped app update setfrom here
  3. Navigate to IBM Watson Services -> Authentication Profiles
  4. Open the Visual RecognitionProfile record and update the username/password or if you are provided an API Key, paste the key into the password field, and "apikey" into the usernamefield(Note: if you do not have the Watson Services application selected, a message will prompt you to edit this record: click “here” near the top of the form to continue).

Confirm Connection to Watson

In this example, we will be using Watson Visual Recognition to return information about the following image:
find_real_file.png
 
Try it out! Open Scripts - Background and paste this example code:
var imageURL = 'https://watson-developer-cloud.github.io/doc-tutorial-downloads/visual-recognition/fruitbowl.jpg';
var vr= new x_snc_watson_servi.IBMWatsonVisualRecognition();
var requestBody = vr.classifyImage(imageURL);
gs.info(JSON.stringify(requestBody));
The response will contain the following JSON:
find_real_file.png

Conclusion

You have successfully installed the IBM Watson Services app into your ServiceNow instance, signed up for an IBM Cloud account, and shown that ServiceNow can easily connect with Watson Services APIs from a ServiceNow script.
 

Next Steps

We have provided a wealth of library functions for you to try, and documented every function. Read the docs in the next section, and start wiring up amazing connections between your ServiceNow instance and Watson Services!
 
Here are some ideas to get you started:
  • Analyze image content and store the text description in a ServiceNow table.
  • Use Natural Language Understanding to guide Virtual Agent's paths when responding to user input.
  • Get personality characteristics from chat conversations using Personality Insights.
  • Consider writing a scheduled job that will import your Watson Assistant workspaces and all the sub-elements (intents, entities, etc.). The included functions make it easy; you just need to create a scheduled job to call them!
 

Documentation

Full installation guide documentation can be found on share.
 
Your ServiceNow app contains a reference guide for each of the Watson Services APIs it can call. To see how each API function is called from ServiceNow, follow the steps below: 
  1. Navigate to IBM Watson Services - > {Service (Example:Visual Recognition)} -> ServiceNow Documentationfind_real_file.png

  2. Once the page loads you will be able to explore all function calls, such as what type of parameters need to be passed, example of how to call the function, and expected result.find_real_file.png
 

Authors

Michael Thompson, Technology Alliance Consultant
Grant Hulbert, Senior Technology Alliance Architect
Version history
Last update:
‎10-10-2018 01:08 PM
Updated by: