Use this method to reset a list of variables to their default values. If a variable has no default value assigned, its value is set to null
.
Name | Type | Description |
---|---|---|
variableList | Array of strings | The names of the variables whose values you want to reset |
This method has no optional parameters.
This method calls the Chat API’s DELETE /conversation/variables
endpoint. It returns a Promise with the API response data. Please refer to the Responses section of the endpoint on the Chat API Routes page for the response format.
The following example resets 2 variables, first_name and last_name:
var deleteVariableList = [
"first_name",
"last_name"
]
chatbot.api.resetVariables(variableList);