---
id: "tools/targeting/checkpoints/targeting-rules"
title: "Creating rules"
description: "A targeting rule says: At these Checkpoints, this audience gets this Flow or Offering. Create rules from Targeting in the dashboard."
permalink: "/docs/tools/targeting/checkpoints/targeting-rules"
slug: "targeting-rules"
version: "current"
original_source: "docs/tools/targeting/checkpoints/targeting-rules.mdx"
---

> **AI agents:** This is the Markdown version of a RevenueCat documentation page. For the complete documentation index, see [llms.txt](https://www.revenuecat.com/docs/llms.txt).

A targeting rule says: At these Checkpoints, this audience gets this Flow or Offering. Create rules from **Targeting** in the dashboard.

## Flows and Paywalls

A Flow is one or more RevenueCat UI steps that you build in the dashboard and serve to customers at a Checkpoint. With Checkpoints enabled, the **Paywalls** page becomes **Flows and paywalls**, and it holds every Flow you build. Most Flows today are Paywalls, but a Flow doesn't have to include one. An onboarding Flow, for example, could have no Paywall at all.

### Serve a Flow or an Offering

A targeting rule serves either a Flow or an Offering:

- **Flow.** RevenueCat UI you build in **Flows and paywalls**. The SDK presents it for you.
- **Offering.** Your app gets the Offering and shows its own paywall through a [custom paywall presenter](https://www.revenuecat.com/docs/tools/targeting/checkpoints/implementation#use-your-own-paywall-ui).
  - Without a presenter, the SDK shows the Offering's default Flow, or RevenueCat's default paywall if it has none.

### Use one Offering on many Paywalls

Previously, each Offering could only have one Paywall attached to it. Now, when serving Paywalls through Checkpoints, any number of Paywalls can use the same Offering.

When selecting the Offering to use on a Paywall, you'll now see Offerings grouped as either:

- **No attached flow**: By selecting this Offering, you attach this Flow to it. The Flow is delivered to customers whenever this Offering is served directly, and can also be served through Targeting.
- **Flow attached**: An Offering with a Flow already attached will still deliver that Flow to customers when this Offering is served directly. Additional Flows using that Offering can be served through Targeting.

:::warning[Shared Offerings only reach the SDK through Checkpoints]

The Offering's default Flow is the one returned by `getOfferings` and shown by older SDKs, which support only one Flow or Paywall per Offering. Any other Flow that uses the Offering is delivered only through a targeting rule.

:::

To see every Flow that uses an Offering, open the Offering and select the **Flows and Paywalls** tab. The default Flow is marked **Default**. To change it, open another Flow's menu and choose **Set as default Flow for this Offering**.

### Share a Flow across rules

One Flow can be used by many rules. Editing a shared Flow changes it everywhere it's used. To change it for one rule only, detach it in the rule editor first.

## Create a Checkpoint

Checkpoints are created automatically the first time the SDK reaches them. To create one ahead of time, add it while you create a targeting rule. In the rule editor, click the **Checkpoints** field and choose **New checkpoint**. Then register the same identifier in your app.

## Create a rule

1. In **Targeting**, click **New rule**.
2. **Checkpoints:** Pick one or more Checkpoints for the rule to apply to.
3. **Audience:** Click the audience, then choose an **Audience source**:
   - **Saved audience** to pick an audience from [Audiences](https://www.revenuecat.com/docs/dashboard-and-metrics/audiences), or **All customers** to target everyone.
   - **Custom filters** to define filters for this rule only. Conditions in a group must all match. Add more groups to match customers in any of them.
4. **Flow:** Pick a Flow or select an Offering to serve instead.
5. Click **Save draft**. The rule is saved as inactive.
6. To set a rule live, select:
   - **Make live** to start now.
   - **Make live with an end date** to set the rule live until the end date.
   - **Schedule** to make the rule live at a later time.

Schedule times are in UTC.

Custom filters aren't saved to [Audiences](https://www.revenuecat.com/docs/dashboard-and-metrics/audiences), so other rules can't reuse them. To use the same audience in several rules, create a saved audience.

## Order rules

New rules go to the bottom of each Checkpoint's order. To change the order, scroll to a Checkpoint, click **Order rules**, and then **Save order** after making your changes.

:::info[Ensuring all customers are served something]

If you want everyone to be served a paywall at a Checkpoint, add an **All customers** rule last on a Checkpoint as a catch-all to ensure every customer that doesn't fit in a narrower rule is always served something at the Checkpoint.

:::

## Manage rules

- **Make inactive** pauses a rule without deleting it.
- **Duplicate** copies a rule.
- **Delete** removes it.

### Edit a live rule

Changes to a live or scheduled rule's Checkpoints, audience, or Flow are saved as a draft. Customers keep getting the published version until you click **Make changes live**, or **Update scheduled rule** for a scheduled rule.

- To compare versions, switch between **Draft version** and **Published version** in the rule editor header.
- To throw away the draft, click **Discard changes**.
- If the rule's Flow is still a draft, making the rule live publishes the Flow too.

## Create rules with Rico

In **Targeting**, click **New rule** and choose **Create with Rico**. Describe it in plain language and [Rico](https://www.revenuecat.com/docs/tools/rico) builds it, for example: "Show the winter paywall to US customers at onboarding_completed." Rico asks for your approval before saving anything. This option requires Rico's **Read & write with permission** access setting for your Project.

## Create rules with the MCP

The [RevenueCat MCP server](https://www.revenuecat.com/docs/tools/mcp) can list, create, update, and delete targeting rules, including Checkpoint rules. Ask your agent, for example: "Add a rule at onboarding_completed that shows the spring paywall to all customers."

## Branch a Flow by audience

A Branch is a Flow step that sends each customer to a different next step based on the audiences they're in. Use it when several audiences share most of a Flow, instead of building a separate Flow and rule for each one.

### Add a Branch

1. In **Targeting**, open the rule that serves the Flow. If other rules share the Flow, click the canvas background and choose **Edit flow** first.
2. Add a Branch step in one of two ways:
   - In the left nav, click **Add step**, then **Branch**.
   - Hover over the connection where the Branch should go, click **+**, then choose **Add flow control** > **Branch**. The step after the connection becomes the step for everyone else.
3. In **Branch settings**, click **Edit branch**.
4. For each Branch rule, click **Select audience**, choose a **Saved audience** or **Custom filters**, and pick the step to navigate to. Click **Add rule** to add another path.
5. Under **everyone else navigate to**, pick the step for customers who aren't in any of the audiences.
6. Click **Save**, then publish the Flow.

Dragging a second connection out of a Branch also adds a rule for the step you connect to.

### How Branches are evaluated

- The SDK evaluates the Branch on the device when the customer reaches it, using the same [data as targeting rules](#data-the-rules-use).
- Rules in a Branch run top to bottom. The first audience the customer is in decides the next step.
- Customers who aren't in any of the audiences go to the step for everyone else.

### What a Branch can connect to

- A Branch can't connect directly to another Branch or to an experiment. Add a screen between them.
- Steps on different paths of a Branch can lead into the same screen, so paths can rejoin.
- A Branch can be the Flow's initial step.
- A Flow that's a variant in an [experiment between Flows](https://www.revenuecat.com/docs/tools/targeting/checkpoints/experiments#run-an-experiment-between-flows) can't contain a Branch.

## How rules are evaluated

When a customer reaches a Checkpoint, the SDK evaluates that Checkpoint's rules on the device.

### Order and matching

- Rules run top to bottom. The first match wins.
- Each Checkpoint has its own order. If one rule is served on multiple Checkpoints, you can order it differently at each one.
- If no rule matches, nothing is shown and the Checkpoint continuation runs with a `CheckpointResult` whose `flow` is `nil` / `null`.

### Every visit is evaluated again

Rules are checked every time the customer reaches the Checkpoint. If their Audience changes, or you reorder rules, they can get matched to different rules over time.

Experiment assignment is the exception. See [How assignment works](https://www.revenuecat.com/docs/tools/targeting/checkpoints/experiments#how-assignment-works).

### Data the rules use

The SDK uses what it knows on the device at that moment, including:

- Entitlements and purchases
- Device and app details, like platform, app version, and locale
- Store country
- [Customer attributes](https://www.revenuecat.com/docs/customers/customer-attributes) set on this device
- Coming soon: custom variables passed to `checkpoint()`

Data that changes during the session, like a new purchase or attribute, counts right away. A rule that uses data the SDK doesn't have, doesn't match.

### Scheduled rules

The SDK starts and stops scheduled rules on time, using the device clock. A rule keeps its position while it's scheduled.

### Offline and first launch

The SDK caches rules and uses the last fetched version when offline. If it has never fetched rules, it reports a configuration error through the error presenter and the Checkpoint continuation doesn't run. This prevents the customer from continuing past the Checkpoint before determining whether they match a rule.

## FAQs

### What happens when no rule matches at a Checkpoint?

Nothing is shown. If you want to ensure your customers are always served a paywall at a given Checkpoint, add an **All customers** rule as a catch-all and keep it last in the rule order. To limit it to customers without an entitlement, use **Custom filters** with `Has active entitlement` `is false`.

## Troubleshooting

### Nothing appears at my Checkpoint

- Check that a rule is **Live** for that Checkpoint and that the customer matches its audience.
- Check that the identifier in your app matches the dashboard exactly.
- Check the SDK debug logs. They say why nothing was shown.

### The wrong Flow appears

Rules run in order and the first match wins. Move the rule you want higher, or narrow the audience of the rule above it.

### A shared Offering shows its default Flow

`getOfferings` and `PaywallView` show the Offering's default Flow. Serve other Flows through `checkpoint()` instead, or [change the default Flow](#use-one-offering-on-many-paywalls).
