Professional > Interview scripting > Sample management > Sample management facilities > Quotas > How to write a quota control system
 
How to write a quota control system
The basic steps for implementing quota control when a project uses sample management are as follows:
In AuthenticateSampleRec:
1 Attach the sample record to the quota control system.
You must do this even if all quotas are based on data gathered during the interview.
2 If the project has quotas that need to be tested before the interview starts, check those quotas and pend them if the respondent may continue with the interview. If the respondent fails the quota check, reject the sample record from the authentication process.
In ReturnSampleRec
1 If the sample record is returned with codes 1 (completed) or 6 (early completion), decrement the pending counts by 1 and increment the corresponding completed counts. For all other return codes, decrement the pending counts by 1 and increment the corresponding rollback counts.
See also
Attaching the sample record
Processing records returned after interviewing
Pending quota cells
Checking quota return codes and other information
Quotas