---
title: "Purposes in Adapty Mail"
description: "Decide which users receive your Adapty Mail emails, and when: set the entry, exit, and re-entry rules of a purpose, and the order of marketing purposes."
---

> For the complete documentation index, see [llms.txt](https://adapty.io/docs/llms.txt).

> **AI agents**: to search Adapty docs faster and with fewer tokens, install the Adapty skills: `npx adapty skills install --yes`

Use purposes to control when Adapty Mail emails your users: which events start a sequence, which ones stop it early, and when a user can receive it again. Each flow belongs to a purpose and follows its rules. If a purpose has no flows, nobody receives emails from it. To send users in one country their own campaign, [add a flow](mail-flows#audience-and-content) for them, not a new purpose.

Every project comes with eight purposes, set up with [default rules](#default-rules-of-the-standard-purposes). Nobody receives emails from them until you add flows. You can edit or delete any of these standard purposes except **Double opt-in**. When none of them fit, create a purpose, for example to start emails on an event from your app.

## Marketing vs. transactional purposes

Each purpose is marketing or transactional, with a tab for each class on the **Purposes** page. The two classes differ as follows:

| | Marketing | Transactional |
| --- | --- | --- |
| Used for | Offers and reminders to buy, stay, or come back | Service messages, such as an address confirmation, access to the app after a purchase, or a purchase receipt. Keep offers out: these emails reach unsubscribed users too. |
| Email sequences at a time | One per user. For example, a user in an **Expired** sequence receives no other marketing sequence until it ends. When a user qualifies for several marketing purposes at once, they receive a sequence from the one that comes first in the [**Priority** order](#change-the-order-of-marketing-purposes). | Several, with no order. A user can receive a sequence from each transactional purpose they qualify for, alongside any marketing sequence. For example, a user who makes a first purchase receives both the **App activation** and the **Cancellation page** sequences. |
| Not sent to | Users who are suppressed, declined email consent, or wait for [double opt-in](mail-double-opt-in) | Users [suppressed after a bounce, a spam report, or a failed address verification](mail-suppression#what-still-reaches-a-suppressed-profile) |

## Decide who qualifies for a purpose

The rules of a purpose decide which users receive the emails of its flows, and when.

### Entry rules: events and conditions that activate a purpose

:::tip
**Entry rule vs condition: know the difference**
<br />
The entry rule decides when a user qualifies for a purpose: at one of its entry events. The condition of the entry rule decides which users qualify: those who meet it at that moment.
:::

The entry rule of a purpose has two parts: entry events, which can include [events from your app](#event-triggers-from-your-app), and an optional profile [condition](#profile-conditions). A user qualifies for a purpose when they trigger one of its entry events. If the purpose has a condition, the user has to also meet that condition at the moment of the event. A condition alone starts nothing: a user who already meets it when you create the purpose still has to trigger one of its entry events.

A change to any of these profile fields counts as a **Profile updated** event:

- Name, gender, and birthday
- Country and store country
- Email consent
- Custom attributes
- Device info

Among the standard purposes, **Never purchased** alone has **Profile updated** in its default entry events. As a result, users without a purchase can receive a sequence from the **Never purchased** purpose on their next profile change, even if Adapty Mail created their profile before the purpose had a flow.

#### Event triggers from your app

Custom events are events from your app, such as a completed onboarding. Your server reports them to Adapty Mail through the [API](mail-send-data-via-api#report-events-from-your-app).

To use a custom event as an entry event, in the **Entry rule** field, type the event name under **Custom**. The dashboard doesn't compare the name with your API requests, so keep it identical to their `event_type`.

A custom event can carry data from your app in its `payload` object, such as the goal that the user selected. To show this data in generated emails, in the **Payload fields** section of the purpose, describe each payload field. The section appears once the **Entry rule** field has a custom event. Each field has three settings:

- **Field name**: The name of the field in `payload`. The field appears in emails through the placeholder [`{{ custom_event.<field> }}`](mail-email-data#custom-event-placeholders).
- **What it holds**: A description of what the field contains. Adapty Mail reads this description when it generates emails for the purpose.
- **May be missing**: The custom event can come without the field. Generated emails then only show the field when the event has it. In HTML you write, [hide such a field](mail-email-data#hide-a-placeholder-that-has-no-value) yourself.

#### Profile conditions

Use a **Condition** to narrow down which users qualify for a purpose. For example, a purpose that starts on an `onboarding_completed` event from your app can have the condition **Subscription state** = Never purchased. Then only users who never started a subscription receive its emails, so subscribers see no offer to subscribe. When Adapty Mail receives the entry event, it checks the condition against the user's profile, not against the data of the event.

A condition differs from a [segment](mail-segments) in two ways:

- A condition applies to every flow of the purpose. A segment applies to one flow, so each group of users can receive its own campaign.
- A condition can end a sequence early: with **When the profile stops meeting the entry condition** in the [exit rule](#exit-rules), the sequence stops once the user no longer meets the condition. A user who leaves a segment keeps receiving the sequence.

In a condition, you can use these [segment filter fields](mail-segments#available-filter-fields): **Email confirmed at**, the **Purchase state** fields, and **Custom event**. You can't use a custom attribute in a condition. Instead, filter by it in a segment, then select that segment for a flow.

### Exit rules

The [condition](#profile-conditions) only applies when a sequence starts. Without an exit rule, the sequence continues even if the user stops meeting the condition. For example, under the condition **Subscription state** = Never purchased, a user who subscribes during a sequence still receives the rest of its emails. To stop a sequence before its last email, in the **Exit rule** field, select one or both reasons:

- **When the profile stops meeting the entry condition**: The sequence stops once the user no longer meets the condition. Adapty Mail checks the condition again on every event that it receives for the user: a profile change, a purchase or subscription event, or a custom event.
- **When one of these events happens**: The sequence stops on any event that you select under this option. For a custom event, type its name under **Custom**.

To stop a marketing sequence once a user buys, under **When one of these events happens**, select **Subscription started** and **One-time purchase**.

The event that stops a sequence can start a sequence from another purpose. For example, with the default rules, a user in a **Billing issue** sequence triggers the **Subscription expired** event. The sequence stops, and the user receives a sequence from the **Expired** purpose.

After any exit, the email that didn't go out appears as **Cancelled** in the [activity journey](mail-profiles#email-events), with the outcome **Stop condition met**.

### Re-entry rules: when the purpose can apply again

The re-entry rule of a purpose decides when a user can receive a sequence from it again.

The rule counts every sequence that the user received from the purpose, whichever flow sent it. A new flow or campaign doesn't reset the count.

**On every entry event** is the default for a new transactional purpose. With this option, each purchase or custom event among the entry events starts its own sequence, even while an earlier sequence still runs. Marketing purposes are the exception: each user has one marketing sequence at a time.

For a purpose with **Profile updated** among its entry events, select **Never** or **After a number of days**. These options limit how many sequences a user receives, however often their profile changes.

## Create a purpose

1. In Adapty Mail, go to **Purposes**.
2. Open the tab for the [class](#marketing-vs-transactional-purposes) of the new purpose: **Marketing** or **Transactional**. **You can't change the class later.**
3. Click **Create**.
4. Fill in the **Name** and **Brief for AI** fields. Adapty Mail [generates campaign emails](mail-create-campaign) for the purpose from the brief and the rules.

5. In the **Entry rule** field, select the [entry events](#entry-rules-events-and-conditions-that-activate-a-purpose). For an [event from your app](#event-triggers-from-your-app), type its name under **Custom**. Then, in the **Payload fields** section, describe each payload field.
6. To narrow down which users qualify for the purpose, in the [**Condition**](#profile-conditions) field, click **Add filter**.
7. In the **Exit rule** field, select the [reasons](#exit-rules) that stop a sequence early. In a new marketing purpose, a sequence stops on **One-time purchase**. A new transactional purpose starts with nothing selected.
8. In the **Re-entry rule** field, select when a user can [receive a sequence from the purpose again](#re-entry-rules-when-the-purpose-can-apply-again). A new marketing purpose starts with **Never**.
9. Click **Create**.

The new purpose stays a **Draft** until one of its flows sends an email. Next, [create a campaign](mail-create-campaign) for the purpose, then a [flow](mail-create-flow#create-a-flow) that sends the campaign.

A new marketing purpose goes last in the [order](#change-the-order-of-marketing-purposes). To have users receive a sequence from it rather than from a purpose above it, move it up.

## Change the order of marketing purposes

When several marketing purposes share an entry event, their order decides from which purpose a user receives a sequence. On such an event:

1. Adapty Mail goes through the purposes in order of their **Priority**, from 1 up.
2. Adapty Mail skips a purpose when the user doesn't meet the condition of the purpose, or when none of its flows sends to a segment that includes the user.
3. Adapty Mail uses the first purpose it doesn't skip. If the [re-entry rule](#re-entry-rules-when-the-purpose-can-apply-again) of that purpose allows a new sequence, the user receives it. Otherwise, the user receives no sequence from that purpose or from the purposes after it.

During a marketing sequence, the user receives no other marketing sequence, even from a purpose higher in the order.

To change the order:

1. On the **Purposes** page, open the **Marketing** tab.
2. Click **Change order**.
3. Drag the purposes into the order you need.

4. Click **Save**.

## Edit and delete a purpose

To edit a purpose, on the **Purposes** page, click its name. You can change everything except the class, standard purposes included. Unlike a [flow edit](mail-flows#flow-lifecycle), a change to the rules also applies to the sequences already running.

You can't change or delete the **Double opt-in** purpose: the [double opt-in](mail-double-opt-in) setting relies on it.

To prevent new sequences of a purpose, [delete its flows](mail-create-flow#delete-a-flow). Only delete the purpose itself when you won't need it again: a deleted standard purpose doesn't come back.

You can delete a purpose once it has no flows: in its row menu, select **Delete**. A deleted purpose becomes **Archived**. To see it, in the state filter, select **Archived**.

## Default rules of the standard purposes

To set an edited standard purpose back, change its rules to these values.

The standard marketing purposes start with the following rules:

| Purpose | Entry events | Condition | Exit rule | Re-entry rule |
| --- | --- | --- | --- | --- |
| Never purchased | Profile created, Email confirmed, Profile updated | Subscription state = Never purchased and One-time purchase state = Never purchased | The profile stops meeting the entry condition | Never |
| Renewal cancelled | Renewal cancelled | Subscription state = Auto-renew off | The profile stops meeting the entry condition; One of: One-time purchase | On every entry event |
| Expired | Subscription expired | Subscription state = Expired | Same as Renewal cancelled | On every entry event |
| Billing issue | Billing issue detected, Entered grace period | Subscription state = Billing issue, Grace period | Same as Renewal cancelled | On every entry event |
| Refunded | Subscription refunded | Subscription state = Refunded | Same as Renewal cancelled | On every entry event |

The standard transactional purposes start with the following rules:

| Purpose | Entry events | Condition | Exit rule | Re-entry rule |
| --- | --- | --- | --- | --- |
| Double opt-in | Profile created | Email confirmed at is not set | The profile stops meeting the entry condition | Never |
| App activation, Cancellation page | Subscription started, One-time purchase | None | Only when all emails are sent | Never |

## Troubleshooting

- **A user doesn't receive a sequence from a purpose they went through before**: Its [re-entry rule](#re-entry-rules-when-the-purpose-can-apply-again) counts every past sequence. To let users receive a sequence from it again, change the rule. To [test](mail-testing) the purpose again, sign up with a new email address.
- **Nobody receives a sequence from a marketing purpose**: Another marketing purpose with the same entry event comes earlier in the **Priority** column. A user receives no sequence from the later purpose when both of the following conditions are true:
  - The user meets the condition of the earlier purpose.
  - A flow of the earlier purpose sends to a segment that includes the user.

  [Move the later purpose up](#change-the-order-of-marketing-purposes), or narrow the earlier purpose with a condition.
- **Nobody qualifies for a purpose on its custom event**: The name under **Custom** differs from the `event_type` your server sends. Make the two names identical.
- **A user meets the condition but enters no flow**: No flow of the purpose sends to a segment that includes the user. To reach such users, [add a flow](mail-flows#audience-and-content) for **All Users**.