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 send us comments by email.
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.
You can upload data in the following document formats: Word, PDF, HTML, and JSON documents. Data input can also be in binary format; this makes it easier to upload PDF and Word documents containing rich media content. 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.
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 – Discovery.
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 for token-based Identity and Access Management (IAM) authentication:
- Base URL: The base URL for the Watson Discovery service endpoint; for example:
- API key: The API key for the instance
Example of completed fields for connecting from App Connect using IAM authentication
You can find the connection values on the “Service credentials” page for the service instance in IBM Cloud:
- Log in to IBM Cloud.
- From the IBM Cloud Dashboard, click the Watson service instance that you want to work with.
- To view the service credentials, click Service credentials in the left pane, and then click View credentials.
- Copy the URL and API key, 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.
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.
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.