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:
- Getting Started with Watson Assistant
- Watson Assistant Overview Docs
- Click here to learn how to create flows with Watson Assistant.
Available Variables
Available Variables are placeholders for information that are automatically determined based on the contents of your flow. For example, if your flow begins with an Inbound Call trigger, the caller's phone number is stored as a $ANI variable. Later on in your flow, you can send a follow up SMS to the caller by adding the $ANI variable in the Send SMS/MMS action Inputs.
Check out How to Use Variables in SmartFlows for more information.
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 that can be found in the API details of the Assistant Skill associated with the configured Watson Assistant |
Session Timeout (Minutes) | The number of minutes the chat session will continue for. After this time, the session resets |
Watson Credentials
- Log into your IBM account and navigate to IBM Watson Assistant.
- From the Assistants section, select the appropriate previously created assistant.
- Click the Options button (three dots) in the Dialog section and select View API Details from the drop-down menu.
- On the Skill details page, take note of the URL and API key as these are the Workspace URL and Workspace ID Inputs, above.
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 |
Check out How to Use Variables in SmartFlows for more information about using variables in your flow.
Action
Each Watson Assistant action includes two exit ports corresponding to the following outcomes:
-
On Success: The course of the flow if the API request to Watson was successful (port 1).
-
On Failure: The course of the flow if an error occurs with the API request to Watson (port 2). To determine what went wrong, you can access the error code in the "statuscode" variable.