Percentage Allocation Rule Assignments
Use Percentage Allocation Rules to change wages or to pay 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 percentage allocation rule assignments using operations against the /v1/commons/persons/percentage_allocation_rules
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 assign, verify, update, and delete a person's percentage allocation rule assignments.
Create the assignment
The create request:
- uses
personIdentity
to identify the person using their person number - uses
processor
to define the percentage allocation rule to assign - uses
effectiveDate
to define the effective date of the assignment. Note that if you do not specify an effective date, the system will use the current date.
Example request
Call POST /v1/commons/persons/percentage_allocation_rules
with the following request payload.
{
"effectiveDate": "2020-02-20",
"personIdentity": {
"personNumber": "20190"
},
"processor": "Primary PAR"
}
Example response
A success response returns HTTP status code 200 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": {
"qualifier": "Primary PAR"
}
}
Verify the assignment
To verify, you can call GET /v1/commons/persons/percentage_allocation_rules?person_number={personNumber}
or GET /v1/commons/persons/percentage_allocation_rules/{personId}
.
Calling GET /v1/commons/persons/percentage_allocation_rules?person_number=20190
or GET /v1/commons/persons/percentage_allocation_rules/100
returns:
[
{
"effectiveDate": "2020-02-20",
"expirationDate": "3000-01-01",
"personIdentity": {
"personNumber": "20190",
"badgeNumber": "23605",
"personKey": 100,
"employeeKey": 100,
"userKey": 100
},
"processor": {
"qualifier": "Primary PAR"
}
}
]
Update the assignment
To update the person's attestation assignments, call PUT /v1/commons/persons/percentage_allocation_rules
with the following request payload. Note that if you do not specify an effective date, the system will use the current date.
Example request
{
"originalEffectiveDate": "2020-02-20",
"effectiveDate": "2020-04-20",
"personIdentity": {
"personNumber": "20190"
},
"processor": "Primary PAR"
}
Example response
{
"effectiveDate": "2020-04-20",
"expirationDate": "3000-01-01",
"originalEffectiveDate": "2020-02-20",
"personIdentity": {
"personNumber": "20190",
"badgeNumber": "23605",
"personKey": 100,
"employeeKey": 100,
"userKey": 100
},
"processor": {
"qualifier": "Primary PAR"
}
}
Delete an assignment
To delete a percentage allocation rule assignment associated with a person, call DELETE /v1/commons/persons/percentage_allocation_rules
with the following request payload. If an effective date is not specified, this operation deletes the assignment from the beginning of time (defined as 01/01/1753).
{
"effectiveDate": "2020-04-20",
"personIdentity": {
"personKey": "100"
},
"processor": "Primary PAR"
}
The system returns HTTP status 204 with no response body.
Updated over 1 year ago