Recruitment (mining)

Automation job applications

This is an overall explanation of the steps involved:

  1. Mining Job Application Questions: The process starts by sending an HTTP request to the UBIO API with the URL of the job post form and a unique jobPostId. This request "mines" the job application questions from the web page and adds them to the UBIO database.

  2. Retrieving Job Application Questions: Once the job post questions are mined and stored in the database, you can retrieve them using another API call. You provide the jobPostId to fetch the corresponding questions.

    • The service to mine job questions may have a few different states along its run: queued, processing, failed and mined answers/questions.

    • When status is failed, jobs should be recreated (possibly, with new params) manually, as the mining service doesn't have a mechanism for auto-retry.

    • When answers/questions are present in response retrieved, the service succeeded mining questions for job post.

  3. Creating a Job Post Application: To make a job post application on behalf of a user, you need to initiate an automation job using the AutomationCloud API. The inputs required for the application are obtained from the retrieved job application questions. These inputs should be passed to the API endpoint as key-value pairs.

  4. Terms and Conditions: Before submitting the application, the user must consent to the terms and conditions specified.

  5. Submission: The application has been submitted, and you can confirm its status.

This process enables the automation of job applications by extracting application questions, retrieving them when needed, and using the obtained information to create job post applications through the AutomationCloud API.

To access the API, authenticate your requests using basic HTTP authentication. Include a SECRET_KEY value as the username, which will be provided by UBIO. Use your SECRET_KEY and follow instructions for authentication.


Adding new job posts to the database

In order to allow your users to apply for job posts, they need to be added to the UBIO database. This process ensures that the job application questions are “mined” from the job post web page so that you are able to use them to build the application forms on your website.

The mining process is performed by sending an HTTP request to the UBIO API with the URL of the job post form on the ATS and your jobPostId, which you will use to refer to the job post going forward.

The jobPostId is confirmed in the response - as well as the status of the related mining job. When mining a new job this will be queued or processing.

Making a further submission with the same jobPostId will result in overriding the previous results once the mining is complete.

Code sample

POST/v1/recruitment/job-posts/mine/
curl -X POST 'https://services.automation.cloud/v1/recruitment/job-posts/mine/' \
    -H 'Authorization: Basic <credentials>' \
    -H 'Content-Type: application/json' \
--data '{
  "jobPostId": "testJobABC_homeinstead",
  "url": "https://www.homeinstead.com/ads/appcast/?type=employment&fid=149&zip=54313&SourceSub=appcast&applid=48140049638&_ccid=1670255806114sr3pcjsyg"
}'

Success Responses

Status 200

{
  "status": "processing",
  "jobPostId": "testJobXYZ"
}

👆 The "jobPostId" and "status" of the related mining job, confirmed in the response.


Find the questions for a job post

Once a job post has been "mined", its questions can be retrieved from the database with the following API call. The jobPostId must be the same value as the jobPostId value used when initally mining the job post questions.

The response returned depends upon the status of the "mining" job. It may be queued, processing, failed or will return the complete list of questions when complete as per the example below.

Mining jobs with answers/questions or status failed in response, means they reached a final state. When status is failed, jobs should be recreated (possibly, with new params) manually, as the mining service doesn't have a mechanism for auto-retry.

The response includes a serviceId value. This will be used when making an automation - and is required to ensure the correct automation service is used when the job application is made.

Also included in the response are the answers used when 'mining' the job post. This can be useful when preparing test applications.

Code sample

GET/v1/recruitment/job-posts/find/
curl -X GET 'https://services.automation.cloud/v1/recruitment/job-posts/find/' \
    -H 'Authorization: Basic <credentials>' \
    -H 'Content-Type: application/json' \
    -G \
    -d 'jobPostId=testJobXYZ' 

Success Responses

Status 200

{
  "status": "processing"
}

👆 Mining in processing state

{
  "status": "queued"
}

👆 Mining in queued state

{
  "status": "failed",
  "errorCode": "GenericWebsiteError"
}

👆 Mining failed. Note that, error code may be "JobErrorEarlyFail" which is temporary, and a definitive code will be placed soon.

{
  "jobPostId": "testJobXYZ",
  "serviceId": "5a6aa018-3547-465a-932f-89254c3bbf2f",
  "answers": [
    {
      "id": "how-did-you-hear-about-us",
      "value": "Job Board"
    },
    {
      "id": "countryregion",
      "value": "United States Of America"
    },
    "..."
  ],
  "questions": [
    {
      "key": "availableDynamicQuestions:fe5b1f787abead6a73c5200cde99254a2e1fd049",
      "data": [
        {
          "id": "how-did-you-hear-about-us",
          "question": "How Did You Hear About Us?",
          "inputType": "SelectOne",
          "options": [
            {
              "answer": "AGEFIPH",
              "conditionalQuestions": []
            },
            {
              "answer": "Campus Recruitment Fair",
              "conditionalQuestions": []
            },
            "..."
          ],
          "mandatory": true,
          "hidden": false,
          "label": "My Information"
        },
        "..."
      ]
    },
    {
      "key": "availableDynamicQuestions:a09a81f1154ac113429c58de52ed9bba97755d8b",
      "data": [
        {
          "id": "what-is-your-gender",
          "question": "What is your gender?",
          "inputType": "SelectOne",
          "options": [
            {
              "answer": "Divers (Germany and Austria only)",
              "conditionalQuestions": []
            },
            {
              "answer": "Female",
              "conditionalQuestions": []
            },
            "..."
          ],
          "hidden": false,
          "label": "Voluntary Disclosures"
        },
        "..."
      ]
    },
    "..."
  ]
}

👆 Response after mined questions for Job Post


Making a job post application on behalf of a user

In order to make an application to a job post on behalf of a user, you must initiate an automation job with the AutomationCloud API (please note “automation job” is our internal term for an automation session and has no relation to “job post”).

The inputs required for the job post application will be defined by the response from the question retrieval service. These must be passed to the API endpoint by key as per the standard Automation Cloud documentation. Refer to Automation Cloud - Create a Job API.

The serviceId used can be found via the /find endpoint.

This request will return an id value - this is the jobId and is used to interact with the automation job once it has been created.

Sample Request - for creating an Automation Job

curl -X POST 'https://api.automationcloud.net/jobs' \
-H 'Authorization: Basic <credentials>' \
-H 'Content-Type: application/json' \
--data '{
    "category": "test",
    "serviceId": "5a6aa018-3547-465a-932f-89254c3bbf2f",
    "input": {
        "url": "https://otis.wd5.myworkdayjobs.com/en-US/REC_Ext_Gateway/job/Lift-Installation-Engineer_20075594",
        "account": {
            "email": "janedoeXYZ123@gmail.com",
            "password": "123QWEasd-",
            "phone": {
                "number": "0721111111",
                "countryCode": "gb"
            },
            "isExisting": false
        },
        "applicant": {
            "person": {
                "firstName": "Jane",
                "lastName": "Doe"
            }
        },
        "files": {
            "cv": {
                "url": "https://git-scm.com/images/progit2.png",
                "type": "File",
                "filename": "cv.png"
            }
        },
        "options": {
            "mineQuestions": false
        },
        "selectedDynamicQuestions:fe5b1f787abead6a73c5200cde99254a2e1fd049": [
            {
                "id": "how-did-you-hear-about-us",
                "value": "Internet Job Search"
            },
            {
                "id": "countryregion",
                "value": "United States Of America"
            },
            {
                "id": "given-names",
                "value": "Jane"
            },
            {
                "id": "family-name",
                "value": "Doe"
            },
            {
                "id": "address-line-1",
                "value": "123 Smith Street"
            },
            {
                "id": "postal-code",
                "value": "90210"
            },
            {
                "id": "phone-device-type",
                "value": "Mobile"
            },
            {
                "id": "countryregion-phone-code",
                "value": "+1"
            },
            {
                "id": "phone-number",
                "value": "(415) 555-1234"
            }
        ],
        "selectedDynamicQuestions:19ff5eb34d85ca59beb6ece453f6cfd4704f16a4": [
            [
                {
                    "id": "job-title",
                    "value": "Software Developer"
                },
                {
                    "id": "company",
                    "value": "ABC Tech"
                },
                {
                    "id": "from",
                    "value": "1993-01-18"
                },
                {
                    "id": "to",
                    "value": "2023-06-01"
                }
            ]
        ],
        "selectedDynamicQuestions:745332b7d52d9b38ea49818b7aebd4871132a4a8": [
            [
                {
                    "id": "school-or-university",
                    "value": "University of California, Los Angeles"
                },
                {
                    "id": "degree",
                    "value": "Bachelors"
                }
            ]
        ],
        "selectedDynamicQuestions:fec22e694d4dddf659a28c4703a4c813fdaca6e1": [
            [
                {
                    "id": "url",
                    "value": "https://example.com"
                }
            ]
        ],
        "selectedDynamicQuestions:587eb324e120edbf05004fa7e3a2ebc78e82136a": [
            {
                "id": "do-you-now-work-or-have-you-ever-worked-",
                "value": "No"
            },
            {
                "id": "are-you-presently-authorized-to-work-in-",
                "value": "Yes"
            },
            {
                "id": "are-you-subject-to-any-employment-restri",
                "value": "No"
            },
            {
                "id": "please-provide-details",
                "value": "Jane Doe"
            },
            {
                "id": "are-you-a-current-united-states-of-ameri",
                "value": "No"
            },
            {
                "id": "are-you-a-former-us-federal-government",
                "value": "NO,  I am not a FORMER U.S federal government employee nor am I a current official of any Government"
            }
        ],
        "selectedDynamicQuestions:a09a81f1154ac113429c58de52ed9bba97755d8b": [
            {
                "id": "i-have-read-and-consent-to-the-terms-and",
                "value": true
            }
        ],
        "submit": true
    }
}'

Sample Response - after created an Automation Job

  {
    "object": "job",
    "id": "0b8b0a81-1b33-45d3-8751-aa4ddc4554fd",
    "serviceId": "5a6aa018-3547-465a-932f-89254c3bbf2f",
    "serviceName": "WorkDay",
    "domainId": "Generic",
    "state": "processing",
    "category": "test",
    "awaitingInputKey": null,
    "awaitingInputStage": "",
    "lastAwaitingInputKey": null,
    "rejectedInput": null,
    "progress": 0,
    "error": null,
    "activeTdsId": null,
    "inputs": [],
    "outputs": [],
    "piiRemoved": false,
    "sessionId": "715c9dab-57c4-498f-b0d4-4a4ca7e5677a",
    "sessionCount": 0,
    "successCode": null,
    "createdAt": 1692791773046,
    "updatedAt": 1692791773299,
    "finishedAt": null,
    "duration": 374
}

Making a job post application on behalf of a user (simple)

This request is a duplicate of the above - with more simple job applications used as examples.

Refer to Automation Cloud - Create a Job API

Sample Request - for creating an Automation Job

curl -X POST 'https://api.automationcloud.net/jobs' \
-H 'Authorization: Basic <credentials>' \
-H 'Content-Type: application/json' \
--data '{
    "category": "test",
    "serviceId": "{{serviceId}}",
    "input": {
        "url": "{{url}}",
        "account": {
            "email": "janedoeXYZ@gmail.com",
            "password": "123QWEasd-",
            "phone": {
                "number": "0721111111",
                "countryCode": "gb"
            },
            "isExisting": false
        },
        "applicant": {
            "person": {
                "firstName": "Jane",
                "lastName": "Doe"
            }
        },
        "files": {
            "cv": {
                "url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
                "type": "File",
                "filename": "dummy.pdf"
            }
        },
        "options": {
            "mineQuestions": false
        },
        "selectedDynamicQuestions:1437b6647cb42543db84774783e7902e0ffd51f2": [
            {
                "id": "where-do-you-want-to-work",
                "value": "AL"
            },
            {
                "id": "years-of-experience-in-primary-specialty",
                "value": "5"
            }
        ],
        "submit": true
    }
}'

Sample Response - after created an Automation Job

{
  "object": "job",
  "id": "85c83d70-4499-4c67-b9d3-5cea4fca0a8a",
  "serviceId": "b3b397c4-fb2f-400a-8cc4-5268bb4b98ac",
  "serviceName": "lever",
  "domainId": "Generic",
  "state": "processing",
  "category": "test",
  "awaitingInputKey": null,
  "awaitingInputStage": "",
  "lastAwaitingInputKey": null,
  "rejectedInput": null,
  "progress": 0,
  "error": null,
  "activeTdsId": null,
  "inputs": [],
  "outputs": [],
  "piiRemoved": false,
  "sessionId": "1481c40c-ff38-4104-b8d5-bb5948901b4d",
  "sessionCount": 0,
  "successCode": null,
  "createdAt": 1692878634620,
  "updatedAt": 1692878634756,
  "finishedAt": null,
  "duration": 194
}

Check Application Status

To check the status of the job application, refer to the 'job' created in the previous POST request. Use the jobId to query the /jobs endpoint, which will return the job's status. It will confirm whether the job was successful. In case of failure, an error code and message will be included.

Refer to Automation Cloud - Retrieve a Job API

Sample Request - for retrieving an Automation Job

curl -X GET 'https://api.automationcloud.net/jobs/{{jobId}}/' \
    -H 'Authorization: Basic <credentials>' \
    -H 'Content-Type: application/json'

Sample Response - after retrieved an Automation Job

{
    "object": "job",
    "id": "0b8b0a81-1b33-45d3-8751-aa4ddc4554fd",
    "serviceId": "5a6aa018-3547-465a-932f-89254c3bbf2f",
    "serviceName": "WorkDay",
    "domainId": "Generic",
    "state": "success",
    "category": "test",
    "awaitingInputKey": null,
    "awaitingInputStage": "",
    "lastAwaitingInputKey": null,
    "rejectedInput": null,
    "progress": 100,
    "error": null,
    "activeTdsId": null,
    "inputs": [
        {
            "object": "job-input-meta",
            "key": "url",
            "createdAt": 1692791773169
        },
        {
            "object": "job-input-meta",
            "key": "account",
            "createdAt": 1692791773179
        },
        {
            "object": "job-input-meta",
            "key": "applicant",
            "createdAt": 1692791773187
        },
        {
            "object": "job-input-meta",
            "key": "files",
            "createdAt": 1692791773193
        },
        {
            "object": "job-input-meta",
            "key": "options",
            "createdAt": 1692791773200
        },
        {
            "object": "job-input-meta",
            "key": "selectedDynamicQuestions:fe5b1f787abead6a73c5200cde99254a2e1fd049",
            "createdAt": 1692791773207
        },
        {
            "object": "job-input-meta",
            "key": "selectedDynamicQuestions:19ff5eb34d85ca59beb6ece453f6cfd4704f16a4",
            "createdAt": 1692791773215
        },
        {
            "object": "job-input-meta",
            "key": "selectedDynamicQuestions:745332b7d52d9b38ea49818b7aebd4871132a4a8",
            "createdAt": 1692791773222
        },
        {
            "object": "job-input-meta",
            "key": "selectedDynamicQuestions:fec22e694d4dddf659a28c4703a4c813fdaca6e1",
            "createdAt": 1692791773233
        },
        {
            "object": "job-input-meta",
            "key": "selectedDynamicQuestions:587eb324e120edbf05004fa7e3a2ebc78e82136a",
            "createdAt": 1692791773240
        },
        {
            "object": "job-input-meta",
            "key": "selectedDynamicQuestions:a09a81f1154ac113429c58de52ed9bba97755d8b",
            "createdAt": 1692791773247
        },
        {
            "object": "job-input-meta",
            "key": "submit",
            "createdAt": 1692791773257
        }
    ],
    "outputs": [
        {
            "object": "job-output-meta",
            "key": "section:23f67605be4b09dea46b19ad49ae191b5c289003",
            "createdAt": 1692791789382
        },
        {
            "object": "job-output-meta",
            "key": "availableDynamicQuestions:fe5b1f787abead6a73c5200cde99254a2e1fd049",
            "createdAt": 1692791789741
        },
        {
            "object": "job-output-meta",
            "key": "section:08e760919543078c9dcc20381c33497d64ca0c3a",
            "createdAt": 1692791810595
        },
        {
            "object": "job-output-meta",
            "key": "availableDynamicQuestions:19ff5eb34d85ca59beb6ece453f6cfd4704f16a4",
            "createdAt": 1692791812159
        },
        {
            "object": "job-output-meta",
            "key": "availableDynamicQuestions:745332b7d52d9b38ea49818b7aebd4871132a4a8",
            "createdAt": 1692791833051
        },
        {
            "object": "job-output-meta",
            "key": "availableDynamicQuestions:fec22e694d4dddf659a28c4703a4c813fdaca6e1",
            "createdAt": 1692791839546
        },
        {
            "object": "job-output-meta",
            "key": "section:b7143b5977e5b15193f3c6422d37ef14fafe62d8",
            "createdAt": 1692791847856
        },
        {
            "object": "job-output-meta",
            "key": "availableDynamicQuestions:587eb324e120edbf05004fa7e3a2ebc78e82136a",
            "createdAt": 1692791848967
        },
        {
            "object": "job-output-meta",
            "key": "section:1a43dad090a443a686fd471be5dfe5ac1294f90f",
            "createdAt": 1692791865426
        },
        {
            "object": "job-output-meta",
            "key": "availableDynamicQuestions:a09a81f1154ac113429c58de52ed9bba97755d8b",
            "createdAt": 1692791865675
        },
        {
            "object": "job-output-meta",
            "key": "review",
            "createdAt": 1692791871542
        },
        {
            "object": "job-output-meta",
            "key": "successfulApplication",
            "createdAt": 1692791875768
        }
    ],
    "piiRemoved": false,
    "sessionId": "715c9dab-57c4-498f-b0d4-4a4ca7e5677a",
    "sessionCount": 1,
    "successCode": null,
    "createdAt": 1692791773046,
    "updatedAt": 1692791773299,
    "finishedAt": 1692791875891,
    "duration": 102845
}