Customizing the Asset-Device Linkage

Within IT Asset Management, certain asset types (such as workstations, servers, and other kinds of computer) are normally linked to records of inventory devices (computers). This link brings together software and hardware inventory and the details you record for your asset register.

To support this practice, the normal behavior of the Business Importer when creating new asset records of the appropriate type is to perform a search for existing inventory devices that are available (in this case, 'available' means that the records have not been marked as ignored, and the records are not already attached to another asset). The search compares the asset's serial number against the serial numbers recorded for inventory devices. If the serial number of the new asset record matches the serial number of an available inventory device, the link between them is automatically created. (This check is also performed by IT Asset Management when new inventory device records are created. This means you can create new asset records as the machines are procured, and once inventory is received from a device with a matching serial number, the link is again created automatically. However, this topic is concerned with behavior when adding an asset record while the inventory device record already exists.)

There may be some circumstances where you want to disable this behavior, or replace it with different behavior. (For example, you may wish to resolve potential conflicts between properties imported with your business adapter, and the same properties that are updated on the asset automatically by IT Asset Management, using data from a matching inventory device record.) You can achieve this customization using the CustomComputerMatching attribute of the Object element in the XML adapter file.

CustomComputerMatching supports the following values:
Value Description
CustomComputerMatching="" (Empty). The default behavior described above is executed using the inbuilt logic.
CustomComputerMatching=" " (Spaces). The inbuilt logic is disabled, and no links to existing inventory devices are created during this import.
CustomComputerMatching="SQL-Value" The placeholder is replaced either with the name of a stored procedure or with a SQL statement to be executed against the compliance database during the import.
If you are using the third option, the following literal keywords can be included in your SQL, and are replaced by the values shown during the import:
Keyword Replaced by
[TemporaryTableName]

The name of the temporary or physical table that the Business Importer uses for the import.

[OutputField]

The name of the field containing the AssetID values for existing or new asset records created.

[ImportID]

The ID of the record in the ECMImportLog_Import table that is reporting the import.

[ImportObjectID]

The ID of the record n the ECMImportLog_Object table that is reporting on the specific object within the import.

When you are creating specific SQL logic, you can retrieve the list of newly created AssetID values with the following query:
Select [OutputField] from [TemporaryTableName] where created =1; 

It is also possible for the SQL statement or procedure to return the number of inventory devices affected by the import. This number is then logged in the ECMImportLog_Object table.

Here is a sample extract of an XML adapter file calling a stored procedure:
<Import Name="Asset"
	Type="CSV"
	ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;
		Data Source=c:\temp;
		Extended Properties='text;HDR=Yes;FMT=CSVDelimited'"
	AccountIsEncrypted="False"
	Query="select * from [asset.csv]">
	<Object Name="Asset"
		Type="asset"
		Output="assetoutid"
		Update="true"
		Create="true"
		CustomComputerMatching="exec MyProcedure [TemporaryTableName], [OutputField]">
		…
		…
	</Object>
</Import>

IT Asset Management (Cloud)

Current