Manage Areas of Responsibility

You may do all of role provisioning through an on-premise application including managing areas of responsibility for your workforce. When users sign in to Oracle HCM Cloud, they get the required level of access.

Let's discuss these scenarios:

  • Create an Area of Responsibility
  • Create an Area of Responsibility Using a Template
  • Retrieve an Area of Responsibility
  • Reassign an Area of Responsibility
  • Update an Area of Responsibility

Create an Area of Responsibility

Let's say that Shawn Roy is a new hire in the Human Resources department. He will represent all employees in the Vision Central business unit whose last names start with the letters J-O.

To create a new area of responsibility:

  1. Query (GET) the employee by using a query parameter such as assignmentNumber and BusinessUnitName on the workers resource.
  2. Perform a POST operation on areasOfResponsibility resource by providing the attributeslastNameStart, lastNameEnd and assignmentId or assignmentNumber 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/areasOfResponsibility

Example Request

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

Provide the header.

Content-Type: application/json
{
    "ResponsibilityName": "Vision_J-O",
    "ResponsibilityType": "HR_REP",
    "ActiveStatus": "A",
    "StartDate": "2020-06-15",
    "AssignmentNumber": "E955160008184479",
    "BusinessUnitName": "Vision Central",
    "LastNameStart": "J",
    "LastNameEnd": "O"
}

Example Response

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

{
  "ResponsibilityId": 300100211954722,
  "ResponsibilityName": "Vision_J-O",
  "ResponsibilityType": "HR_REP",
  "PersonId": 300100075614630,
  "PersonNumber": "955160008184479",
  "DisplayName": "Shawn Roy",
  "AssignmentId": 300100075614642,
  "AssignmentNumber": "E955160008184479",
  "AssignmentName": "Principal Consultant",
  "TemplateId": null,
  "TemplateCode": null,
  "TemplateName": null,
  "ActiveStatus": "A",
  "StartDate": "2020-06-15",
  "EndDate": null,
  "WorkContactsFlag": true,
  "BusinessUnitId": 300100024264603,
  "JobId": null,
  "LegalEntityId": null,
  "LocationId": null,
  "DepartmentId": null,
  "PositionId": null,
  "HierarchyType": null,
  "DepartmentTreeCode": null,
  "OrganizationTreeCode": null,
  "PositionTreeCode": null,
  "TopManagerId": null,
  "links": [
      ...]
}

Create an Area of Responsibility Using a Template

Shawn Roy will also be a benefits representative for the Launch Benefits benefits group. A new template has been created to assign the benefits representative responsibility for this group.

To create an area of responsibility based on a template:

  1. Query (GET) the assignment information using the AssignmentNumber query parameter on the workers resource.
  2. Query (GET) the template information from the responsibilityTemplatesLOV resource.
  3. Perform a POST operation on the areasOfResponsibility resource by providing the attributes AssignmentNumber and TemplateCode in the request body.
  4. Verify the details returned in the response.

Example URL

Use this resource URL format.

POST
/hcmRestApi/resources/11.13.18.05/areasOfResponsibility

Example Request

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

Provide the headers.

Content-Type: application/vnd.oracle.adf.resourceitem+json
prefer: return=representation
REST-Framework-Version: 4
{
    "ResponsibilityName": "Benefits Responsibility",
    "TemplateCode": "LBGTemplate",
    "StartDate":"2020-06-16",
    "AssignmentNumber": "E955160008184479"
 }

Example Response

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

{
  "ResponsibilityId": 300100211987494,
  "ResponsibilityName": "Benefits Responsibility",
  "ResponsibilityType": "BEN_REP",
  "ResponsibilityTypeMeaning": null,
  "PersonId": 300100075614630,
  "PersonNumber": "955160008184479",
  "DisplayName": "Shawn Roy",
  "AssignmentId": 300100075614642,
  "AssignmentNumber": "E955160008184479",
  "AssignmentName": "Principal Consultant",
  "TemplateId": 300100211962785,
  "TemplateCode": "LBGTemplate",
  "TemplateName": "Launch Benefits Group Template",
  "ActiveStatus": "A",
  "StartDate": "2020-06-16",
  "EndDate": null,
  "WorkContactsFlag": true,
  "AssignmentCategory": null,
  "AssignmentCategoryMeaning": null,
  "BargainingUnitCode": null,
  "BargainingUnit": null,
  "BenefitGroupId": 100000018019267,
  "BenefitGroupName": "Launch Benefits Group",
  "BusinessUnitId": null,
  "BusinessUnitName": null,
  "CountryCode": null,
  "Country": null,
  "GradeId": null,
  "GradeCode": null,
  "GradeSetCode": null,
  "GradeName": null,
  "JobFamilyId": null,
  "JobFamilyCode": null,
  "JobFamilyName": null,
  "JobId": null,
  "JobCode": null,
  "JobSetCode": null,
  "JobName": null,
  "JobFunctionCode": null,
  "JobFunctionMeaning": null,
  "LastNameStart": null,
  "LastNameEnd": null,
  "LegalEntityId": null,
  "LegalEmployerName": null,
  "LegislativeDataGroupId": null,
  "LegislativeDataGroupName": null,
  "LocationId": null,
  "LocationCode": null,
  "LocationSetCode": null,
  "LocationName": null,
  "DepartmentId": null,
  "DepartmentName": null,
  "PayrollId": null,
  "PayrollName": null,
  "PayrollStatUnitId": null,
  "PayrollStatutoryUnitName": null,
  "PositionId": null,
  "PositionCode": null,
  "PositionName": null,
  "RecruitingTypeCode": null,
  "RecruitingTypeMeaning": null,
  "TaxReportingUnitId": null,
  "TaxReportingUnitName": null,
  "HierarchyType": null,
  "HierarchyTypeMeaning": null,
  "DepartmentTreeCode": null,
  "DepartmentTreeName": null,
  "DepartmentTreeVersionId": null,
  "DepartmentTreeVersionName": null,
  "TopDepartmentId": null,
  "TopDepartmentName": null,
  "OrganizationTreeCode": null,
  "OrganizationTreeName": null,
  "OrganizationTreeVersionId": null,
  "OrganizationTreeVersionName": null,
  "TopOrganizationId": null,
  "TopOrganizationName": null,
  "PositionTreeCode": null,
  "PositionTreeName": null,
  "PositionTreeVersionId": null,
  "PositionTreeVersionName": null,
  "TopPositionId": null,
  "TopPositionName": null,
  "TopManagerId": null,
  "TopManagerNumber": null,
  "TopManagerName": null,
  "IncludeTopHierNodeFlag": null,
  "HierarchyLevels": null,
  "RecruitingLocHierarchyId": null,
  "RecruitingLocHierarchyName": null,
  "RecruitingOrgHierarchyId": null,
  "RecruitingOrgHierarchyName": null,
  "RecruitingOrgTreeCode": null,
  "RecruitingOrgTreeVer": null,
  "CreatedBy": "GENERIC_USER",
  "CreationDate": "2020-06-15T20:01:36+00:00",
  "LastUpdatedBy": "GENERIC_USER",
  "LastUpdateDate": "2020-06-15T20:01:36.735+00:00",
  "links": [
      ...]
}

Retrieve a Collection of Area of Responsibilities

Shawn's department launched an initiative to check all the areas of responsibility that have been created using the Launch Benefits Group Template.

To get a collection of areas of responsibility;

  1. Perform a GET operation on the areasOfResponsibility resource by using the query parameter TemplateName.
  2. Verify the details returned in the response.

Example URL

Use this resource URL format.

GET
hcmRestApi/resources/11.13.18.05/areasOfResponsibility?q=TemplateName='Launch Benefits Group Template'&fields=-BusinessUnitId,-JobId,-LegalEntityId,-LocationId,-DepartmentId,-PositionId,-HierarchyType,-DepartmentTreeCode,-OrganizationTreeCode,-PositionTreeCode,-TopManagerId,%2BBenefitGroupId,%2BBenefitGroupName

Example Response

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

{
  "items": [
    {
      "ResponsibilityId": 300100200403824,
      "ResponsibilityName": "Launch Benefits Group Template 10Jul2020151909189",
      "ResponsibilityType": "BEN_REP",
      "PersonId": 300100075614630,
      "PersonNumber": "955160008184479",
      "DisplayName": "Shawn Roy",
      "AssignmentId": 300100075614642,
      "AssignmentNumber": "E955160008184479",
      "AssignmentName": "Principal Consultant",
      "TemplateId": 300100200403822,
      "TemplateCode": "LBGTemplate",
      "TemplateName": "Launch Benefits Group Template",
      "ActiveStatus": "A",
      "StartDate": "2020-07-10",
      "EndDate": null,
      "WorkContactsFlag": true,
      "BenefitGroupId": 100000018019267,
      "BenefitGroupName": "Launch Benefits Group",
      "links": [...]
    },
    {
      "ResponsibilityId": 300100200403825,
      "ResponsibilityName": "Launch Benefits Group Template 10Jul2020151917789",
      "ResponsibilityType": "BEN_REP",
      "PersonId": 15828,
      "PersonNumber": "15828",
      "DisplayName": "Rachel Chung",
      "AssignmentId": 15756,
      "AssignmentNumber": "11",
      "AssignmentName": "11",
      "TemplateId": 300100200403822,
      "TemplateCode": "LBGTemplate",
      "TemplateName": "Launch Benefits Group Template",
      "ActiveStatus": "A",
      "StartDate": "2020-07-10",
      "EndDate": null,
      "WorkContactsFlag": true,
      "BenefitGroupId": 100000018019267,
      "BenefitGroupName": "Launch Benefits Group",
      "links": [...]
    },
    {
      "ResponsibilityId": 300100200403826,
      "ResponsibilityName": "Launch Benefits Group Template 10Jul2020151925598",
      "ResponsibilityType": "BEN_REP",
      "PersonId": 15839,
      "PersonNumber": "15839",
      "DisplayName": "Peter Wilson",
      "AssignmentId": 15767,
      "AssignmentNumber": "12",
      "AssignmentName": "12",
      "TemplateId": 300100200403822,
      "TemplateCode": "LBGTemplate",
      "TemplateName": "Launch Benefits Group Template",
      "ActiveStatus": "A",
      "StartDate": "2020-07-10",
      "EndDate": null,
      "WorkContactsFlag": true,
      "BenefitGroupId": 100000018019267,
      "BenefitGroupName": "Launch Benefits Group",
      "links": [...]
    },
    {
      "ResponsibilityId": 300100200403827,
      "ResponsibilityName": "Launch Benefits Group Template 10Jul2020151928800",
      "ResponsibilityType": "BEN_REP",
      "PersonId": 11571,
      "PersonNumber": "11571",
      "DisplayName": "Donna Iannetta",
      "AssignmentId": 10950,
      "AssignmentNumber": "5",
      "AssignmentName": "5",
      "TemplateId": 300100200403822,
      "TemplateCode": "LBGTemplate",
      "TemplateName": "Launch Benefits Group Template",
      "ActiveStatus": "A",
      "StartDate": "2020-07-10",
      "EndDate": null,
      "WorkContactsFlag": true,
      "BenefitGroupId": 100000018019267,
      "BenefitGroupName": "Launch Benefits Group",
      "links": [
          ...]
}

Reassign an Area of Responsibility

Another employee in Shawn's department, Peter Wilson, has been reassigned and his area of responsibility, Launch Benefits Group Template 10Jul2020151925598 needs to be reassigned to his co-worker, Rachel Abbot.

To reassign an area of responsibility:

  1. Query the assigned area of responsibility by performing a GET operation on the areasOfResponsibility resource, using the query parameters AssignmentNumber and ResponsibilityName.
  2. Perform a POST operation on the areasOfResponsibility resource, providing the AssignmentId 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/areasOfResponsibility/300100200403826/action/reassign

Example Request

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

Provide the headers.

REST-Framework-Version: 4
Content-Type:application/vnd.oracle.adf.action+json
{
    "AssignmentId":"300100016652096"
}

Example Response

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

{
  "result": "true"
}

Update an Area of Responsibility

Another employee in the same department, Noah David has moved and the location of his Regional HR Representative area of responsibility needs to be updated to reflect the new location.

To update an area of responsibility:

  1. Query (GET) the worker's assignment information by using the query parameter assignmentNumber or PersonId on the workers resource.
  2. Perform a GET operation on the areasOfResponsibility resource by using the assignmentNumber or PersonId and retrieve the worker's assigned area of responsibility. For example, hcmRestApi/resources/11.13.18.05/areasOfResponsibility?q=PersonId='100001' or hcmRestApi/resources/11.13.18.05/areasOfResponsibility?q=AssignmentNumber='100002'
  3. Perform a PATCH operation on the URL for the worker's areasOfResponsibility item.
  4. Verify the details returned in the response.

Example URL

Use this resource URL format.

PATCH
/hcmRestApi/resources/11.13.18.05/areasOfResponsibility/300100203490134

Example Request

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

Provide the headers.

REST-Framework-Version: 4
Content-Type: application/vnd.oracle.adf.resourceitem+json
Prefer: return=representation
{
    "LocationCode": "US_ATL"
}

Example Response

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

{
  "ResponsibilityId": 300100203490134,
  "ResponsibilityName": "Regional HR Rep",
  "ResponsibilityType": "HR_REP",
  "ResponsibilityTypeMeaning": "Human resources representative",
  "PersonId": 300100033210227,
  "PersonNumber": "955160008177032",
  "DisplayName": "Noah David",
  "AssignmentId": 300100033210245,
  "AssignmentNumber": "E955160008177032",
  "AssignmentName": "E955160008177032",
  "TemplateId": null,
  "TemplateCode": null,
  "TemplateName": null,
  "ActiveStatus": "A",
  "StartDate": "2020-07-01",
  "EndDate": null,
  "WorkContactsFlag": true,
  "AssignmentCategory": null,
  "AssignmentCategoryMeaning": null,
  "BargainingUnitCode": null,
  "BargainingUnit": null,
  "BenefitGroupId": null,
  "BenefitGroupName": null,
  "BusinessUnitId": null,
  "BusinessUnitName": null,
  "CountryCode": "US",
  "Country": "United States",
  "GradeId": null,
  "GradeCode": null,
  "GradeSetCode": null,
  "GradeName": null,
  "JobFamilyId": null,
  "JobFamilyCode": null,
  "JobFamilyName": null,
  "JobId": null,
  "JobCode": null,
  "JobSetCode": null,
  "JobName": null,
  "JobFunctionCode": null,
  "JobFunctionMeaning": null,
  "LastNameStart": null,
  "LastNameEnd": null,
  "LegalEntityId": null,
  "LegalEmployerName": null,
  "LegislativeDataGroupId": null,
  "LegislativeDataGroupName": null,
  "LocationId": 300100082241243,
  "LocationCode": "US_ATL",
  "LocationSetCode": "COMMON",
  "LocationName": "Atlanta",
  "DepartmentId": null,
  "DepartmentName": null,
  "PayrollId": null,
  "PayrollName": null,
  "PayrollStatUnitId": null,
  "PayrollStatutoryUnitName": null,
  "PositionId": null,
  "PositionCode": null,
  "PositionName": null,
  "RecruitingTypeCode": null,
  "RecruitingTypeMeaning": null,
  "TaxReportingUnitId": null,
  "TaxReportingUnitName": null,
  "HierarchyType": null,
  "HierarchyTypeMeaning": null,
  "DepartmentTreeCode": null,
  "DepartmentTreeName": null,
  "DepartmentTreeVersionId": null,
  "DepartmentTreeVersionName": null,
  "TopDepartmentId": null,
  "TopDepartmentName": null,
  "OrganizationTreeCode": null,
  "OrganizationTreeName": null,
  "OrganizationTreeVersionId": null,
  "OrganizationTreeVersionName": null,
  "TopOrganizationId": null,
  "TopOrganizationName": null,
  "PositionTreeCode": null,
  "PositionTreeName": null,
  "PositionTreeVersionId": null,
  "PositionTreeVersionName": null,
  "TopPositionId": null,
  "TopPositionName": null,
  "TopManagerId": null,
  "TopManagerNumber": null,
  "TopManagerName": null,
  "IncludeTopHierNodeFlag": false,
  "HierarchyLevels": null,
  "RecruitingLocHierarchyId": null,
  "RecruitingLocHierarchyName": null,
  "RecruitingOrgHierarchyId": null,
  "RecruitingOrgHierarchyName": null,
  "RecruitingOrgTreeCode": null,
  "RecruitingOrgTreeVer": null,
  "CreatedBy": "HCM_USER10",
  "CreationDate": "2020-07-13T13:58:28+00:00",
  "LastUpdatedBy": "HCM_INTEGRATION_SPEC",
  "LastUpdateDate": "2020-07-13T14:11:42+00:00",
  "links": [
       ...]
}