tr Skip to content
Black Friday FlowMattic for life, 12 payments of $33.25 Or $399 once. Nothing added for splitting Ends in --Days --Hrs --Min --Sec See the deal

Workflow Counter: Round-Robin, Milestones and Countdowns

FlowMattic Counter module: each new lead moves a counter through 1, 2 and 3, and the number picks the next sales rep in turn.

A workflow counter keeps a number that survives from one run to the next. FlowMattic’s Counter module adds to it or subtracts from it every time the workflow runs, and can reset it at a number you choose. That one number is enough to share leads in turn, reward every hundredth order or count down the last few places on a list.

It is a small module, but it answers a question most automations can’t: “How many times has this happened?” No spreadsheet or custom field is needed to hold the count.

What is the Counter module?

Counter is a built-in action app in the FlowMattic workflow builder, described as “Store workflow execution count.” It has two actions:

  • Incremental Counter: increase the number every time the workflow executes.
  • Decremental Counter: decrease the number every time the workflow executes.

The current number is stored in your WordPress database, one counter per workflow. You will find Counter with the other data tools in the app picker.

How the workflow counter works

  1. Add a step and choose Counter, then pick Incremental Counter or Decremental Counter.
  2. Set Initial Value, the number counting starts from.
  3. Set Change Value By, the step size, such as 1.
  4. Choose Reset on Execution: Yes shows the Reset Counter After field, No hides it.
  5. If you chose Yes, enter the number at which the counter goes back to the Initial Value.
  6. Test the step and map final_value into later steps.
FlowMattic workflow builder showing the Counter step with the Incremental Counter action, Initial Value, Change Value By, Reset on Execution and Reset Counter After fields.
An Incremental Counter set to start at 1, change by 1 and reset after 3 for round-robin assignment.

What a run returns

  • final_value: the counter after this run. This is the field you will use most.
  • initial_value and change_by_value: the settings used.
  • reset_counter_after: the reset point, when reset is on.

How counting and resets play out

On the first run there is no stored number yet, so the counter starts from the Initial Value and applies the change straight away. With Initial Value 1, Change Value By 1 and Reset Counter After 3, the runs return 2, 3, 1, 2, 3, 1 and so on. When the stored value has reached the reset point, the next run returns the Initial Value instead of adding.

The decremental counter mirrors this. With Initial Value 10, Change Value By 1 and Reset Counter After 0, the runs return 9, 8 and so on down to 0, then 10 again.

Use cases

Share leads between sales reps in turn

The help text calls this running something “in round-robin fashion”. A counter cycling through three numbers feeds a Lookup Table that maps 1, 2 and 3 to Priya Sharma, Yuki Tanaka and Amelia Okafor.

Form submission → Counter (reset after 3) → Lookup Table → CRM: assign owner

Reward the 100th order

Count WooCommerce orders with Initial Value 0, Change Value By 1 and no reset, and let a Filter continue only when final_value equals 100. The hundredth paid order gets the coupon.

WooCommerce: order paid → Counter → Filter: final_value = 100 → Create coupon → Email

Count down limited places

An early-bird offer is open to the first 50 sign-ups. A decremental counter with Initial Value 50 returns 49, 48 and so on, so the first 50 runs get 49 down to 0. A Router sends the early-bird email while final_value is 0 or higher and the standard one after.

Form submission → Counter (decremental) → Router → Email A or Email B

Alternate between two email versions

For a simple split test, cycle between 1 and 2 and route each run to a different subject line. Compare the results in your email tool.

New subscriber → Counter (reset after 2) → Router → Email version 1 or 2

Rotate support tickets across agents

Support teams can spread new tickets evenly. Each run picks the next agent from the cycle and assigns the ticket in the helpdesk.

Email received → Counter → Lookup Table → Helpdesk: assign ticket

Rotate social post templates

Marketing teams that announce every new post can rotate through four caption styles, so the feed doesn’t repeat itself.

WordPress: new post → Counter (reset after 4) → Lookup Table → Social post

Tips and gotchas

  • One counter per workflow. Every Counter step in the same workflow reads and writes the same number. Two counters in one workflow will change each other; put independent counts in separate workflows.
  • Testing counts. Testing the step in the builder runs it for real, so each test moves the stored number on.
  • Changing Initial Value does not restart the count. Once a number is stored, the counter carries on from it. The Initial Value is used for the first run and after each reset.
  • Reset on Execution means “use the reset point”. Despite the label, Yes doesn’t reset the counter on every run; it turns on Reset Counter After.
  • Whole numbers only. Values are read as integers, so 1.5 becomes 1.
  • Not a unique ID generator. Two runs that start at the same moment can read the same stored value. For invoice numbers that must never repeat, use a source built for unique numbers.

Related features

  • Lookup Table: turn the counter’s number into a person, template or channel.
  • Router: send each run down a different path based on final_value.
  • Filter: let the run continue only at the count you care about.

FAQ

How do I do round-robin assignment in WordPress?

Add an Incremental Counter with Reset on Execution set to Yes and Reset Counter After equal to the number of people. Then map final_value to a person with a Lookup Table and assign the record to them.

Where is the counter value stored?

In your own WordPress database, one value per workflow. It persists between runs until the reset rule sends it back to the Initial Value.

Why does my first run return 2 instead of 1?

The first run starts from the Initial Value and applies the change straight away, so Initial Value 1 with a change of 1 returns 2. With a reset, the cycle still covers every number from the Initial Value to the reset point; it simply starts one step in, so map every value in the cycle.

Can I count down instead of up?

Yes. Choose Decremental Counter. It subtracts Change Value By on each run and, with reset on, returns to the Initial Value once it reaches the Reset Counter After number.

A workflow counter is a small step that makes fair rotation and milestones easy. Pick a FlowMattic plan and start counting.

More from the blog