# Waits and branches (https://www.getfounderhq.com/docs/sequences/waits-and-branches)

Between two messages you usually wait. And not everyone should get the
same next message. Waits and branches do both.

## Waits

Drag a wait from the palette onto the flow.

| Wait | What it does |
| --- | --- |
| **For a duration** | Waits a number of days |
| **For a random period** | Waits a random time between a minimum and a maximum, in hours. Use it so people do not all get a message at the same minute. |
| **Until a time window** | Waits until the next allowed time, such as a weekday between 9:00 and 17:00 |
| **Until a condition is met** | Waits until the person does something, such as opening the last email |

### Until a time window

Choose the days: **Any day**, **Weekdays**, **Weekends**, or
**Specific days**. Then set **From** and **To**.

The window is judged in the **Contact's own** time zone, or in
**One time zone** you choose. The message right after the wait is held to
the same window.

### Until a condition is met

Set **Continue when** to the thing you wait for. Then decide what happens
to a person who never does it:

- **Give up after** sets a limit in days.
- **When the limit passes**, either **Continue to the next step**, or
  **Take a separate timeout path** to send them something else.

## Branches

A branch sends people down different paths.

### Conditional branch

Each path has a condition. A person takes the first path whose condition
is true, and the last path if none is.

| A condition can test | For example |
| --- | --- |
| **Attribute** | Their plan is "pro" |
| **Event** | They did "invite.sent" |
| **Message** | An earlier message in this sequence was **Opened** |

For a message you can test **Sent**, **Delivered**, **Opened**, and
**Clicked**. The builder offers only what your channel and connection can
report. WhatsApp calls an open **Read**.

### Cohort branch

A cohort branch splits people by chance: 50% one way, 50% the other. The
percentages must add up to 100. Use it to try two versions of a message.

FounderHQ does not report results per cohort. Compare the two messages by
their own opens and clicks.

## Run a step only for some people

A message, a wait, and an action each have **Conditions**. Add one, and
the step runs only for people who match. Everyone else passes straight
through it.

## When a step fails

Under **Error handling**, choose what happens when a step cannot run:
**Skip to next step**, which is the default, or **Exit the sequence**.

## Actions

| Step | What it does |
| --- | --- |
| **Set values** | Stores a value on the person or in the sequence, to use later |
| **REST API** | Calls an endpoint of yours. Set these up under **Webhook Actions** in [Sequences → Settings](https://app.getfounderhq.com/sequences/settings). |
| **Agent** | An AI agent reads what you allow about the person and picks one of the outcomes you defined. Each outcome is a path. |

An **Agent** step can use web research, your brand's knowledge, and the
person's events. Use it for a judgment a rule cannot make, such as "is
this company a good fit?".

## Exit

Every path ends at an **Exit**. A person also leaves early when they
reach the sequence's goal, if you set it to exit on conversion.
