Changes to the sample management script
GetSampleRec
UseThisSampleRecForCATI_ClientSpecific
Calls the UseThisSampleRecForChaining function.
AuthenticateSampleRec
Failover should work with the existing code as the system will have already set the Project InterviewProperty, and serial handling should work using the main Serial field.
UseThisSampleRecForWeb_ClientSpecific
This function calls the UseThisSampleRecForChaining function.
ReturnSampleRec
ReturnSampleRec_DCCodes_ClientSpecific
▪If chaining is enabled (EnableChaining is True):
Saves the serial number to the appropriate sample field (if not a review).
Uses ChooseNextProject to decide if another project should be run and if so, leaves the record in the ACTIVE queue. Only moves the record to the final queue if there are no more projects to run.
▪If chaining is disabled (EnableChaining is False):
Typically this indicates that the last project in the chain has been processed; the script reverts to standard handling.
However, if this is a chaining return code (Completed, Reviewed, RejectedByReviewer), and the NextProject value is set to indicate that another project should have run, this indicates an error, the record is moved to the FAILED queue, and an error is logged.
EnableChaining must to be set false for all canceled or failed auto-dialing samples that are returned in dialing provider.
▪IncrementTries_ClientSpecific
When EnableChaining is False, increments tries only for the last project in the chain.
Chaining functions
The following functions are used to support the chaining example:
Function
Description
CheckRequiredFields
Checks that the example’s required fields exist and creates a log string if they do not exist.
ChooseNextProject
▪Finishes the interview for the current project and selects the next project.
▪If the initial project is completing, then pend quotas and use CheckCandidateQuota to create the QuotaCells list based on the pended quotas. The NextProject is the first project found.
PEND_ALL is set to 0 before the quota check and then resets to 2 after the quota check (the default quota pend behavior is avoided).
▪If a secondary project is completing, set NextProject to the next project in the QuotaCells list.
▪Set the NextProject InterviewProperty to indicate which project should next run.
▪Set the CurrentProject field to keep track of the current project.
▪Set the Serial field for restart and review.
GetNextQuotaCell
Returns the next quota cell ID, based on the current project.
CheckCandidateQuota
Checks each pended quota for an associated <project> field and updates accordingly.
▪Parse the project name from the pended quota name.
▪Update the QuotaCells sample field.
CheckSpecificQuota
Pends only the specified cell and is used on restart to verify if quota cells are still valid.
GetProjectFromQuotaCell
Parses the project name from the quota cell.
GetQuotaCellForProject
Parses quota cell ID from the QuotaCells list for a specific project.
CompleteQuotasForProject
Iterates the quotas list, attempting to complete the project specific quota.
CompleteQuotaForProject
Completes the quota if it matches the project, and is used to complete the quota for the returned project.
UseThisSampleRecForChaining
▪Set the project's InterviewProperty based on the CurrentProject sample field. This ensures that the correct project is started on a restart, and requires a recheck of the originally pended quotas.
If none of the original quota cells are valid on restart, the record is moved to the OVERQUOTA queue and an error is raised to ensure the sample is not returned to the Phone Participants activity.
▪Retrieves the serial number from the project specific field.
See also