- The Counter component enables branching the flow based on the number of times it's executed. Each encounter with the counter node results in an increment of the counter.
- Increment the count until it reaches: You can mention the maximum number of times the counter can be executed.
-
States: Counter component is set to Count Reached state when the component is executed Max Count number of times. Otherwise, it is set to the Count Not Reached state.
- In the above example, when an incoming call is received, the Queue and Route_1 component is triggered.
- If either of the following conditions are met, then the Counter_1 node is triggered: Enqueue Failed, Wait Timeout, Assignment Failed.
- The Queue and Route_1 will get triggered until the counter value is reached. Since the counter value is set to 1, the Queue and Route_1 component will be executed once. If the count is reached, then the next node will execute(if configured). In the above example, when the count is reached, a prompt will be played to the caller.