Open Forms with IBM Watson

Create an open form type to use with the Text Form node and IBM Watson.

The open form type connects to a natural language processing (NLP) engine and matches JSON name-value pairs of interest.

Name

Give the open form type a name.

Description

Enter a description for the open form type.

NLP Engine

Select IBM Watson.

Assistant URL

Enter the IBM Watson Assistant URL.

You can find this on the Assistant Settings screen on the API Details tab.

Service API Key

Authenticate with the IBM Watson service API key.

You can find this on the Assistant Settings screen on the API Details tab.

Test Query Text

Type a brief typical inquiry that you would expect to receive.

Example:

When using the IBM Watson agent that provides information about a store, here are some examples.

  • Are you open on Sunday?

  • Are you open on the twenty-first of August?

  • Are you open at Christmas?

The maximum query size is 2,000 characters. If the query is too long, the open form configuration will not save. Studio warns you when the query is too long.

Test Query Parameters

Following on from the above example, you can add a new holiday as follows.

Example: {

"input": {

"entities": [

{

"entity": "holiday",

"value": "easter"

}

]

}

}

For more information on query parameters, see the Watson Assistant 2 documentation.

Response

Click Preview Response to see the JSON name-value pairs.

Assign Values to Variables

Match JSON name-value pairs of interest.

  1. Click a JSON name-value pair from the preview response.

    The path to the selected name-value pair displays in the JSON Path field.

    The value displays in the black strip under the path.

    Note:

    Voice channels can only access name-value pairs inside the queryResult object. Digital channels can access name-value pairs inside and outside of the queryResult object.

    To edit the JSON path, select Editable JSON. For more information, see Editable JSON.

  2. Give a name to the JSON name-value pair in the Assign path to Return value name field.

    This name represents the JSON name-value pair in the form node.

  3. Click Add Return Value.

    The JSON path and name are added to the table of return values.

  4. Repeat. Select another JSON name-value pair.

Table of Return Values

The form node has access to items in the table of return values. In the form node, return values from matched pairs are assigned to variables.

Click Test to show the value assigned to a JSON path. The value shows in the black strip under the JSON Path field.

Advanced ASR Settings

In the Form node, these settings are initially applied and can be further tuned.

Do not tune unless you have a clear understanding of how these settings affect speech recognition. Generally speaking, the default settings are the best. To return a setting to its default value, remove the value from the field and click outside the field.

Timeout Settings

Description

No Input Timeout

Wait time, in milliseconds, from when the prompt finishes to when the system directs the call to the No Input Event Handler as it has been unable to detect the caller’s speech.

Speech Complete Timeout

Speech Incomplete Timeout

Use these settings for responses with an interlude to ensure the system listens until the caller's speech is finished.

Speech Complete Timeout measures wait time, in milliseconds, from when the caller stops talking to when the system initiates an end-of-speech event.

Speech Incomplete Timeout measures wait time, in milliseconds, from when incoherent background noise begins and continues uninterrupted to when the system initiates an end-of-speech event.

Speech Start Timeout

Wait time, in milliseconds, from when the prompt starts to play to when the system begins to listen for caller input. This is similar to the scenario where barge in is enabled.

Barge In Sensitivity

Raising the sensitivity requires the caller to speak louder above background noise. Applicable when Barge In is enabled.