# Set Variables

Platform allows you to set variables, which can be used inside your chatbot to check a condition, form a message, or by another embedded function

```
ctx.setVar(variableName, variableType, variableValue)
e.g. ctx.setVar("@visitor_first_name", "Text", "Developer")
```

| Parameters    | Description                                                                                                                                                                                                                                                                                                                                                             |
| ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| variableName  | <p>Name of a variable</p><p></p><p>Variable Name cannot has spaces, and must start with an alphabet</p><p></p><p>@VariableName : Save variable in visitor information (e.g. First Name, Email etc), which almost never changes for a visitor</p><p></p><p>#VariableName : Save variable in session, and will reset automatically when the visitor visits next time </p> |
| variableType  | <p>Allowed Types</p><ul><li>Text</li><li>Boolean</li><li>Date</li><li>Number</li><li>Decimal</li><li>Object</li></ul>                                                                                                                                                                                                                                                   |
| variableValue | Any value as per the variable type                                                                                                                                                                                                                                                                                                                                      |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.konverse.ai/platform/embedded-functions/set-variables.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
