Request Demo

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.

ID Type Text Goto
SetVariable-LoanChoice Home 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:

ID Type Text Goto
SetVariable-start_date-date Date=today,format=YYYYMMDD

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

ID Type Text Goto
SetVariable-num-number ({{vars.num}}+1)*2