Set Variable Values

Chatbot can set variables and its values at any time of the chat flow. It comes handy when you have to pass specific variables and values into Webhooks or API calls you make via Chatflow or store the user button choices somewhere for later use.

IDTypeTextGoto
SetVariable-LoanChoiceHome Loan

Optionally, you can also specify the type of the variable to be set. By default if no type is specified in SetVariable, it assumes “text” type. The valid types supported are date and number. Date can be used to manipulate the date and store it as string in the desired format. Example:

IDTypeTextGoto
SetVariable-start_date-dateDate=today,format=YYYYMMDD

Number can be used to do any arithmetic operation on variables and store the result in a new variable. Example:

IDTypeTextGoto
SetVariable-num-number({{vars.num}}+1)*2