Purposes in Adapty Mail
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 for them, not a new purpose.
Every project comes with eight purposes, set up with default rules. 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. | 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 | Users suppressed after a bounce, a spam report, or a failed address verification |
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
Entry rule vs condition: know the difference
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, and an optional profile condition. 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.
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> }}. - 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 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 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, 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: 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 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, 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
-
In Adapty Mail, go to Purposes.
-
Open the tab for the class of the new purpose: Marketing or Transactional. You can’t change the class later.
-
Click Create.
-
Fill in the Name and Brief for AI fields. Adapty Mail generates campaign emails for the purpose from the brief and the rules.
-
In the Entry rule field, select the entry events. For an event from your app, type its name under Custom. Then, in the Payload fields section, describe each payload field.
-
To narrow down which users qualify for the purpose, in the Condition field, click Add filter.
-
In the Exit rule field, select the reasons 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.
-
In the Re-entry rule field, select when a user can receive a sequence from the purpose again. A new marketing purpose starts with Never.
-
Click Create.
The new purpose stays a Draft until one of its flows sends an email. Next, create a campaign for the purpose, then a flow that sends the campaign.
A new marketing purpose goes last in the order. 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:
- Adapty Mail goes through the purposes in order of their Priority, from 1 up.
- 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.
- Adapty Mail uses the first purpose it doesn’t skip. If the re-entry rule 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:
-
On the Purposes page, open the Marketing tab.
-
Click Change order.
-
Drag the purposes into the order you need.
-
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, 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 setting relies on it.
To prevent new sequences of a purpose, delete its flows. 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 counts every past sequence. To let users receive a sequence from it again, change the rule. To test 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, 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_typeyour 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 for All Users.