Employee Adjustment Rule Assignments

Adjustment rules change a person's wages or pays a person extra based on time entered in a timecard. Adjustments can be made based on multiple labor accounts and selection criteria, such as a labor category or cost center, or both.

You can assign, update, delete, and retrieve details about adjustment rule assignments using operations against the /v1/commons/persons/adjustment_rule resource.

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 retrieve a list of available adjustment rules and then assign, verify, update, and delete a person's adjustment rule assignments.

Retrieve available adjustment rules

Call GET v1/commons/persons/adjustment_rule/multi_read to retrieve a list of all available assignments. The response returned will resemble the example below.

[
    {
        "effectiveDate": "2018-10-12",
        "expirationDate": "2018-10-13",
        "personIdentity": {
            "personNumber": "20335",
            "badgeNumber": "89883",
            "personKey": 218,
            "employeeKey": 218,
            "userKey": 218
        },
        "processor": "NewADJ_82"
    },
    {
        "effectiveDate": "2019-01-01",
        "expirationDate": "3000-01-01",
        "personIdentity": {
            "personNumber": "20335",
            "badgeNumber": "89883",
            "personKey": 218,
            "employeeKey": 218,
            "userKey": 218
        },
        "processor": "NAME1234"
    }
]

Create the assignment

The create request:

  • uses personIdentity to identify the person using their person number
  • uses processor to define the adjustment rule to assign
  • uses effectiveDate to define the effective date of the assignment

Example request

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

{
  "effectiveDate": "2020-02-20",
  "personIdentity": {
    "personNumber": "20190"
  },
  "processor": "NAME1234"
}

Example response

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

{
    "effectiveDate": "2020-02-20",
    "expirationDate": "3000-01-01",
    "personIdentity": {
        "personNumber": "20190",
        "badgeNumber": "23605",
        "personKey": 100,
        "employeeKey": 100,
        "userKey": 100
    },
    "processor": "NAME1234"
}

Verify the assignment

To verify, you can call GET /v1/commons/persons/adjustment_rule/?person_number={personNumber}&processor={adjustmentRule}&effective_date={YYYY-MM-DD} or GET /v1/commons/persons/adjustment_rule/multi_read.

Calling GET /v1/commons/persons/adjustment_rule/?person_number=20190&processor=NAME1234&effective_date=2020-02-20 returns:

[
    {
        "effectiveDate": "2020-02-20",
        "expirationDate": "3000-01-01",
        "personIdentity": {
            "personNumber": "20190",
            "badgeNumber": "23605",
            "personKey": 100,
            "employeeKey": 100,
            "userKey": 100
        },
        "processor": "NAME1234"
    }
]

Calling GET /v1/commons/persons/adjustment_rule/multi_read returns an array of all adjustment rules with the newly assigned adjustment rule included:

[
    {
        "effectiveDate": "2018-10-12",
        "expirationDate": "2018-10-13",
        "personIdentity": {
            "personNumber": "20335",
            "badgeNumber": "89883",
            "personKey": 218,
            "employeeKey": 218,
            "userKey": 218
        },
        "processor": "NewADJ_82"
    },
    {
        "effectiveDate": "2019-01-01",
        "expirationDate": "3000-01-01",
        "personIdentity": {
            "personNumber": "20335",
            "badgeNumber": "89883",
            "personKey": 218,
            "employeeKey": 218,
            "userKey": 218
        },
        "processor": "NAME1234"
    },
    {
        "effectiveDate": "2020-02-20",
        "expirationDate": "3000-01-01",
        "personIdentity": {
            "personNumber": "20190",
            "badgeNumber": "23605",
            "personKey": 100,
            "employeeKey": 100,
            "userKey": 100
        },
        "processor": "NAME1234"
    }
]

Update the assignment

To update the person's attestation assignments, call PUT /v1/commons/persons/adjustment_rule with the following request payload.

Example request

{
  "originalEffectiveDate": "2020-02-20",
  "effectiveDate": "2020-03-10",
  "personIdentity": {
    "personNumber": "20190"
  },
  "processor": "NAME1234"
}

Example response

{
    "effectiveDate": "2020-03-10",
    "expirationDate": "3000-01-01",
    "originalEffectiveDate": "2020-02-20",
    "personIdentity": {
        "personNumber": "20190",
        "badgeNumber": "23605",
        "personKey": 100,
        "employeeKey": 100,
        "userKey": 100
    },
    "processor": "NAME1234"
}

Delete an assignment

To delete an adjustment rule assignment associated with a person, call DELETE /v1/commons/persons/adjustment_rule with the following request payload.

{
  "effectiveDate": "2020-03-10",
  "personIdentity": {
    "personKey": "100"
  },
  "processor": "NAME1234"
}

The system returns HTTP status 204 with no response body.