Last modified November 22, 2014 by Gordon Glauser

Intro to Push Notifications

Push notifications are a powerful channel that enable you to communicate with your app users when your app isn’t open or even running. Use Swrve’s push notification service to:

  • Re-engage with inactive users or promote special offers to a segment of users.
  • Alert users about events happening within your app space.
  • Send quick, breaking news-type notifications to a predefined audience of users.
  • Create personalized notifications using custom user properties.
  • Create variations of your message content to test for best conversion rates.
  • Create localized versions of the same message within a single campaign to target specific language groups.
  • Run recurring campaigns to daily or weekly target users who last engaged with the app, installed the app, or triggered another custom event a set number of days ago.
  • Send push notifications to a single Swrve user via a web API call from a third-party system, using the Push API.
  • Send a background app update that silently delivers data to the app, such as new content.

Push messages are displayed in different styles, depending on the device, as illustrated below:

Locked Screen
locked
Alert
alert
Banner
banner

Coupled with Swrve’s behavioral segmentation feature, you can use push notifications to target the right message at the right people at the right time. For more information, see Intro to Segmentation. You can also use the A/B test feature to create up to 10 variations of a notification to test the contents of your message for best conversion. For more information, see A/B Testing Push Notifications.

Additionally, you can use Swrve’s Push API to send a push notification to a single Swrve user via a web API call from a third-party system. For more information about the Push API, see the Swrve Push API Guide. For information on creating a Transactional Push API campaign, see Transactional Push API Campaigns.

Push Notifications vs. In-App Messages

The focus of push notifications is communication with users while they’re outside of your app. If you want to communicate with your customers while they’re using your app, use Swrve’s in-app messaging service or Conversations feature. For more information about in-app messages, see Intro to In-App Messages. For more information about Conversations, see Intro to Conversations.


Push Notification Prerequisites

This section details the prerequisites your development team must configure before you can create push notifications. It also explains how to configure custom sounds or action categories for your push notifications.

Technical Prerequisites

Before you can create your first push notification, your development team must complete the following tasks:

  • Update your app with the latest SDK – Your development team must update your app with the latest Swrve SDK that supports push notifications. For iOS, use SDK version 2.7 or later. For Android and Unity, use SDK version 2.9 or later. Note that Swrve’s audience builder feature (which enables you to build a target audience for your push notification) is optimized for the real-time SDK v3.0 or later. For more information about integrating the SDK, see the platform-specific Integration Guide.
  • Time the push permission request – When a user first installs a push-enabled app, they are typically asked for permission to accept push notifications from the app. Swrve enables your development team to change this timing. For example, you can set the timing to request permission at the start of the session or when a user triggers one of a list of events. For more information, see the platform-specific Integration Guide.
  • Enable remote notification background mode for silent notifications (iOS only) – If you want to send background app updates, you must configure your app to process silent notifications in the background. For more information, see the iOS Integration Guide.
  • Create a push certificate and upload it to Swrve (iOS only) – If you’re not already using push notifications, your development team must create a push certificate, upload it to Swrve and test it. The certificate is used to authorize your app to receive push notifications and authorize Swrve to send push notifications to your app. For more information, see How Do I Manage iOS Push Certificates for Push Notifications?
  • Submit your updated app to Apple for review (iOS only) – After your development team has integrated the latest SDK, your iTunes Connect administrator must submit the app for review and inclusion in the App Store. As soon as it is available, your existing users are prompted to update the app while new users automatically get the latest version. This new app version then invokes the push permission request, logging device tokens back to Swrve, which you can then use to target those users by means of push notifications.
  • Create an Android server key and enter it in Swrve (Google Play only) – To enable an app to send push notifications to Google Play devices, you must create a server key, enter it in Swrve and test it. For more information, see How Do I Manage the Android Server Key for Push Notifications?
  • Test push notifications in the Swrve service – Swrve recommends your development team send test messages to your QA devices before you begin your first push notification campaign. They can perform this task using the push notification wizard in the Swrve service. For more information, see QA Testing Push Notifications.

Optionally, your development team can also enable your app to launch on a custom screen when opened from a push notification. For more information, see How Do I Configure the Launch Screen from a Push Notification?

Custom Sounds

Swrve enables you to configure a custom sound that plays when your push notification is sent. To make a custom sound available for selection when you create a push notification:

Step 1: On the Campaigns menu, click Push Notifications.

Step 2: On the Push Notifications screen, click Settings.

Step 3: In the Custom Notification Alert Sounds section, click Add Sound.

Step 4: In the Add Sound dialog box, in the Friendly name field, enter a user-friendly name for your sound file.

Step 5: In the File name field, enter the actual name of your file, without the extension. For example, enter custom_sound for the filename custom_sound.wav.

Step 6: Click Create Sound.

You can now select the custom sound from the Sound drop-down list on the Add Content screen of the push notification workflow.

For guidelines on using sounds with push notifications, see Push Notification Best Practices.

Custom Action Categories

Swrve enables you to configure custom action categories (for example, Yes/No, Ignore/Respond) for creating interactive push notifications on devices running iOS 8 or later. Before you can add or use custom categories in a push notification, you must provide any custom action categories when initializing the SDK. For more information, see the iOS Integration Guide.

To make a custom category available for selection when you create a push notification:

Step 1: On the Campaigns menu, click Push Notifications.

Step 2: On the Push Notifications screen, click Settings.

Step 3: In the Custom Action Categories (iOS 8) section, click Add Category.

Step 3: In the Add Custom Action Category (iOS 8) dialog box, in the Friendly name field, enter a user-friendly name for the category (for example, Yes/No, Invite, Reminder).

Step 4: In the Identifier field, enter the identifier used in your app to identify this category (for example, INVITE_CATEGORY).

Step 5: Click Create Push category.

You can now select the custom action category from the Category drop-down on the Add Content screen of the push notification wizard.


Push Token Update Period

Swrve performs several batch jobs throughout the day to find users with push device tokens registered and then loads any new device tokens into the push notification system. Therefore, it can take up to six hours to add non-QA users to the system, depending on when the batch job is run and your company’s time zone. The number of devices registered on the Push Notifications screen for your app is updated regularly to include new users, but they may not be immediately available to send push notifications to, depending on the timing of the batch run (this does not apply to testing push notifications on QA devices).


Next Steps