Employee Job Preferences - Aggregated

Job preferences allow you to define and assign an order to the jobs on the Business Structure that each employee prefers.

Prerequisites

A person's person ID is the same as the personKey and employee ID, and is not the same as the person number.

The person in this example has a person ID of 100 and a person number of 20190.

Example

In this example, we assign, verify, update, and delete a person's job preferences.

Create or update assignments

The create or update request:

  • uses personNumber to identify the person using their person number
  • uses the employeeJobPreferences object to define the job preferences to assign

Example request

Call POST /v1/commons/persons/assignments/multi_upsert with the following request payload.

[
  {
    "personIdentity": {
      "personNumber": "20190"
    },
    "personAssignments": {
      "employeeJobPreferences": {
        "employeeJobPreferences": [
          {
            "job": "Germany/Metropolitan Plant/Administration/Manufacturing Manager",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Assembly/Mechanic",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Assembly/Pipefitter",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Assembly/Assembler I",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Assembly/Associate Mechanic",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Assembly/Mechanical Assemble-Solderer",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Assembly/Mechanical Technician",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Assembly/Quality Tester",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Assembly/Machinist",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Machine Shop/Department Manager",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Machine Shop/Draftsman",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Machine Shop/Machinist",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Machine Shop/Lead",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Machine Shop/Apprentice Welder",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Machine Shop/Facilities Supervisor",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Machine Shop/Facilities Technician",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Machine Shop/Master Welder",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Receiving/Intern",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Receiving/Receiving Clerk",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Receiving/Mail Clerk",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Receiving/Warehouse Clerk",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Shipping/Forklift Driver",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Shipping/Data Entry Clerk",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Shipping/Shipping Clerk",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          }
        ]
      }
    }
  }
]

Example response

A success response returns HTTP status code 200 and a response body similar to the following example.

[
  {
    "personIdentity": {
      "personNumber": "20190"
    },
    "personAssignments": {
      "employeeJobPreferences": {
        "employeeJobPreferences": [
          {
            "job": "Germany/Metropolitan Plant/Administration/Manufacturing Manager",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Assembly/Mechanic",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Assembly/Pipefitter",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Assembly/Assembler I",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Assembly/Associate Mechanic",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Assembly/Mechanical Assemble-Solderer",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Assembly/Mechanical Technician",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Assembly/Quality Tester",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Assembly/Machinist",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Machine Shop/Department Manager",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Machine Shop/Draftsman",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Machine Shop/Machinist",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Machine Shop/Lead",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Machine Shop/Apprentice Welder",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Machine Shop/Facilities Supervisor",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Machine Shop/Facilities Technician",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Machine Shop/Master Welder",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Receiving/Intern",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Receiving/Receiving Clerk",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Receiving/Mail Clerk",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Receiving/Warehouse Clerk",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Shipping/Forklift Driver",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Shipping/Data Entry Clerk",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Shipping/Shipping Clerk",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          }
        ]
      }
    }
  }
]

Verify assignments

You can use the bulk multi-read operation to verify assignments for multiple people at once.

Example request

To verify, call POST /v1/commons/persons/assignments/multi_read with the following request payload.

{
  "where": {
    "employees": {
      "key": "personNumber",
      "values": [
        "20190"
      ]
    },
    "personAssignments": [
      "employeeJobPreferences"
    ]
  }
}

Example response

A success response returns HTTP status code 200 and a response body similar to the following example.

[
  {
    "personIdentity": {
      "personNumber": "20190"
    },
    "personAssignments": {
      "employeeJobPreferences": {
        "employeeJobPreferences": [
          {
            "job": "Germany/Metropolitan Plant/Administration/Manufacturing Manager",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Assembly/Mechanic",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Assembly/Pipefitter",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Assembly/Assembler I",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Assembly/Associate Mechanic",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Assembly/Mechanical Assemble-Solderer",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Assembly/Mechanical Technician",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Assembly/Quality Tester",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Assembly/Machinist",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Machine Shop/Department Manager",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Machine Shop/Draftsman",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Machine Shop/Machinist",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Machine Shop/Lead",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Machine Shop/Apprentice Welder",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Machine Shop/Facilities Supervisor",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Machine Shop/Facilities Technician",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Machine Shop/Master Welder",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Receiving/Intern",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Receiving/Receiving Clerk",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Receiving/Mail Clerk",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Receiving/Warehouse Clerk",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Shipping/Forklift Driver",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Shipping/Data Entry Clerk",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          },
          {
            "job": "Germany/Metropolitan Plant/Shipping/Shipping Clerk",
            "preference": "NO PREFERENCE",
            "schedulingContextSet": []
          }
        ]
      }
    }
  }
]

Delete assignments

To delete a person's job preferences, call call POST /v1/commons/persons/assignments/multi_upsert and remove the unwanted job preferences from the request.

Example request

[
  {
    "personIdentity": {
      "personNumber": "20190"
    },
    "personAssignments": {
      "employeeJobPreferences": {
        "employeeJobPreferences": []
      }
    }
  }
]

Example response

[
  {
    "personIdentity": {
      "personNumber": "20190"
    },
    "personAssignments": {
      "employeeJobPreferences": {
        "employeeJobPreferences": []
      }
    }
  }
]

Note: You can verify that the assignments were deleted by calling POST /v1/commons/persons/assignments/multi_read with a request payload specifying all of the affected person identities.