Use this method to return information on specific variables. Such information includes the value currently assigned to the variable, the variable scope and, if the type of the variable is 'List' or 'Dynamic List', the possible variable values.
Name | Type | Description |
---|---|---|
variableList | Array of strings | The names of the variables whose information you want to obtain, separated by commas |
Name | Type | Description |
---|---|---|
revealValues | Boolean | Whether or not the method should return variables that are obfuscated. Default value: false |
This method calls the Chatbot API’s POST /conversation/variables/options
endpoint. This method returns a Promise with the API response data. Please refer to the Responses section of the endpoint on the Chatbot API Routes page for the response format.
The following example will ask for the type of vehicle and colour:
var variableList = ['vehicle','colour']
chatbot.api.getVariablesOptions(variableList);