Sometimes it is necessary to import a bunch of objects at the same time, for instance when you create a new custom class for managing objects that only live in Service Manager and cannot be imported by using connectors. For this case the CSV-Import is exactly what you are looking for. The process is straightforward.
For a successful Import-Process you need two files. The first file contains the data that needs to be imported, the second file contains the data structure of the data file. In this example I’m going to import some Software-Objects that should be instantiated. I want to import values for the following attributes:
- Product Name
- Display Name
- Locale ID
- Is Virtual Application (true/false)
First, I create the data file that uses comma-separated values.
Then, an XML file must be created that holds the exact Identifiers of the needed properties. If you are unsure what the exact names are, you can easily verify those by using the Authoring Tool. Just start the tool and switch to the Class Browser. Search for “Software Items”.
If you show the details of the class and the attributes, you can see the ID or Internal Name.
The XML file then looks something like this. The Class-ID in this example is “System.SoftwareItem” and the different attribute-IDs are listed in the correct order (compared to the Data file).
Now it’s time to start the Import Process. This is done by using the Service Manager Console. In the “Administration”-Section you have to start the “Import from CSV file”-Task and specify the correct path to the two files.
After a successful Import, the new objects should be visible in the appropriate configuration items view.