# Configuration item classes in the OTOBO CMDB

> How to create OTOBO CMDB classes, import Ready2Import bundles, and grant the itsm-configitem group.

- HTML: https://otobo-docs.softoft.de/en/other/cmdb/classes-and-items/
- Markdown: https://otobo-docs.softoft.de/en/other/cmdb/classes-and-items.md

A **configuration item class** is the form and the rule set for one kind of asset. The items themselves are the real servers, rooms, contracts, and applications. OTOBO stores every later edit as a new version of that item.

![A class holds many configuration items. Each item keeps its own versions. Name, owner, and location are attributes of the class.](../../../../../assets/cmdb/cmdb-class-model.jpg)

_A class such as Server holds many configuration items. Each item keeps its own version history._

## Class, item, and version

```mermaid
flowchart LR
  Class["Class: Server"] --> A["srv-01"]
  Class --> B["srv-02"]
  Class --> C["srv-03"]
  A --> Versions["Version 1, 2, 3"]
  Class --> Fields["Name, owner, location"]
```

| Object             | What it is                                  | Where you edit it                               |
| ------------------ | ------------------------------------------- | ----------------------------------------------- |
| Class              | The template: fields, pages, who may see it | General Catalog and **Change class definition** |
| Configuration item | One real asset of that class                | Agent CMDB, create or edit item                 |
| Version            | One saved state of that item                | Written when the item changes                   |

Do not put every laptop into its own class. One class **Computer**, many items. Add a class only when the fields or the audience really differ, for example a contract versus a server.

## Grant the itsm-configitem group

Agents who work in the CMDB must belong to the group **itsm-configitem**. Without that group the CMDB screens stay hidden, even when the classes already exist.

1. Open **Admin → Agents** (or group management).
2. Add the agent to **itsm-configitem**.
3. Ask the agent to sign in again and open a configuration item.

A single class can use a different permission group. You set that on the catalog entry, not in the ticket queues.

## Import a Ready2Import bundle

OTOBO ships class bundles for common assets so you do not model a server from a blank page.

:::caution[Import on a copy first]
Importing a Ready2Import bundle creates many dynamic fields. OTOBO does not undo that import for you. Use a non-productive system first.
:::

1. Open the admin view.
2. Open **Config Items** in **CMDB Settings**.
3. In **Ready2Import Class Bundles**, select the bundle you want.
4. Import the bundle.
5. Open one new item and check that the config item zoom shows the pages you expect.

After the import, rename labels and drop fields you will not maintain. An unused serial-number field becomes empty data, and empty data is what makes a CMDB useless six months later.

## Adjust the class without rewriting it

Two places, two jobs:

- **General Catalog → ITSM::ConfigItem::Class → the class name.** Categories and the permission group. This is who may see items of this class, and how you group them in lists.
- **CMDB Settings → Config Items → the class → Change class definition.** The YAML for pages, sections, and dynamic fields on the config item zoom. That layout is covered in [YAML modeling](https://otobo-docs.softoft.de/en/other/cmdb/ci-yaml/) and [field types](https://otobo-docs.softoft.de/en/other/cmdb/field-types/).

Overview columns are separate again. The system configuration keys `ITSMConfigItem::Frontend::AgentITSMConfigItem###ClassColumnsAvailable` and `ClassColumnsDefault` choose which attributes the list shows. There is a matching pair for the customer frontend.

## What to record on the first items

Pick ten real assets and fill them by hand before you import a spreadsheet.

- A name a support agent will search for (`srv-db-01`, not `new server`).
- An owner, as an agent or a customer user. See [tickets and customers](https://otobo-docs.softoft.de/en/other/cmdb/tickets-and-customers/).
- A place in the chain: room, rack, or parent system. See [relations and impact](https://otobo-docs.softoft.de/en/other/cmdb/relations-and-impact/).
- Only the attributes someone will read during an incident.

When those ten items look right on the config item zoom, import or synchronize the rest. The class is the contract. The items are the inventory.

## Where to go next

- [Field types](https://otobo-docs.softoft.de/en/other/cmdb/field-types/) — reference, lens, and General Catalog fields.
- [YAML modeling](https://otobo-docs.softoft.de/en/other/cmdb/ci-yaml/) — pages, grids, and roles.
- [Import and export](https://otobo-docs.softoft.de/en/other/cmdb/import-export-cmdb/) — CSV, XML, and APIs once the class is stable.

## Frequently asked questions

### What is a configuration item class in the OTOBO CMDB?

A configuration item class is the template for one kind of asset. Servers, rooms, contracts, and software each get their own class. The class decides which dynamic fields an item stores and which pages appear on the config item zoom.

Individual assets are configuration items of that class. Each item keeps a version history, so a later change does not erase the previous state. Agents only see classes their groups allow. The usual group for CMDB work is itsm-configitem.

Start from a Ready2Import bundle when you want a working set of classes, then adjust the General Catalog entry and the class definition.

- [OTOBO CMDB basic configuration](https://doc.otobo.org/manual/packages/itsmconfigurationmanagement/11.0/en/content/configuration/basic_configuration.html)
- [Config item definitions](https://doc.otobo.org/manual/packages/itsmconfigurationmanagement/11.0/en/content/configuration/custom_configuration_and_advanced_features/config_item_definitions.html)

### How do I import Ready2Import class bundles in OTOBO?

Open the admin area, go to Config Items under CMDB Settings, and use the Ready2Import Class Bundles panel. Pick a bundle and import it. OTOBO then creates the dynamic fields and class definitions in that bundle.

The import is not reversed automatically, and it creates a large number of dynamic fields. Try it on a non-productive system first. After the import, assign agents to the group itsm-configitem so they can open the items.

You can still change categories, the permission group, and the zoom layout afterwards. Class attributes such as the permission group live on the General Catalog class ITSM::ConfigItem::Class. The zoom pages live in the YAML you open with Change class definition.

- [OTOBO CMDB basic configuration](https://doc.otobo.org/manual/packages/itsmconfigurationmanagement/11.0/en/content/configuration/basic_configuration.html)
- [CMDB overview](https://doc.otobo.org/manual/packages/itsmconfigurationmanagement/11.0/en/content/overview.html)
