Define clear conditions for your task to ensure that you get the desired output. The conditions check that a Toloker did the required actions.
In Toloka, you can use conditions to automate the manual review process. For example, a Toloker can't submit an assignment before they meet your required conditions.
What can be reviewed:
Where to specify conditions:
validation
property of the parent component.condition
property of plugin.trigger.A link to the reviewed data is specified in the data
property.
Some components don't have the data
property, and you can only access them from the validation
property of the parent component (for example, condition.played and condition.played-fully).
To check that the data is filled in, add the condition.required component.
In this example, a Toloker must fill in the text field, otherwise the “Submit” button won't work. The condition.empty component works the opposite way: it checks if the data is empty and returns false
if the data has a value.
To check that the preset value and output value are equal, use the component condition.equals.
In this example, if a Toloker responds “No”, a text entry field appears.
View exampleTo return the values that don't meet the specified conditions, list them in the condition
property of the condition.not component.
In this example, if the condition.equals
condition is met and returns true
, condition.not
returns false
and hides the text entry field.
To check that an array in data
is a subarray for parent
, add the component condition.sub-array.
In this example, the component checks that the values animal
and human
are part of the objects
array. If the responses “Human” and “Animal” are selected, the helper.if
logical component displays the question: “Do the human and animal interact?”.
To check that multiple conditions are met, list them in the condition
property of the condition.all component.
In this example, a Toloker has to do two actions: to fill in the text field and to click the link in the interface. The “Submit” button won't work until both conditions are met.
View exampleTo check that at least one of the conditions is met, list the conditions in the condition
property of the condition.any component.
In this example, a Toloker has to perform at least one of the two actions: to select “Nothing is written there” or to fill in the “What is written on the image?” field. The “Submit” button won't work until one of the conditions is met.
View exampleSome conditions work only with certain components. For example, condition.link-opened works only with view.link
.
In this example, a Toloker has to click the link in the interface, otherwise the “Submit” button won't work.
View exampleIn the list of conditions, you can see all the available components with the name conditions.*
. If you can't find the desired component in the list or want to use a preset configuration, define a review in the JSON Schema format using condition.schema.
Last updated: August 2, 2023