Multiple Measures

In the foresee_configuration.json file, you can define multiple measures, each with different triggering criteria. When you make a call to ForeSee.checkIfEligibleForSurvey(), the system checks each measure in turn.

If the user of your app is eligible for more than one measure defined in the JSON file, they are only invited to the first measure defined in the ‘measures’ collection. Example: If the JSON file is defined like so:

{
    "clientId": "cid",
    "measures": [
        {
            "surveyId": "sid1",
            "launchCount": 3
        },
        {
            "surveyId": "sid2",
            "launchCount": 3
        }
    ]
}

A user can be eligible to be invited to both since the two measures have the exact same triggering criteria. In this case, the user is only invited to the first measure, “sid1”.