Quota operators

Special quotas, operators

1. AgeRange quotas

Most subsamples will use age as a targeting criteria.
Each subsample will define it's own set of age ranges and range limits. It's for this reason that ageRange question does not have a predefined id in the Ipsos standard question library.

ageRange quotas will always have the id for "questions" equal to "-1" and answers with have properties of rangeStart and rangeEnd.

"questions": [
      {
        "answers": [
          {
            "rangeStart": "18",
            "rangeEnd": "24"
          }
        ],
        "id": -1,
        "operator": "OR",
        "locale": null
      }
...

2. Total quota

A total quota is a subsample summary quota and it's used to control the overall numbers of completes in a subsample.

In some scenarios, the exclusive allocation might be different between total quota and other targeting quotas. See "large shared allocation" section for additional details.

{
    "subsampleStatus": "Live",
    "actualClientIncidenceRate": 0,
    "actualClientConversionRate": 0,
    "actualClientAbandonRate": 0,
    "estimatedIncidence": 80,
    "questions": [],
    "remainingExclusive": 160,
    "remainingShared": 20,
    "actualClientLOI": 0,
    "estimatedLOI": 10,
    "achievedInterviews": 0,
    "tableId": -1,
    "tableName": "Total Quota",
    "quotaId": 77179,
    "quotaName": "quotaTotal",
    "quotaType": "counting"
  },

3. Operators overview

Operators perform a specific operation on the input values or expressions.
In the current version of Supply API, the logical operators used are the following ones: OR and AND.

The logical operator OR is used for operations between answer options within the same question and quota cell.
This operator should be ignored in the case when Questions only exposes a single question and answer option and only take it into account when we have multiple answer options for the same question.

The supplier system should interpret subsequent quota cell definitions in the same quota table as having an implicit OR relationship between them.

The AND operator is implicit between subsequent questions within a given quota cell or between subsequent quota tables.

Example: for age= ([13,17], [18,24]) we should have the following response:

Quota Table 1 with Gender = ‘male’ OR Gender = ‘female’;
Quota Table 2 with Agerange between 18 and 34 OR Agerange between 35 and 49 OR Agerange between 50 and 65;

The overall subsample has the following derived target definition:
(Gender = ‘male’ OR Gender = ‘Female’) AND (Agerange between 18 and 34 OR Agerange between 35 and 49 OR Agerange between 50 and 65);

"questions": [
      {
        "answers": [
          {
            "rangeStart": "13",
            "rangeEnd": "17"
          },
          {
            "rangeStart": "18",
            "rangeEnd": "24"
          }
        ],
        "id": -1,
        "operator": "OR",
        "locale": null
      }
    ]