When a user taps a push notification, you can open the app, a web page, a specific screen in the app, or an in-app message. You can also pass custom data to the app with any of these actions.
Available actions
- Open the app (default). If you set no other action, a tap opens the app's main screen, or the website's home page for web push.
- Open a web page. In the push preset, go to On-click Actions and enter the URL in Web Page URL. This works well for surveys, landing pages, or your website.
- Open a screen in the app (deep link). In On-click Actions, choose Deep link in application, select the platforms, and enter the deep link manually or pick one of the deep links saved in Settings → Deep Links. Your app has to handle the deep link. See Deep linking.
- Show an in-app message. To show a promo offer or coupon, turn on Show in-app banner when message is clicked in the one-time push form and select the in-app message. This option is for mobile only. See Define what happens when the push is clicked.
- Pass Custom Data. Turn on Custom Data in the preset and enter a JSON object. The app receives it with the push and can use it for its own logic. See Using Custom Data.
For details, see Define the next step for users who click on the notification.
Via API
In the Messaging API v2 payload, set open_action to exactly one of these:
-
"link": {"url": "https://example.com/survey"}: opens a URL. Links aren't shortened by default. -
"deep_link": {"code": "...", "params": {...}}: opens a saved deep link. -
"rich_media": {"code": "XXXXX-XXXXX"}: opens a Rich Media page.
Pass custom data in custom_data. In the legacy /createMessage, the equivalents are link, rich_media, and data. For deep links, pass them in link with "minimize_link": 0 so the link isn't shortened.
Comments
0 comments
Please sign in to leave a comment.