Trigger
The Trigger module is included in the ForeSee® Replay for Mobile SDK and is responsible for inviting a user to participate in a satisfaction survey. Trigger can be configured to invite a user to participate based on “loyalty” which is defined according to a number of different criterion including:
- The number of times the app has been launched.
- The elapsed time since the app was first launched.
- The number of pages viewed since the app was first launched.
- The elapsed time since the app was last launched.
- Custom events.
In addition, you can define whether or not a user can be re-invited, as well as how many days to wait before re-inviting.
Trigger Customization
All Trigger behavior is defined in the foresee_configuration.json
file included with the SDK. This file must be added to the project.
Measures
A survey and its loyalty criteria are represented in the configuration file as measures. Every measure has a unique Survey ID and defines loyalty criteria specific to that survey. The Survey ID, together with your Customer ID, defines a unique survey. This allows you to configure multiple measures in the app.
Triggering Sequence
Determining whether or not a user is eligible to participate in a survey is done through a single method:
ForeSee.checkIfEligibleForSurvey;
Calling this method initiates the following sequence of events:
- Determines if the user has fulfilled any of the loyalty criteria for any defined measure.
- Makes an HTTP request to the ForeSee server to see if the user is in the sampling pool.
- If the user has fulfilled the trigger criteria and is in the sampling pool, the default invitation is presented.
- If the invitation is accepted, depending on which invitation mode is configured, the survey either presents immediately inside the application or the user is notified to participate at a later time.
- If the user declines, the invitation is dismissed.
Updated almost 4 years ago