# Journeys

> Move each person through a multi-step flow of waits, splits, push notifications and in-app messages, and measure it against a control group.

Source: https://docs.grovs.io/docs/engagement/journeys

A journey is a flow you draw once and grovs runs for every person. For example: when someone adds to cart, wait up to two hours for checkout. If none, send a push. Wait a day for an open. If still nothing, show an in-app discount. Stop as soon as they check out.

The server moves each person along the map on its own clock. Push steps send real push campaigns and in-app steps show real in-app messages, with the same reports, tracking and SDK behaviour as standalone sends.

- [Build a journey](https://docs.grovs.io/docs/engagement/journeys/build-a-journey): Entry, steps, goals and launch, step by step.
- [Experiment paths](https://docs.grovs.io/docs/engagement/journeys/path-results): Split people across 2 or 3 paths and see which one converts.
- [Limits and rules](https://docs.grovs.io/docs/engagement/journeys/limits): Entry, re-entry, step guards and self-hosting.

## How a journey works

```mermaid
flowchart TD
  E([Adds to cart]):::evt --> W[Wait 2h for checkout]:::proc
  W -- Did it --> X([Leaves]):::done
  W -- Time ran out --> P[Send push]:::proc
  P --> W2[Wait 1 day for open]:::proc
  W2 -- Did it --> X
  W2 -- Time ran out --> I[Show in-app discount]:::proc
  I --> X
```

### Entry

People enter in one of two ways:

- ****They do something**:** a custom event or screen view, with optional property filters, or a built-in event such as an install or link open. They enter at once.
- ****They join a segment**:** checked every 15 minutes. When the journey opens, everyone already in the segment enters too. Use a segment for past behaviour, such as "viewed a product in the last 7 days and hasn't ordered".

**Who may enter** can narrow either to **Only people in a segment**. Re-entry decides whether someone can go through again after leaving. Nobody is in a journey twice at once.

### Steps

| Step              | Does                                                                                                                             | Leads to                                          |
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- |
| **Wait**          | Waits 5 minutes to 30 days, optionally until the person does an event, opens the push above or clicks the in-app message above   | One next step, or **Did it** and **Time ran out** |
| **Split**         | **By a condition** (did an event, is in a segment, has an attribute, uses a platform) or **By percentage** (2 or 3 random paths) | Yes and No, or one per path                       |
| **Send push**     | Sends a push, optionally only between 09:00 and 21:00 on the person's clock                                                      | One next step                                     |
| **Show in-app**   | Gives the person's device an in-app message, shown on its own trigger, kept for 1 to 30 days                                     | One next step, once seen or when it expires       |
| **Set attribute** | Writes a `journey_` attribute on the person, readable by later splits and in-app conditions                                      | One next step                                     |

Sends never branch. To act on an open or click, add a wait after the send: "until they open the push above, up to 1 day".

Paths can join, so two branches can continue at the same step. Loops aren't allowed.

### Exits and goals

A person leaves when:

- **their path ends** (a step with no next step)
- **they reach a goal** (an event, screen, built-in event or purchase), from any step
- **90 days have passed** since they entered

Goals are also what the report measures. With a goal and a control group, the report shows whether people in the journey converted more than people kept out.

### Control groups

A journey's **Control group** (1 to 50%) keeps some people out entirely, for comparison. The project-wide control group in **Engagement Settings** applies too.

## Where journeys run

Push steps reach devices with a push token. In-app steps reach devices on iOS SDK 3.1.0, Android SDK 3.1.0, Web SDK 2.1.0, Flutter plugin 3.2.0, React Native SDK 3.1.0 or Unity package 1.0.0 or later.

People without a device for a step's channel still move through the journey; that step doesn't reach them.

## Related

- [Push campaigns](https://docs.grovs.io/docs/engagement/push-campaigns)
- [In-app messages](https://docs.grovs.io/docs/engagement/in-app-messages)
- [Segments](https://docs.grovs.io/docs/analytics/segments)
