-
Notifications
You must be signed in to change notification settings - Fork 18
Paying Workers for Unsubmitted HITs
Sometimes due to a technical problem with a HIT or worker error, workers complete a HIT (e.g., complete an off-site survey) but fail to correctly submit the HIT. This is a problem because without a submitted HIT it is impossible to pay a worker for their efforts. This tutorial walks through how to handle this.
Generally, workers will contact the requester in these situations. If they don't contact you and have never worked for you before, there is no way to get ahold of a worker. ContactWorker
does not allow you to contact a worker who has never submitted work for you previously. Assuming you are in touch with the worker, you have two options for how to pay them:
- If the worker has worked for you before and you have a record of the
AssignmentId
associated with their previous assignment, you can useGrantBonus
to pay them directly. - If the worker has not worked for you before, or you do not have a record of a previous
AssignmentId
for that worker, you'll need to create a new assignment for them to complete. The remainder of this tutorial walks through how to do that.
The process for creating a worker-specific HIT is as follows:
- Create a new QualificationType using
CreateQualificationType
. You must specify thename
,description
, andstatus
arguments. Good practice is to name the qualification after the worker (use theirWorkerId
) and then describe the QualificationType as a temporary worker-specific qualification. Set thestatus
to"Active"
. A complete example would be: - Assign the QualificationType to the Worker using
AssignQualification
. - Generate a QualificationRequirement data structure using
GenerateQualificationRequirement
. - Create a new HIT (and associated HITType) that includes the QualificationRequirement. This should, again, use the worker's WorkerId in the title and description so they can easily find it. It is easiest to set a low auto-approval delay, so that the worker is automatically paid. (You can alternatively manually approve the assignment through the Requester User Interface or via
ApproveAssignment
.) - Contact the worker to notify them about the HIT available for them (optionally using
ContactWorker
). - Once the assignment is completed and approved, the QualificationType can be deleted using
DisposeQualificationType
.
worker <- 'A12345EXAMPLE'
# Create Qualification
newqual <- CreateQualificationType(paste('Qualification for Worker', worker),
paste('Temporary Qualification for', worker),
'Active')
# Assign Qualification to Worker
AssignQualification(newqual$QualificationTypeId, worker, value="100")
# Generate QualificationRequirement data structure
qr <- GenerateQualificationRequirement(newqual$QualificationTypeId, "=", "100", preview = TRUE)
# Create HIT
temphit <-
CreateHIT(title= paste("Temporary HIT for", worker),
description = paste("Temporary HIT for", worker),
reward = ".10", # reward should be same as original HIT
keywords = "technical error",
duration = seconds(hours=1),
# attach the new QualificationRequirement data structure:
qual.req = qr,
expiration = seconds(days=3),
# one second delay in autoapproval:
auto.approval.delay = '1',
# a question string or hitlayoutid must be specified:
# this example uses the simple `questionform.txt` example (from below)
question = paste(readLines("questionform.txt"), collapse=''))
# Optionally, contact worker about the HIT
ContactWorker(worker, 'Complete HIT to get paid',
"I've created a HIT for you to be paid. Just search for your worker ID.\n
All you have to do is selection "Yes" and submit. You will be paid automatically.\n
Sorry for the hassle.")
# Optionally, approve assignment (if auto-approval not set)
#ApproveAllAssignments(hit = hit)
# Dispose QualificationType after assignment approved
DisposeQualificationType(newqual$QualificationTypeId)
A simple QuestionForm
data structure can be used to for the question
parameter in CreateHIT
. Here's an example (called questionform.txt
in the above example):
<QuestionForm xmlns="http://mechanicalturk.amazonaws.com/AWSMechanicalTurkDataSchemas/2005-10-01/QuestionForm.xsd">
<Overview>
<Title>Please Click "Yes" Below</Title>
<Text>Sorry you had problems with the HIT. Please click "yes" below to be paid.</Text>
</Overview>
<Question>
<QuestionIdentifier>question1</QuestionIdentifier>
<IsRequired>true</IsRequired>
<QuestionContent>
<Text>Just click "Yes"</Text>
</QuestionContent>
<AnswerSpecification>
<SelectionAnswer>
<StyleSuggestion>radiobutton</StyleSuggestion>
<Selections>
<Selection>
<SelectionIdentifier>1</SelectionIdentifier>
<Text>Yes</Text>
</Selection>
</Selections>
</SelectionAnswer>
</AnswerSpecification>
</Question>
</QuestionForm>
.