> ## Documentation Index
> Fetch the complete documentation index at: https://help.maestra.io/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Limit Flow Runs per Customer or Order

Don't want the same customer getting a flow over and over? Set how often it can run for each customer — and, for order events, for each order — right in the flow's start block.

## How to set the limit

Set the conditions you need in the flow's start block. What happens when a customer goes over the limit depends on the start block:

| Start block | What happens over the limit |
| - | - |
| **Schedule** | Customers don't enter the flow. |
| **Event** | Customers enter the flow but their run ends at the next step group. |

### Apply to customer

Pick one of these options:

* **Once** — the flow runs for the customer once over its entire lifetime, even if the flow was edited.
* **Every time** — the flow runs for the customer every time they have a matching event. You can also cap the total number of runs.
* **At most once per period** — the flow runs for the customer no more than once in the current day, or once every N minutes, hours, days, weeks, months, or years. You can also cap the total number of runs.

### Apply to order

With the [*New order*, *Order data changed*, and *Order status changed* events](https://help.maestra.io/flows/what-events-can-trigger-a-flow.md), you can also set how often the flow runs per order:

* **Every time** — the flow runs on every change to the order that matches the flow's conditions.
* **Once** — the flow runs on only one matching event per order. You can also cap the total number of runs per order. This option is selected by default.

## How the limit works

A few rules shape how the limit counts runs.

### A run counts when a step group executes

* If a step **didn't get to run** because its relevance period ran out, or **failed with an error** (and an issue was logged), the flow didn't run. Don't confuse this with a campaign that came back as not sent after the customer was included in it — that still counts as a run.
* Running **several step groups** for a customer within one flow run **counts as one run**.

For example, a customer gets a reminder a week before their points expire, then another one six days later if they still haven't spent the points on an order. Two step groups ran, but that's one flow run.

### Time counts from the last successful step

So the moment a customer can enter the flow again can shift as they move through the chain.

For example, a flow sends a campaign after a session ends, then issues a promo code three days later. It's limited to at most once every 7 days.

1. The customer's session ends on August 10 at 1:00 PM, and they get the first campaign. They can't enter the flow again until August 17 at 1:00 PM.
2. The limit doesn't affect the current chain — the customer keeps going and gets the promo code on August 13 at 1:00 PM.
3. Now they can't enter the flow again until August 20 at 1:00 PM.

### The count starts when the flow first starts

A customer's runs are counted from the flow's first start. The count doesn't reset, even if you completely rework the flow.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.