Developers

ResetVariables

Usage

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.

Mandatory parameters

Name Type Description
variableList Array of strings The names of the variables whose values you want to reset

Optional parameters

This method has no optional parameters.

Response data format

This method calls the Chatbot 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 Chatbot API Routes page for the response format.

Example

The following example resets 2 variables, first_name and last_name:

var deleteVariableList = [
  "first_name",
  "last_name"
]

chatbot.api.resetVariables(variableList);