Session logic

The Digital Mobile SDK works on a session basis. These sessions impact functionality such as targeting, for example triggering a survey after a certain number of sessions.

A session is started whenever the app is:

  • launched or opened
  • re-instantiated, re-opened, or the app switched from either:
    • being in the background
    • being closed or killed
    • after being reinstalled

With each new app session the SDK:

  • re-evaluates the targeting logic
  • retrieves the latest configuration criteria

A new session instance is created based on one of the following:

  1. New Session - Application is launched and is in the foreground with services initialized
  2. Refresh Session - Application is in the background for a defined amount of time, the default is 60 minutes. Session refresh time is configurable.
Note: Custom Parameters do not get deleted by "Refresh Session", only by "New Session".

How the survey behaves when the app is put into the background can depend on the operating system. For example, suppose a survey is open and the app where the SDK is initialized is put into background without closing the app. When the user goes back into the app, they still see the survey open unless you use the closeEngagement API to close the survey after a certain duration of being in the background.

SDK Session Quarantine (Cool down period)

To ensure a non-intrusive user experience, we recommend defining a "cool down period" after users either submit feedback or decline an invitation. Medallia provides advanced features to quarantine users in this way and drive conversion rates up. Once set, and until the quarantine period expires, the user is not prompted with a feedback invitation even if targeting rules are met.

This can be easily defined when Targeting surveys.


Quarantine options in invitations targeting settings.

The options to configure a quarantine duration are:

  • Don't invite a visitor who declined an invitation in the past X days which sets how many days to quarantine a user who declined an invitation to provide feedback.
  • Don't invite a visitor who submitted feedback in the past X days which sets how many days to quarantine a user who accepted an invitation to provide feedback.

Check the option and type a number into the box to configure how many days a user should be quarantined.

Deferred survey invites

As part of the default Digital invitation to provide feedback there is an option to defer the invite. This is usually a "Maybe later" button, but also applies to when a user swipes a banner invitation away or ignores an invite that is set to disappear. This is specific to Digital In-app and covers the situation where an invite is triggered at a moment not convenient to the user. They can defer the invite and it is set to wait. The invite cannot be shown again until the app has been in the background for at least 60 minutes. Only after this period can the user be targeted by this invite again.

Tip: The deferred period is independent from the quarantines, which are only activated after the invite has been triggered.