Manage Someone's Salary

You may store salary information in Oracle HCM Cloud applications but use an on-premise application to show and maintain salary information. Or, you may want to create, correct, and delete salary information for the person's employment assignment in an on-premise application and have the salary information reflect in Oracle HCM Cloud. This use case describes the scenarios where you use the salaries REST service to create, correct, and delete salary information associated with a employment assignment for a person who's information you're allowed to manage.

Let's discuss these scenarios:

  • Create someone's salary
  • Correct someone's salary
  • Delete someone's salary

Here's a typical application processing flow for the scenarios:

  1. You configure a salary basis according to your organizational requirements and synchronize it to be same in the on-premise and Oracle HCM Cloud applications.
  2. You maintain employees' salaries in an on-premise application.
  3. When a salary creation, correction, or deletion occurs in the on-premise application, the application makes a call to the Oracle HCM Cloud Salaries REST service and returns appropriate data.

Create Someone's Salary

Let's say that Mark is Jen's HR representative and he wants to create her new salary of $60,000 a year for her current assignment.

To create the salary in Oracle HCM Cloud:

  1. Retrieve the Assignment ID of the employee's current assignment.
  2. Perform a POST operation on the employee's salary using the URL for the salaries resource by providing the salary details in the request body.
  3. Verify the details returned in the response.

Example URL

Use this resource URL format.

POST

/hcmRestApi/resources/11.13.18.05/salaries

Example Request

Here's an example of the request body in JSON format.

{
  "AssignmentId": 300100202336523,
  "SalaryBasisId": 300100149751784,
  "DateFrom": "2009-02-19",
  "SalaryAmount": 60000,
  "ActionId": 100100065995742
}

Example Response

Here's an example of the response body in JSON format.

{
  "AssignmentId": 300100202336523,
  "SalaryId": 300100202336976,
  "SalaryBasisId": 300100149751784,
  "SalaryFrequencyCode": "ANNUAL",
  "SalaryBasisType": "U",
  "CurrencyCode": "EUR",
  "DateFrom": "2009-02-19",
  "DateTo": "4712-12-31",
  "SalaryAmount": 60000,
  "AdjustmentAmount": 10000,
  "AdjustmentPercentage": 20,
  "AnnualSalary": 60000,
  "AnnualFullTimeSalary": 60000,
  "Quartile": null,
  "Quintile": null,
  "CompaRatio": null,
  "RangePosition": null,
  "SalaryRangeMinimum": null,
  "SalaryRangeMidPoint": null,
  "SalaryRangeMaximum": null,
  "SearchDate": null,
  "FrequencyName": "Annually",
  "AssignmentNumber": null,
  "DisplayName": "REST_AUTO_SB_01",
  "ActionId": 100100065995742,
  "ActionReasonId": null,
  "ActionCode": null,
  "ActionReasonCode": null,
  "ActionReason": null,
  "ActionName": null,
  "Code": "REST_AUTO_SB_01",
  "links": [
     {
     ...}
  ]
}

Correct Someone's Salary

Let's say that Jen recently got a salary raise. Mark, Jen's HR representative, verifies her salary information and realizes that her current salary is still showing the previous amount and needs to be corrected.

To correct the salary in Oracle HCM Cloud:

  1. Retrieve the salary ID of the employee.
  2. Perform a PATCH operation on the salary ID using the URL for the salaries resource and providing the salary amount in the request body.
  3. Verify the details returned in the response.

Example URL

Use this resource URL format.

PATCH

/hcmRestApi/resources/11.13.18.05/salaries/{SalaryID}

Example Request

Here's an example of the request body in JSON format.

{
  "SalaryAmount": 108000
}

Example Response

Here's an example of the response body in JSON format.

{
  "AssignmentId": 300100202336523,
  "SalaryId": 300100202336976,
  "SalaryBasisId": 300100149751784,
  "SalaryFrequencyCode": "ANNUAL",
  "SalaryBasisType": "U",
  "CurrencyCode": "EUR",
  "DateFrom": "2009-02-19",
  "DateTo": "4712-12-31",
  "SalaryAmount": 108000,
  "AdjustmentAmount": 58000,
  "AdjustmentPercentage": 116,
  "AnnualSalary": 108000,
  "AnnualFullTimeSalary": 108000,
  "Quartile": null,
  "Quintile": null,
  "CompaRatio": null,
  "RangePosition": null,
  "SalaryRangeMinimum": null,
  "SalaryRangeMidPoint": null,
  "SalaryRangeMaximum": null,
  "SearchDate": null,
  "FrequencyName": "Annually",
  "AssignmentNumber": "E955160008191810",
  "DisplayName": "REST_AUTO_SB_01",
  "ActionId": 100100065995742,
  "ActionReasonId": null,
  "ActionCode": "CMP_CHANGE_SALARY",
  "ActionReasonCode": null,
  "ActionReason": null,
  "ActionName": "Salary Change",
  "Code": "REST_AUTO_SB_01",
  "links": [
     {
     ...}
  ]
}

Delete Someone's Salary

Let's say that Mark created Jen's most recent salary record in error and wants to delete it.

To delete the salary in Oracle HCM Cloud:

  1. Retrieve the salary ID of the employee.
  2. Perform a DELETE operation on the salary ID using the URL for the salaries resource.

Example URL

Use this resource URL format.

DELETE

/hcmRestApi/resources/11.13.18.05/salaries/{SalaryID}

Example Response

Here's an example of the response body in JSON format.

204 No content