Business information

Tip.

Run the project in the Sandbox first. This helps you avoid making mistakes and spending money on a task that isn't working right.

In projects of this type, performers search for an item or information about it online. You can use them for:
  • Searching for an item, such as a product or service, by its description.
  • Searching for information on a specific website, such as cities where products can be delivered on a store's website.
  • Searching for information about an item online, such as a company's contact information.

In these instructions, you'll create a task in which performers will search for data about businesses. Let's say you have a list of companies and you need to find their phone numbers and email addresses. In this task, performers see company names and links to their websites and search for the required information about them.

  1. Create a project
  2. Create a pool
  3. Upload a TSV file with tasks.
  4. Get the results
  5. Let performers check the responses
  6. Troubleshooting

Create a project

  1. Choose a template:

    1. Click Create project.

    2. Select the Data search template.

  2. Provide general information:

    1. Enter a clear name and a short description for the project. Performers will see this in the task list.

    2. Optionally add a Private comment.

    3. Click Save.

  3. Edit the task interface in the editor you selected:

    Template Builder
    HTML/CSS/JS editor
    1. The task interface describes how the elements should be arranged in the task.

      Use the ready-made code for this project with pre-configured validation and task layout.

      Learn more about setting up conditions in Template Builder.

    2. Click Show specifications to see the input and output data fields.

      Input data fields are created from the code on the Example of input data tab.

      The output data fields depend on the components that use data.output and values supported by it.

      Learn more about input and output data fields in the Template Builder Help.

      • Input data fields:
        • title — A string with the name of the organization.

        • url — The organization's website URL.

      • Output data fields:
        • phone — A string for entering the organization's phone number.
        • email — A string for entering the organization's email address.
        • not_found — A flag indicating that the organization has no contact information.
    3. Save the changes.

    In the Data specification section, you can configure the input and output fields.

    What are input and output data?

    Input data is types of objects that are passed to the performer for completing the task. For example, this could be a text, an image, or geographic coordinates.

    Output data is types of objects that you receive after the task is completed. For example, this could be one of several response options, typed text, or an uploaded file.

    Learn more about input and output data fields.

    Note.

    You can set up validation of output data using regular expressions. This lets you formalize user responses. The example below uses regular expressions that set the required format for email addresses and phone numbers.

    Regular expressions let you run a project with an overlap greater than one so that each task is completed by several people. In this case, you can skip reviewing assignments and checking each assignment's results and trust average data.

    1. Click to switch graphic mode to JSON format.

    2. In the Input data field, enter the following code:

      {
        "url": {
          "type": "url",
          "hidden": false,
          "required": true
        },
        "title": {
          "type": "string",
          "hidden": false,
          "required": false
        }
      }
      Copied to clipboard
    3. In the Output data field, enter the following code:

      {
        "email": {
          "type": "string",
          "hidden": false,
          "pattern": "^[a-zA-Zа-яА-ЯёЁ0-9\\._-]+@[a-zA-Zа-яА-ЯёЁ0-9\\._-]+\\.[a-zA-Zа-яА-ЯёЁ]{2,}$",
          "required": false
        },
        "phone": {
          "type": "string",
          "hidden": false,
          "pattern": "^\\+?[0-9()\\s-]{4,}$",
          "required": false
        },
        "not_found": {
          "type": "boolean",
          "hidden": false,
          "required": false
        }
      }
      Copied to clipboard
    4. In the Task interface section, you can customize the appearance of tasks for performers.

      Learn more about the task interface.

      Fill in the HTML, JS, and CSS blocks.

      Code for the HTML block
      <!-- Buttons to go to the company's website and search for the company's name in Yandex-->
      <div class="left">
        <div class="title">{{title}}
        </div>
        <div class="site-buttons">
          {{button label="Go to site" action=false href=url}}
          <a href="https://yandex.ru/search/?text={{title}}" target="_blank" class="btn_ya">Search Yandex</a>
        </div>
      <!-- Fields for phone numbers and email addresses. The data format is checked using regular expressions. The expression is written in the "Pattern" parameter of the "phone" and "email" output fields. -->
        <div class="output-fields">
          <label><span>Phone</span>{{field type="input" name="phone" placeholder="8 800 800 88 88"}}</label>
           <!-- The performer can only enter numbers, hyphens, plus sign (+), spaces, and brackets. The "+" symbol is only allowed in the first position. General format: +7(459)123-45-67, 8 800 123 45 67 -->
          <label><span>Email</span>{{field type="input" name="email" placeholder="example@example.com"}}</label>
           <!-- The performer can only enter Latin letters, dots, plus and minus signs, and underscores. General format: test.example@example.com -->
        </div>
      <!-- Checkbox -->
       {{field class="site-buttons"type="checkbox" name="not_found" label="No contacts"}}
      </div>
      Copied to clipboard
      Code for the JS block
      exports.Task = extend(TolokaHandlebarsTask, function (options) {
        TolokaHandlebarsTask.call(this, options);
      }, {
        // Show an error message if the data is entered incorrectly or fields are empty.
        _addError: function (message, field, errors) {
          errors || (errors = {
            task_id: this.getOptions().task.id,
            errors: {}
          });
      
          errors.errors[field] = {
            message: message
          };
      
          return errors;
        },
      
        // Add `https://` at the beginning of the link, if none.
        _prepareURL: function (url) {
          if (!/^\s*https?:\/\//i.test(url)) {
            url = 'http://' + url.trim();
          }
      
          return url;
        },
      
        // Set the field status.
        _renderField: function(values) {
          if (this.getWorkspaceOptions().isReadOnly) return;
      
          for (const field of ['email', 'phone']) {
            if (this.getField(field)) {
              const impl = this.getField(field).getImplementation();
              if (impl.options.disabled !== values.not_found) {
                impl.options.disabled = values.not_found;
                impl.render();
              }
      
              $('[name="' + field + '"]', this.getDOMElement())
                .parents('.field')
                .toggleClass('field_readonly', values.not_found);
            }
          }
          $('.popup_type_error', this.getDOMElement()).removeClass('popup_visible');
        },
      
        setSolutionOutputValues: function (values) {
          this._renderField(values);
      
          TolokaHandlebarsTask.prototype.setSolutionOutputValues.call(this, values);
        },
      
        onRender: function() {
          this._renderField(this.getSolution().output_values);
        },
      
        // This data will be passed to the Handlebars part of the template.
        getTemplateData: function () {
          const data = TolokaHandlebarsTask.prototype.getTemplateData.call(this);
      
          // Add `http://` to the beginning of the link, if necessary.
          data.url = this._prepareURL(data.url);
      
          return data;
        },
      
        // We check the responses when the task is submitted.
        validate: function (solution) {
          let errors;
          const output = solution.output_values;
      
          if (output.not_found) {
            delete output.email;
            delete output.phone;
      
          } else {
            const fields = ['email', 'phone'];
      
            // We show an error if none of the fields are filled in.
            if (!Object.entries(solution.output_values).find(e => fields.includes(e[0]) && e[1])) {
              for (const field of fields) {
                errors = this._addError(this.getWorkspaceOptions().translations['field:error:REQUIRED'], field, errors);
              }
            }
      
            delete output.not_found;
          }
      
          solution.output_values = output;
          return errors || TolokaHandlebarsTask.prototype.validate.call(this, solution);
        }
      });
      
      function extend(ParentClass, constructorFunction, prototypeHash) {
        constructorFunction = constructorFunction || function () { };
        prototypeHash = prototypeHash || {};
      
        if (ParentClass) {
          constructorFunction.prototype = Object.create(ParentClass.prototype);
        }
      
        for (var i in prototypeHash) {
          constructorFunction.prototype[i] = prototypeHash[i];
        }
      
        return constructorFunction;
      }
      Copied to clipboard
      Code for the CSS block
      /* Task on the page */
      .task {
        width: 450px;
      }
      
      /* The "Find in Yandex" button */
      .btn_ya {
        font-size: 13px;
        margin-left: 10px;
        color: #0065D9;
      }
      
      /* Title with the organization name */
      .title {
        padding: 10px;
        border-radius: 5px;
        font-size: 18px;
        line-height: 24px;
      }
      
      /* Phone and email input fields*/
      . output-fields {
      display: table;
        font-size: 13px;
        border-spacing: 0 5px;
      }
      
      .output-fields > label {
        display: table-row;
        margin-bottom: 5px;
      }
      
      .output-fields > label > span {
        display: table-cell;
        text-align: left;
        padding-right: 10px;
        padding-left: 10px;
      }
      
      .output-fields > label > .field {
        margin: 0;
        display: table-cell;
        width: 100%;
      }
      
      /* Button to go to the organization's website*/
      . site-buttons {
        margin: 10px;
        margin-left: 5;
      }
      
      /* Task display on mobile devices. */
      
      @media (pointer: coarse) {
        .field__hotkey {
          display:none;
        }
      }
      
      @media (max-width: 980px) {
        .task {
          width: initial;
        }
        .popup__text {
          width: auto;
        }
      }
      
      
      Copied to clipboard
    5. Click to see the performer's view of the task.

      Note. The project preview shows one task with standard data. You can define the number of tasks to show on the page later.
    6. In the window that opens, check if the task options work correctly:

      1. Answer the question.

      2. In the lower-right corner, click Submit.

      3. Exit preview mode.

    7. Save the changes.

    1. Write short and clear instructions. Describe what needs to be done and give examples in them.

      You can prepare instructions in HTML format, then copy and paste into the editor. Click <> to switch to HTML mode.

    2. Click Finish.

Learn more about working with the project in Project.

Create a pool

A pool is a set of paid tasks sent out for completion at the same time.

  1. Open the page of the project for searching for information online.

  2. Click the Add a pool button.

  3. Specify the Pool name.

  4. In the Price per task suite section, find Price in US dollars and specify the price. For example, 0.01.

    What is a task suite?

    A task suite can contain one or several tasks that are shown on the same page. If the tasks are simple, you can add 10-20 tasks per suite. Don't make task suites too long because it slows down loading speed for performers.

    Performers get paid for completing the entire task suite.

    The number of tasks per suite is set when uploading tasks.

    Learn more about how to set a fair price and see examples of cost for different types of tasks.

  5. In the Performers section, filter performers.

    To make the task available only to performers who speak Russian:

    1. Click Add filter.

    2. Find the Audience presets block in the list and choose the Russian speaking users set of filters.

    3. Assign a skill to performers who participate in the project to search for information online. This ensures that completed assignments are only checked by performers without a skill, meaning those who haven't completed any tasks in this project.

      Click +Add skill and specify the skill name, such as Search for information.

  6. Quality control rules allow you to filter out careless performers.

    In the Quality control section, set Captcha frequency, for example, to Middle.

    Add the following quality control blocks:

    1. Control tasks — filters out performers who often make mistakes in the control tasks.

      1. Click Add Quality Control Rule.

      2. Find the Rules block in the list and choose Control tasks.

      3. Set a rule for the control task: if the number of responses to the control questions is ≥ 3 and correct responses (%) to the control questions is < 60, then ban the performer from the project for 10 days. Specify Control task as a reason.

        This means that if a performer completed more than three control tasks and gave incorrect answers in more than 60% of them, the performer will be banned and won't be able to complete tasks on this project for 10 days.

    2. Fast responses —Filters out performers who respond too quickly.

      1. In the Recent values to use field, enter the number of the performer's recently completed assignments. For example, 10.
      2. In the Minimum time per task suite field, enter the time in seconds. For example, 20.
      3. Set a rule for a fast response: if the number of fast responses ≥ 1, then ban on requester for 10 days. In the Reason field, enter Fast responses.

        This means that a user who completes at least one assignment in less than 20 seconds won't be able to access your tasks for 10 days.

    3. Captcha — Prevents robots from completing tasks.

      1. In the Recent values to use field, enter the number of the performer's recently completed assignments. For example, 10.
      2. Set a captcha rule: if the number of responses ≥ 5 and correct responses (%) < 65, then ban on project for 10 days. In the Reason field, enter Captcha.

        This means that if a performer enters captchas correctly in less than 65% of cases, they won't be able to access tasks in the project for 10 days.

    4. Skipped assignments — Filters out performers who skip multiple assignments in a row.

      Set a rule for skipped tasks : if task suites skipped in a row ≥ 4, then suspend in pool for 10 days. In Reason, enter Skipped assignments.

      This means that a user who skips four or more assignments won't be able to access the pool for 10 days.

    5. Set overlap, which is the number of performers to complete the same task. In the Overlap section, specify the Overlap field value. For tasks of this type it is usually 3-5.

    Note.

    You can copy quality control settings from another pool. To do this, click Copy settings from in the Users filter section.

  7. (optional) In the Speed/quality ratio section, specify the percentage of top-rated performers who will get access to the pool. Learn more in the Speed/quality balance section.

  8. Adjust the pool parameters.

    Specify the Time for completing a task suite in seconds field value. This should give performers enough time to read the instructions, load the task, search for information, and respond. For example, 1200 seconds.

  9. Click Save.

Upload a TSV file with tasks.

Download the sample upload file. You can find it on the pool page. At the top-left of the page, there are links to TSV files with regular, control, and training tasks. Use it to prepare your own file with tasks.

  1. On the pool page, click Upload. In the window that opens, you can also download a sample TSV file by clicking Sample file for uploading tasks.

  2. In the window that opens, configure the file upload settings.

      1. Choose Smart mixing.

      2. In the Main tasks field, specify 9.

      3. In the Training tasks field, specify 0.

      4. In the Control tasks field, specify 1.

      5. Click Upload.

      6. In the window that opens, choose the TSV file with tasks to upload and click Open.

      7. In the window that opens, check the number of tasks and click Add.

    1. Create a control task.

      1. Click Edit.

        Note. If you selected something else instead of smart mixing, click Edit. If this button is missing, delete the file and upload it again.
      2. In the window that opens, click Create control tasks.

      3. In the window that opens, in the Create control task section, mark the result item on the left.

      4. Choose the correct answer to the question.

      5. Click Save and go to next.

      6. Exit the task editing mode.

      Note.

      In small pools, control tasks should be 10% of all tasks. Include different versions of correct responses in equal amounts. View the distribution of responses on the Edit tasks page, Control tasks tab.

    Click to start the pool.

Get the results

After performers complete your tasks, get the results.

On the pool page, click Download results. In the window that opens, click Download results.

Let performers check the responses

If you used Non-automatic acceptance in the project for searching for information online, send the results to performers for the review as tasks. Learn more about non-automatic acceptance.

  1. Create another project using the Blank template. See below what settings should be specified for this project.
  2. Create a task interface that shows:
    • Company name.
    • Email address and phone number of the company.
    • Response options:
      • The email address and phone number are specified correctly.
      • The email address is incorrect.
      • The phone number is incorrect.
      • The email and phone number are incorrect.
  3. Add a pool and set Overlap to 3 in it.
  4. To make this task available to performers who didn't search the web for information on your project, use a filter.

    1. In the Performers section, click Add filter.

    2. Find Skills in the list and choose Choose skill.

    3. In the Choose a skill field, choose Search for information.

    4. In the ? field specify =. Leave the Missing field blank.

  5. Upload tasks to the pool and start it.
  6. When the pool is fully completed, start aggregation of results.
  7. Accept tasks for information search that were completed without errors. Reject the rest, specifying the reason. As soon as you reject the tasks, they are sent for re-completion.

Troubleshooting

How do I use different numbers of response options for different questions?
Use concatenation, for example:
{{field type="checkbox" name=(concat "result." @index ) label=(concat "checkbox –
          " @index) size="L"}}
Copied to clipboard
How can I do it in JS so that if the checkbox is selected, the link is not required, but if the link is inserted, the checkbox is cleared?
  1. See how this is implemented in the Search for information online template.
  2. To solve the second problem, you can add another validation like this:
    if (solution.output_values.url && solution.output_values.check) {return {task_id:
    this.getTask().id,errors: {'url': {code: ''Insert a link or check the box if the site doesn't exist'}}}}
    Copied to clipboard
How do I enable loading audio files in preview mode?

You can't check loading of audio files in the preview mode, but you can do it in the sandbox if you do your task. To do this, register in the sandbox as a performer and add the performer username to your trusted list on the Users page. For more information, see this post.

My performers can't upload a file with the assignment

If none of the performers can submit the assignment, the most likely reason is JS validation. Run JS validation again.

Export your project to the sandbox and try to complete the task in the sandbox yourself.

How do I deselect a radio button?

You can't deselect a radio button. You can only select another radio button as a different response option.

What do I do if the radio button attributes are displayed correctly in the preview, but disappear after saving?

If the tags or attributes disappear after you save the instructions (for example, checked="true"), it means that they are not supported. For the full list of tags that can be used in the instructions, see the Guide.