# Constants

### Definition

A constant is a name with a value assigned to it. This constant can then be used everywhere within Atfinity instead of the value itself. This makes it very easy to quickly adapt values in a configuration if required.

### Examples

A bank calculates a risk score for every new client they onboard. Several expressions in Atfinity, like conditions of rules and transitions or formulas of calculated [information](/guides/glossary/information.md), check whether the risk score is above or below a certain threshold. The value of this threshold is a perfect candidate for a constant.

```
CONSTANTS.THRESHOLD := 7
```

On the left side of the assignment operator `:=` is the definition of the constant, on the right side the value of the constant.

`THRESHOLD` can then be used in expressions instead of the hard coded value `7` , for example in the following condition:

```
p is Person
p.risk_score > CONSTANTS.THRESHOLD
```

If the bank ever decides to adapt their risk scoring procedure and wants to change the threshold, one only needs to change the value of the constant instead of changing the value in every condition.


---

# 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://docs.atfinity.io/guides/glossary/constants.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.
