Skip to content

Create a pre-permission in-app

Build the in-app that asks users to allow notifications before the system push permission prompt appears. To choose when to show it and start it with a journey, see How to ask for push permission with a pre-permission in-app.

Build the in-app

Anchor link to
  1. Go to Content → In-Apps and click Create in-app to open the built-in editor directly.
  2. Enter a template name.
  3. Open the Blocks tab in the right panel and add a text or heading block with your pitch for enabling push.
Editor canvas with a Stay in the loop heading and pitch text added, Blocks tab open in the right panel
  1. Add a button block for the accept action and another for the decline action.
Editor canvas with the pitch text and Enable notifications and Not now buttons added
  1. Select the accept button and set Action Type to Request push permission. This action needs no code: on tap, it shows the system permission dialog and closes the in-app.
  2. Select the decline button and set Action Type to Close In-App. This action needs no code.
Editor canvas with the Not now button selected and its settings panel with Action Type set to Close In-App

After you save the template:

  • Accept button: the system permission dialog appears.
  • Decline button: the in-app closes and no system dialog appears.
Pre-permission in-app bottom sheet with Enable notifications and Not now buttons, shown over the app screen on iOS
A pre-permission in-app shown before the system prompt

Skip the prompt for users who already opted in

Anchor link to

A display condition hides the in-app for users who already allowed push, even when a later trigger shows the template again.

The condition uses the Push Alerts Enabled tag. The SDK sets this default Boolean tag from the device’s system notification permission.

  1. In the Layers panel, click the first block, then Shift-click every other block to select the whole template together.
  2. Turn on Show this block conditionally. The rule you set below applies to the whole selection at once.
  3. Set the rule to Push Alerts Enabled is false.
  4. Under If value is unknown, choose Show block. A fresh install with no tag value yet should still see the prompt.
All blocks selected together in the editor, with Show this block conditionally on, rule set to Push Alerts Enabled is false, and If value is unknown set to Show block