IBM Watson Assistant

The Watson Assistant action connects to the IBM Watson chatbot powered by artificial intelligence to integrate conversational chat for incoming SMS messages.

Note: You must have an IBM cloud account with Assistant enabled in order to use it with SmartFlows.

Having trouble setting up IBM Watson? These links will help you get started:

Inputs

Input Name Description
Password/API Key Your password for your IBM Watson account.
Workspace URL The Workspace URL found in Watson's API details.
Workspace ID The ID which can be found in the API details of the Assistant Skill associated with the configured Watson Assistant.
Session Timeout (Minutes) The number of minutes that the chat session will continue for. After this time, the session resets.

Watson Credentials

  1. Log into your IBM account and navigate to IBM Watson Assistant.
  2. From the Assistants page, select the appropriate assistant.
  3. Click the Skill Options button (three dots) in the Dialog section and select View API Details from the drop-down menu.

  1. On the Skill details page take note of the API Key and URL as these will be Inputs in SmartFlows.

Note: Workspace ID (a required SmartFlow Input field) is included in the Legacy v1 workspace URL after "/workspaces/".

Variables

The Watson Assistant action creates the following variables to be used and evaluated in the rest of the flow:

Variable Name Description
$WATSONASSIST_#.responsebody Entire response from Watson Assistant.
$WATSONASSIST_#.statuscode Code that indicates the status of the API response (e.g., 200 = success, 404 = not found, 403 = forbidden).
$WATSONASSIST_#.response.output.text[0] Text response returned by Watson Assistant.

Exit Ports

The flow has two possibilities of where it will continue after the Watson Assistant action. This is determined by:

Port Name Description
On Success If the API request to Watson was successful.
On Failure If an error occurs with the API request to Watson. To determine what went wrong, you can access the error code in the statuscode variable.