NLP2SQL

This response is used for using NLP2SQL rules specifically. The response type will be used to convert user query in SQL query and then use the same query to hit information for the give client URL and display as per user requirements.

On dragging the NLP2SQL response, the conversation section appears as follows:

Figure 1. Figure 46- NLP2SQL response in draw flow node

On drop of this response, the form appearing looks as follows:

Figure 2. Figure 47- NLP2SQL From on drop
Graphical user interface, text, application, chat or text message Description automatically generated

The input box is an autocomplete box which tells all the available rule with nlp2sql trigger allowed. And a default OTB: NLP2SQL rule.

If any NLP2SQL trigger rule selected, then skill Id: selected fills automatically else it appears empty:

Figure 3. Figure 48- NLP2SQL Form on Integration selecting NLP2SQL trigger rule
Figure 4. Figure 49- Default NLP2SQL rule selected
Table 1. Table 2 - NLP2SQL Parameters
Parameter Optional/Mandatory Description
Skill Id Mandatory The NLP2SQL skill present in tenant.
Fallback message Optional

Default Value: Could you rephrase the query.

User Value: Customized String.

Message to drop if facing an error for unable to generate query.

Request URL Optional API URL to hit with query to get data as per query
Request Method Mandatory(if Request URL)

Default: POST

Possible Value: POST, GET

Parameter Name Optional

Default: query

Possible Value: user string

This parameter is to identify in what variable to pass generated SQL query.

Request Header Optional JSON Record, to pass customize header.
API Error message Optional Message on API Fail
On Empty Message Optional Message on No data return from the API.
Form Body Type Mandatory(if Request URL)

Default Value: JSON

Possible Value: JSON, FORM, URLENCODED

We also have NLP2SQL with and without option which act similar as Simple response and Integration with and without option.

Other Validation on NLP2SQL Node:

  • It cannot be the first node.
  • It will automatically add a user option response once it is saved with options.
  • Response all ways comes like an integration rule.
  • If deleted, it will be deleted with user option response and its branches will be disconnected.