Global Multiple Manager Role switching

A logged-in manager who has two or more multi-manager roles (Role Assignments) can switch between assigned roles using the API and a global query parameter: roleId.

Important: Once the logged-in manager's role is switched with the roleId query parameter, that role remains active until you pass a different roleId value or the logged-in manager's session expires.

Procedure

  1. The logged-in manager must have at least two or more roles assigned.
[
    {
        "personIdentity": {
            "personNumber": "10015"
        },
        "roleAssignmentChanges": {
            "add": [
                {
                    "name": "Secondary Role",
                    "description": "Used as a secondary role",
                    "attributes": [
                        {
                            "type": {
                                "qualifier": "FUNCTION_ACCESS_PROFILE"
                            },
                            "value": {
                                "qualifier": "Manufacturing Manager Using PE"
                            }
                        },
                        {
                            "type": {
                                "qualifier": "DISPLAY_PROFILE"
                            },
                            "value": {
                                "qualifier": "Manu Display Profile"
                            }
                        },
                        {
                            "type": {
                                "qualifier": "PAY_CODE_EDIT_PROFILE"
                            },
                            "value": {
                                "qualifier": "Manufacturing Pay Codes"
                            }
                        },
                        {
                            "type": {
                                "qualifier": "WORK_RULE_PROFILE"
                            },
                            "value": {
                                "qualifier": "Manufacturing Work Rules"
                            }
                        },
                        {
                            "type": {
                                "qualifier": "REPORT_PROFILE"
                            },
                            "value": {
                                "qualifier": "Manager"
                            }
                        },
                        {
                            "type": {
                                "qualifier": "EMPLOYEE_GROUP"
                            },
                            "value": {
                                "qualifier": "Empty Profile"
                            },
                            "effectiveDate": "1753-01-01",
                            "expirationDate": "2017-04-18"
                        },
                        {
                            "type": {
                                "qualifier": "EMPLOYEE_GROUP"
                            },
                            "value": {
                                "qualifier": "US Manufacturing Set"
                            },
                            "effectiveDate": "2017-04-18",
                            "expirationDate": "3000-01-01"
                        },
                        {
                            "type": {
                                "qualifier": "MANAGER_JOB_TRANSFER_SET"
                            },
                            "value": {
                                "qualifier": "Empty Profile"
                            },
                            "effectiveDate": "1753-01-01",
                            "expirationDate": "2017-04-18"
                        },
                        {
                            "type": {
                                "qualifier": "MANAGER_JOB_TRANSFER_SET"
                            },
                            "value": {
                                "qualifier": "US Mfg Metropolitan Plant Set"
                            },
                            "effectiveDate": "2017-04-18",
                            "expirationDate": "3000-01-01"
                        }
                    ],
                    "default": false
                }
            ]
        }
    }
]
  1. Acquire the role assignment IDs for the different roles available to the logged-in manager using the Retrieve Manager Role Assignments by Person Number GET operation. For example:

GET /v1/commons/persons/manager_role_assignments/?person_number=10015

The response resembles the following example:

{
  "personIdentity": {
    "personId": 51,
    "personNumber": "10015"
  },
  "roleAssignments": [
    {
      "assignmentId": 631,
      "name": "Secondary Role",
      "description": "Used as a secondary role",
      "attributes": [
        ...
      ],
      "default": false
    },
    {
      "assignmentId": 221,
      "name": "Initial Role",
      "description": "Initial role assignment",
      "attributes": [
        ...
      ],
      "default": true
    }
  ]
}

Note: The example response's attributes array is truncated in this example.

  1. Using the assignmentId value associated with the desired manager role, pass the optional query parameter roleId with any API operation. For example:

POST /v1/commons/persons/51?roleId=221

POST /v1/scheduling/schedule/pay_code_edits/multi_create?roleId=631

Important: Once the logged-in manager's role is switched with the roleId query parameter, that role remains active until you pass a different roleId value or the logged-in manager's session expires.