Some programming structures, for reasons relating to the inherent complexity of the survey design and fielding needs, require that the survey look ahead to see whether or not a given quota group is full before respondents actually reach the survey page where the quota is located. In IntelliSurvey, this mechanism is called quotaOpen
, or more colloquially as "quota look ahead."
Tip! quotaOpen
is an advanced quota method. Ask a Project Consultant to review the survey design and exhaust all other programming options before using it.
Syntax
quotaOpen
can evaluate multiple quota option IDs or a range of IDs. It is a Boolean function that checks each quota bucket (group) option specified. If any are open, the expression evaluates to '1' (true). Otherwise, it evaluates to '0' (false).
# Single quotaOpen('QuotaNameWithLeadingQ',ID) # Multiple quotaOpen('QuotaNameWithLeadingQ',ID,AnotherID) # Range quotaOpen('QuotaNameWithLeadingQ',lower bound ID...upper bound ID)
Example
Suppose a survey has quotas per brand and screening questions for each brand. In such a case, quotaOpen
will prevent respondents from being asked screening questions if the brand quota is already filled. In the example below ELIG_BRAND uses quotaOpen
to make sure that the respondent is being asked about brands they are aware of that also have an open quota at BRAND_OVERALL. We then ask the follow up questions only about eligible brands. The final assignment is then made at BRAND_OVERALL.
setlist: BRANDS 1. Pepsi 2. Tide 3. General Motors 4. GE #...etc. 5. What is your awareness of the following brands? type: radio table rowsfrom: BRANDS 1. Never heard of 2. Heard of, but never purchased 3. Purchased, but not in past 12 months 4. Purchased in past 12 months ELIG_BRAND. Eligible Brands type: checkbox selectby: condition optsfrom: BRANDS {if anyChecked($Q5R[id],4) and quotaOpen('QBRAND_OVERALL',[id])}
block: <<BLOCK
6R%%ID%%. When was the last time you used %%TEXT%%?
type: radio
1. Today
2. Within the last week
3. Within the last month
4. Within the last three months
5. More than 3 months ago
BLOCK
list: QELIG_BRAND
BRAND_OVERALL. Overall Brand Quota type: quotas selectby: weight optsfrom: BRANDS {if anyChecked($QELIG_BRAND,[id])} {weight: 6-$Q6R[id]}
Advanced
Advanced operations that gather additional information about a quota status as well as perform computations are also possible. These are enabled with getQuotaStatus
, which can return both the number of completes in a given bucket as well as that bucket's cap, as entered in the Quota Manager. It acts similar to the fetch_row
function and allows you to specify the quota variable, return the current count and cap for each option, and perform a computation based on the results.
In the example below, option '99' acts as a placeholder and is never actually selected. It allows getQuotaStatus
to pull all the information from 'QBRAND_QTA' into the temporary 'q_data' variable. Then, an option from the BRANDS list will be selected if that respective quota bucket's count is less than or equal to 75% of the quota target for that bucket.
LESS_THAN_75. Brands with less than 75% of quota filled
type: checkbox
selectby: condition
99. Get Quota Status {if my $q_data = getQuotaStatus('QBRAND_QTA') and 1 == 2}
optsfrom: BRANDS { if $q_data->{[id]}->{count} <= ( $q_data->{[id]}->{quota} * .75 ) }
Caution! Great care should be exercised when using advanced functions. Be aware that higher levels of traffic and survey data combined with the use of advanced functions may affect survey responsiveness. These computations occur while the respondent is taking the survey; so, running these functions against large brand list or in surveys with a lot of traffic can slow down the survey for respondents. If you encounter any lag when testing please contact Support for assistance.
Comments
0 comments
Please sign in to leave a comment.