You can use IBM App Connect to pass key data into IBM Watson Discovery from other apps – automatically, in real time.

App Connect enables you to add data to Watson Discovery quickly, by configuration and data mapping (so that you don’t need to use any coding), allowing you to achieve a return on your investment in minutes/hours, not days/months.

This guide is to show you how…

If you can’t find what you want, or have comments about the “how to” information, please either add comments to the bottom of this page or .

About Watson Discovery

Watson Discovery is an analytics service which enables you to rapidly search both structured and unstructured data to extract meaningful insights.

You can use the Discovery tooling (a complete set of online tools) or the Discovery API to get started with Watson Discovery and once you’re ready you’ll need to create an environment, and a collection to which you add documents. Once this has been set up you can search your collection of documents to find specific information and extract actionable insights.

Data can be in the form of Word, PDF, HTML, and JSON documents. The data is converted and enriched to make it easier to explore and discover insights. The data is then indexed into a collection from which you can create a query to understand the data and extract meaningful insights.

Watson Discovery environment
A Watson Discovery environment contains collections which contain documents

A typical business scenario

You run a busy travel marketing company and you want to have more meaningful engagements with your customers. The best way to achieve this is through data analysis of the information in your various CRM systems so that you can discover patterns and work out the best way to reach and engage with your customers. However with information spread across different applications it’s impossible to collate this data to analyze.

How App Connect can help

You can use the Watson Discovery connector in App Connect to quickly and easily transfer data from any data source and send it to Watson Discovery to extract insights. Essentially, App Connect can help you build up a collection in Watson Discovery. For example, every time a lead is created or updated in Salesforce, it will be added and updated in Watson Discovery. So every lead represents a document in a collection. Think of it as having data sync capabilities which can help keep data in Watson in sync with any changes that occur in your source app.

You can even load data from different source apps, such as Salesforce and Sugar CRM, into the same collection in Watson Discovery. This would solve the business conundrum described above. Each app will be uniquely identified by the source name and source ID. This way each object is kept separate in Watson Discovery and easily identified.

What should I consider first?

Before you use App Connect Designer with Watson Discovery, make sure you have provisioned the Watson Discovery service in IBM Cloud and you have an environment and collection ready. To provision a Watson Discovery service, click the following link – IBM Cloud Watson Services.

You can connect App Connect to the Watson Discovery application either from the Applications tab on the App Connect Catalog page, or when you add the application to a flow. You’ll need to provide the following connection details:

  • Base URL: Specify the base URL for the Watson Discovery service endpoint; for example:
    https://gateway.watsonplatform.net/service-name/api
  • API key: If your service instance supports token-based Identity and Access Management (IAM) authentication, specify the API key for that instance. (Leave the User name and Password fields blank.)
  • User name: If your service instance uses Cloud Foundry service credentials for authentication, specify your user name for that instance. (Leave the API key field blank.)
  • Password: If your service instance uses Cloud Foundry service credentials for authentication, enter the password for the specified user name. (Leave the API key field blank.)
    • Example of completed fields for connecting from App Connect using IAM authentication

      Example of Watson Discovery connection details

    You can find the connection values on the “Service credentials” page for the service instance in IBM Cloud:

    1. Log in to IBM Cloud.
    2. From the IBM Cloud Dashboard, click the Watson service instance that you want to work with.
    3. To view the service credentials, click Service credentials in the left pane, and then click View credentials.
      • If your service instance supports IAM authentication, copy the URL and API key, and paste them into the App Connect fields.

        Viewing the IAM authentication credentials for Watson Discovery

      • If your service instance supports Cloud Foundry authentication, copy the URL, user name, and password, and paste them into the App Connect fields.

As described above, when you’re creating your flow you’ll need to enter a source name and source ID. Figure 2 below illustrates where you specify the source name and ID in App Connect. Figure 3 shows where these fields are displayed in the Watson Discovery tooling UI.

Specify the Source and Source ID in App Connect
In the Watson Discovery tooling, the source and source ID fields are displayed in the metadata section.

You can also use the metadata section in the App Connect UI to attach tags or labels to your objects so that you can then use those to search for and retrieve objects in the Watson tooling UI.

Add metadata in App Connect to facilitate search and retrieve of objects

Although Watson Discovery and the Add document object in App Connect support Word, HTML, and PDF documents; only JSON is supported for the other App Connect objects because you map to the payload in a JSON file and do not upload files. In the following image (Figure 4), a Salesforce Lead object has been selected. An example of the data that will be queried is displayed beneath the Salesforce lead object. This is the data that will be indexed into a collection, in other words, the data you want to query. Figure 5 shows the query and illustrates where the data is displayed in the Watson Discovery tooling UI.

Specify the input you want to index in the collection
Payload in the Watson tooling UI

Example

Retrieve file content from Google Drive then add the document to the Watson Discovery template tile

Introducing support for binary files for IBM Watson Discovery

Explore the new binary file support for the IBM Watson Discovery application in App Connect.

Join The Discussion

Your email address will not be published. Required fields are marked *