Digital tools · 9 min read
FlowMattic: Counter Rotation and Reset
Counter retains a number between workflow runs for rotations or milestones. Before assigning real work, understand its first increment, reset behavior and limitations when executions overlap.
Quick answer
FlowMattic Counter suits rotating tasks when one shared number per workflow fits the job. It is unsuitable as a unique-number generator because simultaneous runs can read the same stored value.
Choose a task that one stored number can direct
Counter provides incrementing and decrementing actions and saves the number in the WordPress database for subsequent executions. A repeating sequence can select the next handler or message template; a continuing total can identify a milestone. Begin by defining exactly which event the number represents. Counting a submitted form requires a trigger that corresponds to the event you actually intend to count. If two teams need independent sequences, placing both in one workflow does not create two separate stored numbers. Write the assignment rule before configuring the step. That makes it easier to spot requirements, such as strict uniqueness under overlapping execution, that this simple counter cannot safely satisfy.
Predict the first result and the reset boundary
Initial Value is not necessarily the first returned result. With an initial value of 1 and an increment of 1, the first result is 2. A reset point of 3 then produces 3 followed by 1, after which the cycle repeats. For three handlers, map all three possible values and recognize that the handler associated with 2 receives the first assignment. The label Reset on Execution is easy to misread: choosing Yes enables a reset threshold rather than restarting on every execution. When the saved value has reached that threshold, the following run returns to Initial Value. Predict the result immediately before and after that boundary rather than inspecting only a single successful test.
Separate the number from routing decisions
The output used by later steps is final_value. A Lookup Table can translate that number into a handler or template, a Router selects a path, and a Filter allows continuation at a selected milestone. Keeping these roles separate lets you change the people without changing the counting rule. As an illustrative mapping, positions 1, 2 and 3 could represent teams A, B and C; the sequence 2, 3, 1 would then select B, C and A. This describes selection, not proof that a downstream assignment succeeded. Inspect the final delivery step as well as the mapping, including what happens when no destination is found, so a valid number does not silently become an unassigned task.
Understand shared state and overlapping runs
Every Counter step in the same workflow reads and writes the same saved number. Adding another counter for an unrelated purpose can therefore disturb an existing rotation. Use separate workflows when the counts must be independent. More importantly, the documentation warns that two executions beginning together can read the same stored value. Do not use Counter to issue invoice numbers or other identifiers that must never repeat. For the same reason, a remaining-place counter should not be treated as a guaranteed reservation system. If exact assignment order or strictly limited availability must hold during simultaneous requests, resolve that requirement before choosing this configuration. A convenient rotation mechanism is not evidence of transactional uniqueness.
Plan tests around persistent state
Testing the step in the builder runs Counter for real and advances the stored number. Record the starting state, number of tests and expected outputs, then reconcile the saved position before accepting real events. Changing Initial Value alone does not erase the existing count: that setting is used when there is no stored number and after a reset. Values are read as integers, so a design depending on a fractional increment is inappropriate. For a decrementing example, an initial 10 with a step of 1 produces 9, 8 and eventually 0; with reset enabled at 0, the next result is 10. Check a complete cycle rather than treating one plausible output as sufficient evidence.
Choose a licence for the actual deployment
FlowMattic licences are selected by site count, and its plan description includes the full plugin and unlimited workflow executions. A one-site licence offers USD 149 yearly or a USD 399 lifetime purchase, with the listed lifetime offer running until 15 December. Three years at an unchanged USD 149 rate would total USD 447, which is USD 48 above USD 399. That is only a licence-payment comparison; taxes and hosting are outside the calculation. Open the FlowMattic offers page on VoucherHita and check the final total and one-site scope at the merchant. Also check WordPress 5.0 or newer, PHP 8.1 or newer, and enabled cron. Unlimited executions do not remove the need for adequate server resources.
Key features
- Starting at 1, adding 1 and resetting at 3 returns 2, 3, 1 because the first run applies the increment.
- Counter steps within one workflow share state, and testing a step changes that state.
- Licences are selected by website count rather than the number of counter increments.
Common questions
Why does the first execution return 2?
Counter applies the increment immediately to Initial Value. Starting at 1 and adding 1 returns 2, so the destination mapping must account for that first-run behavior.
Do two Counter steps keep independent numbers?
Not within the same workflow: both affect the same stored number. If two jobs require independent sequences, separate them into appropriate workflows before configuring their counters.
Can it guarantee unique order numbers?
No. The documentation warns that simultaneous executions can read the same number. Identifiers requiring uniqueness need an appropriate dedicated mechanism rather than relying on Counter.
Does changing Initial Value restart the count immediately?
No. The saved count continues to be used. Initial Value applies before the first stored value exists and when the configured reset returns the counter to its starting point.
Official sources to check
Some links in this article lead to a store or service provider. If you buy or sign up through them, ITA may earn a commission at no extra cost to you.