Local notification invitations
Use local notifications to target users using OS native notifications, even when the app is in the background. Local notifications are triggered by Digital without the need for an additional notifications server.
- SDK version must be 4.3 and above.
- Supported on both iOS and Android.
Simply add the Digital code to your app and you can trigger local notifications. This enables new use cases for collecting feedback by combining local notifications with the other already existing survey targeting options, such as:
- Utilize the total duration the app has been used for in targeting
- Target a user who has not used the app for N number of days
Background
Notifications are familiar to anyone who uses a mobile device, and provide a convenient way to interact with users. Digital provides both push notifications and local notifications.
Local notifications provide a way to invite users to submit Digital surveys without requiring any external server. Local notifications are created directly by the Digital In-App SDK, no external push notification server is required. This means that the usual Digital quarantine and targeting capabilities are available for surveys that use local notifications. In addition, local notifications support foreground and background targeting. This is the first type of invitation that can target users even when the app is not in the foreground. For example, targeting users who have not opened the app in more than one month.
Push notifications rely on a non-Medallia server that has to be set up by the customer. Digital surveys with a push notification trigger then use data from this server for targeting. This means that the usual Digital quarantine and targeting capabilities are not available for surveys that use push notifications. As such, this should be considered an advanced option.
Using local notifications
To use local notifications, Create or Edit any invitation based survey. Open the targeting settings and set the Invite Type to Local notification.
- Select the App Mode
- Foreground: used to present the survey when the app is in the foreground. App is actively being used.
- Background: used to present the survey when the app is in the background. App is minimized, not visible on the screen.
Both of the app modes support local notifications. No other invitation type supports background mode.
On the first tab, 1. Invite Display, define the content of the notification.
- Title Text: Title of the notification
- Description Text: Description below the title
- Logo image: Image to be used with the notification
- Expiration: How long the notification stays for the user before being dismissed automatically
- App Name: Name of the app. Also visible in the notification.
Use the live preview on the right to validate your changes. Once Invite Display has been configured click on 2. Targeting to set up the targeting.
The available targeting options depend on the App Mode setting. When App Mode is set to Foreground, the targeting options have not been changed.
When App Mode is set to Background additional options are available.
- When last duration time in foreground: Target the user based on last session duration of the app
- When someone has not visited your app in the last: Target the user based on how long it has been since they last used the app
- Approximate delay: Adds additional delay to the triggering of the local notification survey after the app is in background
Once the targeting has been set up, click on 3. Quarantine to define the quarantine for the survey. Define the quarantine for both submit and decline of the survey, this is similar in both foreground and background mode.
Save the changes and the local notification survey is ready to be triggered from your app.
Client side setup
For an app to support local notifications some code changes are needed for both Android and iOS. See the in-depth technical documentation:
App side behavior
Depending on the App Mode selected and the survey targeting, the survey can be shown either when the app is in the foreground or in the background.
When App Mode is set to Foreground:
- Local notification to invite the user to submit a survey can be triggered while the app is running and visible
- Survey follows quarantine and targeting setup configured in the Digital Command Center
When App Mode is set to Background:
- The targeting process can only start once the app has been moved to the background
- When the local notification is shown, a user can tap on it to open the app with the survey displayed
- Targeting can be conditioned based on the number of days the app has not been used, and the duration for which the app was used in the last session