7.4.3 Import/Export

A list of configuration items can be exported and imported as a CSV file.
It is possible to save a list of configuration items at a given point in time to a file, or to create and edit multiple configuration items at once.

This section describes the following items.
(1) Create an import/export template
(2) Export configuration item
(3) Import configuration item


(1) Create an import/export template

A template is a set of rules that defines the types of objects in OTOBO and the mapping of their fields to information in input and output files, as well as the format of the files. Create a template in the following way.

Select [Admin] from the main menu, and then click [Administration] - [Import/Export]. On the [Import/Export Management] screen, click the [Add template] button. Follow the transition display and fill in the following fields.


1. [Step 1 of 5 - Edit common information:]

(Table) Edit common information

Field Required Description
Name Yes Template name
Object Yes Select "Config Item".
Format Yes Select "CSV".
Valid Yes Select "valid".
Comment No Enter any comments.

2. [Step 2 of 5 - Edit object information:]

(Table) Edit object information

Field Required Description
Class Yes Class of configuration item to be imported/exported
Maximum number of one element Yes For fields that can have multiple values in a configuration item, set the maximum number of elements.
Empty fields indicate that the current values are kept Yes Clear the checkbox.

3. [Step 3 of 5 - Edit format information:]

(Table) Edit format information

Field Required Description
Column Separator Yes CSV file delimiter
Charset Yes Select "UTF-8".
Include Column Headers Yes Select "Yes".

4. [Step 4 of 5 - Edit mapping information:]
Set the mapping between each column in the CSV file and the fields in the configuration item.
Click [Add Mapping Element] and add the corresponding field in the [CSV] column. The meaning of each column in the table is as follows.

(Table) Edit mapping information

Field Description
KEY*1 Configuration item field name
"Number" is an automatically assigned number that is unique to the entire configuration item and can be selected even if it is not included in the class definition.
IDENTIFIER*2, *3 Check this box if you want to treat it as an identifier of the configuration item. The identifier is used to map each row of information in the imported CSV file to the corresponding configuration item stored in OTOBO. Check the identifier if you want to overwrite existing configuration item information during import. If not checked, the item will be registered as a new configuration item.
COLUMN Indicates the corresponding column in the CSV file. It is automatically assigned from 0.
UP Shifts the position of the mapping element up one position.
DOWN Shifts the position of the mapping element down one position.
DELETE Deletes a mapping element.
*1: Field names when creating/editing configuration items are primarily in Japanese, but the selections displayed in the key on the mapping information configuration screen are in English. The values in the header line of the output CSV file will also be in English.
Also, when using the template for import, be sure to register the field (key) in "(Table) Mapping elements required for import".
*2: The attribute of the configuration item to be set as the identifier must be unique. If there are multiple rows in the CSV file that have the same value in the column selected as the identifier, an unintentional overwrite may occur.
*3: If "Number" is selected as the identifier, creating a new configuration item by importing a CSV file is unsupported. Number values are automatically assigned by OTOBO and cannot be assigned by the user. If you want to create a new configuration item, you must set a different column as the identifier instead of Number and ensure the values in the corresponding columns in the CSV file to be imported are unique.

5. [Step 5 of 5 - Edit search information:]
Configure settings to limit the number of configuration items to be exported.
If you want to limit the export target, check the [Restrict export per search:] checkbox and set the search criteria in the remaining fields.


(2) Export configuration item

Select [Admin] from the main menu, and then click [Administration] - [Import/Export] to go to the [Import/Export Management] screen, where a list of templates will be displayed.
Click [Export] in the [START EXPORT] column of the template to be exported to download a CSV file based on the template settings.

NoteNote

  • Exporting configuration items downloads a UTF-8 encoded file (CSV format) with no BOM. If you open this file in a text editor, it will be displayed normally. However, if you open the file in Excel, character corruption will occur, so encode the file to UTF-8 with BOM and save it again.



(3) Import configuration item

Select [Admin] from the main menu, and then click [Administration] - [Import/Export] to go to the [Import/Export Management] screen, where a list of templates will be displayed.
Click [Import] in the [START IMPORT] column of the template to be imported and select the CSV file to be imported to retrieve and import the configuration item information from the CSV file based on the template settings.

To create a new configuration item in a CSV file, write the following.

  • Ensure that appropriate values are written in the corresponding columns of the CSV file.
  • If there are fields that are required by creating a new class or editing a class, the CSV file must contain the appropriate values, including the mapping elements for those fields.
  • Mapping elements must include the following.

(Table) Mapping elements required for import

Field (key) Description
Name Configuration item name
Deployment State The deployment status of configuration items
Choose from the following English values.
  • Test/QA
  • Pilot
  • Maintenance
  • Review
  • Repair
  • Retired
  • Expired
  • Inactive
  • Production
  • Planned
Incident State The incident state of configuration items
Choose from the following English values.
  • Incident
  • Operational

NoteNote

The following content cannot be imported or exported.

  • Links between configuration items
  • The import/export definition itself
    When importing a CSV file exported by OTOBO into another OTOBO environment, it is necessary to create a template equivalent to the one used at the time of export in the importing environment.
  • Attachments
Importing CSV files does not allow the deletion of configuration items.