Watson is IBM’s cognitive computing technology that understands both structured and unstructured data, has the ability to create hypotheses, learns from collaborations, and interacts with humans in a natural way. IBM Watson provides trained responses that include text, images, and more.
This tutorial will show you how to set up IBM Watson and integrate Watson with your Acquire Chatbot. Only one Watson Assistant may be integrated at a time. If you’ve already set up a Watson assistant, start at the Obtaining the API Key and URL.
In this article:
- Setting Up Watson Assistant
- Obtaining the API Key and URL
- Using IBM Watson in Acquire
Setting Up Watson Assistant
First, you must start a Watson service instance.
Step 2: Load the Watson Assistant page in the IBM Cloud catalog.
Step 3: The Watson service instance will be created in the “Default” resource group.If you wish to change the resource group, change it at this stage as it cannot be changed later. However, this group is sufficient for the purposes of your Acquire Chatbot integration.
If you're creating an instance for production use, which is more robust, you can learn more about resource groups in IBM’s docs.
Step 4: You may be asked to choose an appropriate region/location to deploy your instance in.
Step 5: Press ‘Create’.
You'll now create a Watson Assistant. Assistants are what IBM calls chatbots.
Step 1. Open the Watson Assistant
After creating a Watson Assistant service instance, the Watson Assistant dashboard will appear. You will now be able to manage the Watson Assistant.
Click 'Launch Watson Assistant'. If you're prompted to log in, provide your IBM Cloud credentials.
Step 2. Create an assistant
Click 'Create assistant' to add an assistant.
Name and describe your assistant. Then press 'Create assistant'.
Step 3. Add dialog skills
A dialog skill is a container for the artefacts that define the conversation flow that your assistant will make use of to engage with your customers.
- Click on your assistant tile to open the assistant.
- Click 'Add dialog skill'. Name and describe your skill, then press 'Create skill'.
You will then land on the Intents page. You may also add intents by clicking on ‘Dialog’ on the assistant page.
Step 4. Add intents from a Content Catalog
Here you can add training data that was built by IBM Watson as further skills by adding intents from the Content Catalog. By giving the assistant access to the General Content Catalog, the chatbot will be able to greet and conclude conversations appropriately.
- Click the Content Catalog tab.
- Find General in the list, and then click 'Add to skill'.
A message will display informing you the intent was successfully added.
Step 5. Build a dialog
From the Content Catalog tab, navigate to the Dialog tab.
A dialog defines your conversation flow in the form of a logic tree. It matches intents (what users say) to responses (what the bot says back). Each node of the tree has a condition that triggers it, based on the user's input.
We'll create a simple dialog that handles the greeting and ending intents, each with a single node.
Adding nodes to handle intents
Now let's add nodes between the “Welcome” node and the “Anything else” node to handle our intents.
Click the vertical ellipsis (‘⋮’) on the “Welcome” node, and then select 'Add node below'.
In the If assistant recognizes field of this node, start to type #General_Greetings. Then, select the #General_Greetings option.
Add the response text, “Hello There!”.
Click on the “X” icon to close the edit view. Your changes will be automatically saved.
You will now see three nodes as shown below.
Click the vertical ellipsis (‘⋮’) on the #General_Greetings node, and then select 'Add node below' to create a peer node. In the peer node, specify #General_Ending in the “If assistant recognizes” field, and type “OK. See you later!” as the response text.
Click the ‘X’ icon to close the edit view. Your changes will be automatically saved.
You’ve now created an IBM Watson bot that will respond to visitor greetings. Before integrating this bot with Acquire, you’ll need to obtain your account account credentials.
Obtaining the API Key and URL
To find your IBM account’s API key and URL, navigate to the IBM Cloud Dashboard and click on Resource List. Go to Services and click on your assistant.
You will be redirected to the IBM Watson Service Page. Copy your ‘API key’ and ‘URL’.
[Note: If your URL includes watsonplatform.net, you will be shown a notice to update the URL in your IBM Watson platform. Kindly update and follow the instructions given there. If your URL does not include watsonplatform.net, you are good to go! ]
To find your Assistant ID, click on 'Launch Watson Assistant'. A list of your assistants will display.
Select the vertical ellipsis icon (‘⋮’) icon inside the assistant window and then click on Settings.
Click on the API Details tab. Copy the Assistant ID as shown below.
You’re all set! The IBM Watson chatbot is now ready to be integrated with your Acquire account.
Installing IBM Watson in Acquire
Once you have your IBM Watson credentials, go to the Acquire App Store > Chatbots and click on the IBM Watson tile.
Click ‘Authorize Access’ to authorize the integration.
You’ll be redirected to the Settings tab. In the ‘Client API Key’ field, input your IBM account API key. In the URL, enter your account URL.
In ‘Assistant ID’, enter your Assistant ID.
Then, hit ‘Save’.
Using IBM Watson in Acquire
Now that you’ve installed Watson, you’re ready to use it. Navigate to Chatbots in Acquire’s left-hand panel. Click to install the IBM Watson app from the Third Party Bots list. It may already be installed if you installed it in the App Store.
If it is not yet installed, you will be greeted with a popup. You will need your IBM Watson credentials (account API Key, URL, and Assistant ID) to allow Watson to communicate with Acquire.
Next, you can use a Trigger or Business Rule to engage your chatbot with visitors.
But first, you may want to test out your new bot. To set up a simple Business Rule, go to Settings > Workflows > Business Rules. Click on ‘New Rule’ and choose ‘Chat’ as your ‘Channel’ and ‘On New Conversation’ as your ‘Trigger Type’. Then press ‘Create’.
Create a new branch, and choose ‘Assign Bot’. From the bot drop-down menu, select ‘IBM Watson’.
Your Business Rule should look like the image below.
‘Save’ the Business Rule and use the toggle button to activate it (right, green). Be sure to check that no other Business Rules or Triggers are overriding it.
Go to your Dashboard, and click on ‘Go to Chat Simulate Page’.
Once there, engage the bot in a conversation by clicking on the launcher and beginning a new conversation. The bot should respond with the text you’ve entered.
To learn more about IBM Watson’s Assistant, check out IBM’s documentation.
Having trouble? Reach out to email@example.com.