# Counter

![](/files/-M5NbiXoV2HqfhAk45yo)

## **Function**

This module is designed to keep track a variable and increment every time the module is visited.\
It is most commonly used to keep track the number of occurrence a section has gone through (ex: user attempts) before branching to different call flow.

Additional comparison conditions can be added / removed from the module by pressing the add and remove (<img src="/files/-M4u9_-hAMbYcqwmycsz" alt="" data-size="line">) buttons.

If the comparison condition is true, the call path will be directed to the node to the side of the condition (<img src="/files/-M4u9_173BZvzhbMevd3" alt="" data-size="line">).\
If the counter does not match any of the conditions listed, the call will then go through the node at the bottom of the module (<img src="/files/-M4u9_15oYs9vApEAHhJ" alt="" data-size="line">).

By default, the counter for the variable to be assessed starts at 0. Each time the call-flow passes through this module, the variable's value increases by 1.

The variable's name that is defined in the module comes from the module's title bar. It can also be referred to later in the call flow with that variable name.\
The counter variable can also be reset by using the [Set Variable](/fuse/data/set-variable.md) (<img src="/files/-M4u9_1erfLmEXGdGKYs" alt="" data-size="line">) module, in order to reset the attempt counter when a success attempt has occurred.

## **Common Use Cases**

| Use Case                                                   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | Example                                                             |
| ---------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
| <p><strong>Login</strong><br><strong>Attempts</strong></p> | <p>The counter module can be used to keep track of the number of attempts before directing the caller to a different call path.<br><br>In this example, if the caller provides a wrong login information 3 times, the call will transfer to a representative instead of allowing the caller to continue to retry the login.<br><br>Here is what happens each time the call goes through the module:<br>1) <em>login\_attempt</em> = 1 - invalid\_prompt and retry<br>2) <em>login\_attempt</em> = 2 - invalid\_prompt and retry<br>3) <em>login\_attempt</em> = 3 - transfer</p> | <img src="/files/-M5NbiZEH4lxzvkFy1kU" alt="" data-size="original"> |

## **Comparisons**

User may set the comparison terms

* Equals to ( = )
* Greater than ( > )
* Lesser than ( < )
* Greater than or equals to ( ≥ )
* Lesser than or equals to ( ≤ )
* Not equals to ( ≠ )

## **Module Settings**

* None


---

# 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.plumvoice.com/fuse/call-flow/counter.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.
