Home > Mobile >  Modifying the Employee Information field in Suite Admin SDK Python
Modifying the Employee Information field in Suite Admin SDK Python

Time:05-04

Is there a way to modify these fields through the Admin SDK without manually doing it through the admin console? Specifically under the employee information, the job title, type of employee, manager's email and department.

enter image description here

I've looked at Employee fields

The API result is the following (after removing the irrelevant fields):

{
  "externalIds": [
    {
      "value": "ID-123",
      "type": "organization"
    }
  ],
  "relations": [
    {
      "value": "[email protected]",
      "type": "manager"
    }
  ],
  "organizations": [
    {
      "title": "My Job Title",
      "primary": true,
      "customType": "",
      "department": "My Department",
      "description": "My Employee Type",
      "costCenter": "My Cost Center"
    }
  ],
  "locations": [
    {
      "buildingId": "My Building ID",
      "floorName": "My Floor Name",
      "floorSection": "My Floor Section"
    }
  ]
}

So from this we can deduce that Job Title corresponds to organizations.title, Type of employee corresponds to organizations.description, Manager's email corresponds to relations.value that also has a relations.type = manager and Department corresponds to organizations.department.

Do note that as explained in the documentation that you were looking at, these fields can hold multiple values, so the user can have multiple organizations, but the one that shows in the Admin console is the one marked as primary, they can have multiple relations other than manager such as assistant, spouse, etc. They can have multiple locations and so on.

Generally what will be displayed in the Admin console are the primary fields. Any secondary values may not show up but you can still retrieve them via the API. Most likely they're meant for custom applications that can take advantage of reading these multiple fields, while the console only shows the most relevant fields (as decided by Google).

  • Related