Departments and organization structure

An organization can be set up with an organization structure that consists of departments, that can be used as a base for the approval structure.

The organization structure can be managed via list or update. When doing an update the full structure can be used as payload or just parts of the structure.

{
    "id": "d5b1f808c078424cab77434e77cc9005",
    "externalSourceId": null,
    "name": "Headquarter",
    "description": "The money factory",
    "approvers": [],
    "ownerId": null,
    "costCenterId": null,
    "projectId": null,
    "vatType": "USE_CATEGORY",
    "presetValues": [],
    "level": 0,
    "subUnits": [
        {
            "id": "ab65911e52e64e729a6f8fb95116ecf5",
            "externalSourceId": null,
            "name": "HR",
            "description": "People and culture",
            "approvers": [],
            "ownerId": "d5b1f808c078424cab77434e77cc9005",
            "costCenterId": null,
            "projectId": null,
            "vatType": "USE_CATEGORY",
            "presetValues": [],
            "level": 1,
            "subUnits": []
        },
        {
            "id": "715430be31674cb48de4c5e7fe7dded2",
            "externalSourceId": null,
            "name": "R&D",
            "description": "",
            "approvers": [],
            "ownerId": "d5b1f808c078424cab77434e77cc9005",
            "costCenterId": null,
            "projectId": null,
            "vatType": "USE_CATEGORY",
            "presetValues": [],
            "level": 1,
            "subUnits": [
                {
                    "id": "9ae57f6d3d0f4b5f9063221148b24b68",
                    "externalSourceId": null,
                    "name": "Core",
                    "description": "",
                    "approvers": [],
                    "ownerId": "715430be31674cb48de4c5e7fe7dded2",
                    "costCenterId": null,
                    "projectId": null,
                    "vatType": "USE_CATEGORY",
                    "presetValues": [],
                    "level": 2,
                    "subUnits": []
                },
                {
                    "id": "54541c685f21480984d55a1cb97e6594",
                    "externalSourceId": null,
                    "name": "New Initiatives",
                    "description": "",
                    "approvers": [],
                    "ownerId": "715430be31674cb48de4c5e7fe7dded2",
                    "costCenterId": null,
                    "projectId": null,
                    "vatType": "USE_CATEGORY",
                    "presetValues": [],
                    "level": 2,
                    "subUnits": []
                }
            ]
        }
    ],
    "organizationId": "8ab28c4e7a3cd3e6017a3f765d7902eb"
}

As displayed above a tree structure can be used with thesubUnits and level

Set department on a user

Fetch the id from the organization structure list (described above) and add it to the field organizationalUnitId when creating or updating a user.

[
    {
        "id": "8a5c9c38923312df019233457a0504e2",
        "title": "National Creative Technician",
        "department": "Deportes",
        "organizationalUnitId": "ab65911e52e64e729a6f8fb95116ecf5",
        "employeeId": "17",
        "firstName": "Helmer",
        "lastName": "Parisian",
        "isAdministrator": false
    },
    {
        "id": "8a5c9c38923312df019233426fd304de",
        "title": "Legacy Response Executive",
        "organizationalUnitId": "d5b1f808c078424cab77434e77cc9005",
        "employeeId": "481",
        "firstName": "Fabian",
        "lastName": "Gislason"
    }
]

The result:

Approval on organization structure

To set up approval based on departments you first need to activate approval in the admin web client.

Approval can be configured based on organization structure or dimension, make sure organization structure is enabled.

A approvers section is now available for updating who is approving the department. To address an approver the users personID is to be used.

{
    "id": "d5b1f808c078424cab77434e77cc9005",
    "name": "Headquarter AB",
    "description": "The money factory",
    "approvers": [
        {
            "id": "5f27462ab79940878212ec56f8a9ef59",
            "amountLimit": null,
            "sortOrder": 0,
            "personId": "8a5c9c38923312df019233426f7d04dd"
        }
    ],
    "presetValues": [],
    "level": 0,
    "subUnits": [
        {
            "id": "ab65911e52e64e729a6f8fb95116ecf5",
            "name": "Human Resources",
            "description": "People and culture",
            "approvers": [
                {
                    "id": "81c8fdc7ced649fda4796bbe1c2cb2b9",
                    "amountLimit": null,
                    "personId": "8a5c9c38923312df019233426f7d04dd"
                }
            ],