Org chart in AI Cost Management

Minimum Version
AI Gateway - 2.3
Incompatible with
on-prem

The org chart is the structure of your organization in Konnect: the people in it, the teams they belong to, and who reports to whom. AI Cost Management uses it to attribute AI spend to teams and people. You can set a spend limit on any team or user from the org chart.

You build the org chart by uploading your org structure as a CSV file, typically exported from your HR system (HRIS). Konnect creates teams from the reporting lines in the file. Teams and team membership change only when you upload a file.

To open the org chart:

  1. In the Konnect sidebar, click Cost Management.
  2. Click Org Chart.

Only organization admins can upload an org structure or set spend limits.

Org structure file

The org structure file is a CSV file of up to 10 MB and 50,000 rows, with one row per user and a reporting chain at most 200 levels deep. Save the file as UTF-8. Konnect removes the byte-order mark that Excel adds. The first row is a header with the following columns:

Column

Description

external_id A unique ID for the person in your HR system. Konnect uses it to match users across uploads.
email The user’s email address.
given_name The user’s first name.
family_name The user’s last name.
manager_external_id The external_id of the person this user reports to. Konnect uses it to build the teams.
cost_center (optional) The user’s cost center.

Konnect matches column names without regard to case, and ignores any other column. Leave manager_external_id empty for the one user at the top of the org.

You can download a sample file from the upload dialog by clicking Download sample CSV.

Avoiding common import failures

Most failed imports have the same causes. Keep the following in mind when you build the export:

  • Export the whole org every time. Konnect treats the file as the complete org chart and deactivates anyone from an earlier import who isn’t in the new file.
  • Include one row per person. Filter out duplicate rows for people with multiple jobs, positions, or employments.
  • Use the same ID type in external_id and manager_external_id. For example, if external_id is an employee number, manager_external_id must be an employee number too, not a position ID or a name.
  • Include active people and people on leave, since their direct reports still need them as a manager. Exclude terminated people and future hires.
  • Don’t filter out managers. If a filter removes a manager, every direct report of that manager fails to import.
  • Only the person at the top of the org should have no manager. A vacant manager position can leave other people without one too, so assign those people an interim manager before you export.

Import errors

If any row has a problem, Konnect rejects the whole file and changes nothing. The following are the most common import errors and their usual causes:

Error

Solution

external_id: is required The person doesn’t have an ID in the export. Filter to rows that have one, or add it in your HR system.
external_id: is duplicated within the file The export has more than one row for this person, for example one per job, position, or employment. Filter to the primary one.
email: is required A user is missing an email. Add the email in your HR system, or import after it’s created.
email: must be a valid email address The value isn’t in the form name@domain. Fix the address in your HR system.
email: is duplicated within the file Two people share a mailbox, or one person has two rows. Give each person their own address, and keep one row per person.
email: already exists in this directory A different principal in this directory already has this email address. Give each person a unique email, or update the other principal’s identity first.
display_name: is required Konnect builds the display name from given_name and family_name, and at least one of them must have a value.
display_name: must be at most 255 characters Konnect builds the display name from given_name and family_name. Together, they can be at most 255 characters.
cost_center: must be at most 255 characters The value is longer than 255 characters. Shorten it in your HR system.
manager_external_id: does not match a row in the file There’s a mismatch due to one of the following reasons:
  • The manager isn’t in the file, because of a filter or because they left.
  • The manager ID is of a different type, such as a position ID.
manager_external_id: must be a single manager The cell has several IDs separated by a comma or semicolon. Pick one manager in the export.
manager_external_id: only one person may have no manager People under a vacant manager position don’t have a manager. Assign them an interim manager.
manager_external_id: never reaches a person with no manager The reporting chain is a loop, such as two people who are each other’s manager, or it’s more than 200 levels deep.
The file couldn’t be checked: duplicate column "<column_name>" in the CSV header Two columns in the header have the same name. The error names the duplicate. Rename or remove one of them.
The file couldn’t be checked: wrong number of fields A row has more or fewer cells than the header. Common causes are an unquoted comma in a name, a title line above the header, or a totals row at the end. The error names the line number.

Upload an org structure

You can build or update an org chart by uploading an org structure file. To automate imports instead of using the dialog each time, use kongctl or the API.

Update an org chart

A re-upload matches the org structure to the file, so re-upload an updated org structure file whenever people or reporting lines change, for example monthly or after a reorganization.

A re-upload applies the following changes:

  • Konnect uses external_id to find each person who is already in the org chart. If a row’s external_id matches an existing user, the re-upload replaces that person’s email, name, and manager with the values in the file. If it doesn’t match, the re-upload creates a new user.
  • Konnect deactivates users that the file no longer lists. They’re not deleted.
  • A re-upload never reactivates an inactive user, even if the file lists them. This applies whether you deactivated the user manually or an earlier re-upload deactivated them. The preview shows a warning for each of these users. To reactivate a user, click Reactivate in the users table or on the user’s details page.
  • Teams and team memberships follow the reporting lines in the file. Managers get the Team Manager role for their team. If a manager is also an Org Admin, they keep their Org Admin permissions. See AI Management roles.
  • A re-upload doesn’t invite anyone to Konnect. To give people access, invite them.

A re-upload deletes a team that has no members in the new file. A re-upload doesn’t delete a team that only changed. For example, if a manager’s name changes, the re-upload renames the team and keeps its ID.

Deleting a team doesn’t change your budget list. Budgets that you set on a deleted team still appear in Cost Management > Budgets. You can keep them for your records, or delete them manually. To limit a different team, edit the budget’s scope in Budgets, or create a new budget.

You can’t delete the whole org chart.

Browse the org chart

The org chart shows each team and user in a table. Expand a team to see its people and sub-teams. Deactivated users have an Inactive badge.

Select a team or user to see its details:

  • For a team, the direct users and sub-teams. The counts don’t include members of sub-teams.
  • For a user, their ID and cost center, and a link to the user’s details.

Cost centers

A cost center is where a user’s spend is charged. You set it per user, either with the optional cost_center column in the org structure file or in the user’s details. Until a user has one, their details show Unattributed as the cost center. Cost centers don’t change how AI Cost Management reports spend. Teams don’t have cost centers, only individual users.

The cost_center column works as follows:

  • If a row matches an existing user, the upload replaces that user’s cost center with the value in the file. This includes a cost center you set in the user’s details.
  • If the cell is blank, the upload clears the user’s cost center.
  • If the file has no cost_center column, the upload leaves every cost center as it is.

Set a spend limit on a team or user

A spend limit is a budget scoped to a single team or user.

To set a spend limit from the org chart:

  1. Select a team or user in the org chart.
  2. In the details, click Set spend limit.
  3. In the Monthly spend limit field, enter an amount in US dollars greater than zero, with at most two decimals.
  4. Click Set limit.

The details show the amount spent, the limit, and what remains of it. To change the amount later, click Edit spend limit, then click Save limit.

The following rules apply to limits set from the org chart:

  • The limit uses a monthly budget window.
  • The org chart can’t remove a limit or change its period. Use the details page of the user or group instead. Both pages offer daily, weekly, and monthly periods and Remove limit.
  • The org chart shows only the limit set directly on the selected team or user. It doesn’t show limits that apply through a parent team, a group, or an organization-wide budget.
  • If several limits cover a user, each one tracks the user’s spend and sends its own alerts.
  • Like any budget, a spend limit tracks spend but doesn’t block requests. It sends alerts only when the budget has notification thresholds and channels, which you set in Cost Management > Budgets. See Budgets in AI Cost Management.

Team scope in budgets

When you set a spend limit in the org chart, Konnect creates a budget for you. The budget’s scope has one filter that selects the team or user:

Selected in the org chart

Filter field

Filter value

Team team principal/UUID, where UUID is the team’s ID
User subject principal/UUID, where UUID is the user’s ID

The budget has one pooled limit shared by all the usage that matches the filter. You can create the same budget with the API.

A usage event counts toward a team’s budget when the event lists that team in its teams field. See Groups and teams to learn how events get their teams.

Limitations

The org chart has the following limitations:

  • You can’t create teams or change team membership manually. Teams change only when you upload a file.
  • The file supports only the columns listed in Org structure file.
  • An organization has one org chart.
  • The org chart doesn’t roll up spend or member counts from sub-teams into a parent team.

FAQs

Teams and their members come only from the org structure file. To change them, upload an updated file.

An upload makes the org structure match the file. Users that were imported before and that the new file doesn’t list are deactivated. The upload doesn’t delete them, so their usage history stays.

Konnect checks the file before it imports anything. Import is disabled when the check finds errors, or when everyone in the file is already up to date. Fix the listed errors and choose the file again.

Until a user has a cost center, their details show Unattributed as the cost center. Cost center doesn’t change how AI Cost Management reports spend. Add a cost_center column to the org structure file, or set the cost center in the user’s details.

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!