Importing Assets to existing hardware model

Sam Kinney
Kilo Contributor

I have a question and it's probably easy, but I am overlooking something.  I am using the hardware asset template to upload assets to our stockrooms. When I do this it is not correlating the asset with the hardware model.  From what I see it is generating a generic hardware model.  "ThinkPad T590" without a manufacturer or category.  The model doesn't actually exist in the models table.  It is not adding the asset to the ThinkPad T590 model in production that was created manually.  What am I missing?

14 REPLIES 14

You assumption about "if the serial numbers already exist' is a definite possibility, however my query was actually more basic to:

Can my transform map handle both updating existing assets as well as inserting new ones  OR should i split my data and do two separate imports, one for updating and one for 'sync up' to update data.  

The data set is not currently being scanned for by discovery so right now its just manual data wrangling.

 

 

Hi Les,

 

You could do both at the same time but I am going to recommend you do them in two batches and here is why:

 

If you encounter any issues (and you might as we all do), you will have an easier time debugging the cause of why an asset wasn't inserted as a new asset or updated to find a corresponding match on the ci by serial number and model category record for its association.

 

One of the early things I learned in ServiceNow, were the little catchphrases that guide my activities in regard to interacting with SN - regardless of my role, position, or experience. 

 

The one that comes to mind here is this one:

"Just because you can, doesn't mean you should".

 

Ponder that when you see the extra time it will take to run two jobs vs. debugging issues with one multi-step job.  You'll figure out quickly which one of the two paths is the more efficient of the two or many more ways for completing what you want to get done.

 

Let us all know if you chose one way and hopefully, you also are successful.

Regards,

Phil

Thanks for your advice Phil

i think i will proceed with doing separate imports for "insert" vs "update" -- i was still struggling with how to get servicenow to Insert assets and match to the right Model but per below i finally got it and was more straightforward than i was presuming.

As Daniel above had said, just need a 'model_number' attribute/column in the input xls which is a match for an existing Model (dont have duplicate models that have the same model number).  then in the transform map, for the source field "model_number"  from your spreadsheet you target Model on the table, and then save the map but then go into and edit the entry for Model and for "reference value field" set it to "model_number" like in your spreadsheet.  Dont set the coalesce flag as this is for Insert only, and updating prolly have undesired effect. screenshot below

expectation from this is that you'll get inserted Asset records, associated for the appropriate Model, and CI's will also autogenerate associated to the new assets.

find_real_file.png

 

Hi Les,

I looked at your screenshot of the transform map

Please correct me if I am wrong but it looks like you are mapping the model name to the model number?

The model number was deprecated in preference to using the field "model id".  Model Id on the CI record logically maps to the Model Name on the asset record to associate that model id with that model name when you associate a Hardware product model to the model asset category.

For example: If you Manually create a NEW model name called:

 

"Dell Precision 7450" which is represented in the form as

Dell {manufacturer} Precision {Make} 7450 {Manuf assigned "model"}.

(by clicking the"New" button on the hardware product model table)

 

Any time you create a new model, you have to populate at least one entry in the hardware product model table so as to be able to properly associate the asset of the machine (the actual device asset) to the ci representing the asset. 

The synchronization occurs between asset model category and hardware product model (so for the Model Asset category of Workstations or Computer you have a CI Name (workstation or computer) record with the MODEL ID of Dell Precision 7450 (Model Id being the concatenation of the Manufacturer+Make/Model) AND that is what is synchronized with the ASSET name of DELL Precision 7450. 

The coalesce on serial number ensures that if there are 10 Dell Precision 7450's each one is unique by the fact that there are 10 unique serial numbers for that make model combination from the manufacturer of that specific HW device. 

Now if SCCM discovers the hardware it will associate through IRE if a match exists for what it discovers for that manufacturer-make-model combo to see if it exists already in the hardware product model table (hence why manually you need to have a model entry in that table once you start to order/purchase those model type of assets).  By doing so, there will be an association of that discovered model with the ci and determine based on the serial number if a ci exists or if not creates the ci as it is now discovered on the network.

In your particular situation with a list of asset numbers and unsure if they exist, means you really ought to run a report first to bother all of the assets that met the asset category you are looking to update and/or insert and also a CI run for the model id's that meet your specification the list of the id for the models that you are trying to match to those assets.

Now with all of what I have said I rarely do this; I am pasting in a section from the SN documentation from version Rome that describes how assets and CI's synchronize and also what appears on the general tab of the asset form.  It answers some basic underlying concerns that I beleive you may be facing in resolving some of your issues.

 

Asset and CI creation properties

glide.create_alm_asset.async

The system property glide.create_alm_asset.async controls whether assets are created immediately when a configuration item (CI) is created, or are created after a delay. A delay in asset creation allows large numbers of CIs to be created quickly. When this property is set to true, assets are created by the Asset - Create asset delayed sync scheduled job that runs every 15 minutes. View the status of the scheduled job in the Asset Job Log table [asset_job_log]. To view assets waiting to be created and asset creation errors, navigate to Asset > Administration > Asset Creation Queue. To reprocess an error, update the state from Error to Ready. The next time the scheduled job runs, it reattempts to create the asset.

When the glide.create_alm_asset.async property is set to false, assets are created immediately from CIs.
 
Note: The default value of this property is false if you upgrade to Rome from Orlando or earlier. Before updating this property, review your processes that depend on an asset value present on a CI and make any necessary changes to account for delayed asset creation.
 
glide.asset.create_ci_with_ire
The system property glide.asset.create_ci_with_ire enables CIs to be created from assets using the ServiceNow® Configuration Management Database (CMDB) Identification and Reconciliation engine (IRE). This property affects CI classes that have an identification rule on serial number and have no dependent relationships with other CI classes.
 
Note: CI classes that are extended from the hardware CI class [cmdb_ci_hardware] are also created from assets using the IRE, but are not controlled by this property.
 
CIs created with the IRE are named using the format Serial number - Model name and the source is SNAssetManagement. The Serial number field is mandatory on assets with model categories that correspond to these CI classes. Asset creation fails if its serial number is present on an existing CI or asset. The Serial number field is also required to receive purchase order line items for model categories that correspond to these CI classes.
 
The Serial number field is not mandatory to create pre-allocated assets, but the serial number must be provided when the asset is allocated.
 
Note: The default value of this property is false if you upgrade to Rome from Orlando or earlier. Before updating this property, review customizations on the Serial number field and any integrations or flows that use an existing serial number to create an asset.

Create assets

You can create hardware, software license, consumable, license, software entitlement, and facility assets.

Before you begin

Role required: asset

Procedure

  1. Navigate to Asset > Portfolios > All Assets.
  2. Select the type of asset you want to create.
  3. Click New.
  4. Fill in the fields.
    Asset record fields
    Field Description
    Display name Name of the asset as it appears in record lists. Automatically set when asset is created, based on Asset Tag and Model fields.
    Model category Model grouping of the asset. Based on the model category selected, the asset can be linked to a configuration item.
    Model Specific product model of the asset.
    Configuration Item CI automatically created when this asset is created. The name that appears in this field is based on Serial number and Model. Point to the reference icon to see the configuration item details inherited from the asset record.
    Quantity Number of items this asset represents. An asset always has a quantity of one unless one or more of these points are true.
    • It is a consumable. Quantity is unrestricted because consumables are tracked in groups.
    • It is pre-allocated. Quantity is unrestricted when Model category and Model are defined and Substate is set to Pre-allocated.
    General

    Not all fields are available for each type of asset.

    Asset tag Alphanumeric information assigned by your organization to help track the asset.
    State Current state of the asset, such as On order or In use.
    Assigned to Person using or primarily responsible for this item. This field is visible when the asset state is In Use.
    Managed by Person who maintains the asset. This can be different from the person in the Owned by field.
    Owned by Person who has financial ownership of the asset. This can be different from the person in the Managed by field.
    Parent Parent asset of the asset. For example, a monitor or peripheral can have a workstation as their parent asset. When a parent link is defined, the fields related to assignment and state of the child assets is set to read-only and are populated based on the parent assignment and state fields. For more information, see Creating Bundled Models.
    Class Asset group, for example, base, hardware, license, or consumable.
    Comments Information about the asset that would be helpful for others to know.
    Serial number Serial number of this asset.
    Substate Current substate of the asset. The available substate settings depend on the state selected. For example, the Retired state contains the Substate options DisposedSoldDonated, and Vendor credit.
    Location Current physical location of the asset.
    Department Department to which the asset belongs.
    Company Company or organization to which this asset belongs.
    Assigned Date on which the asset was assigned to a user.
    Installed Date on which the asset was installed.

 

Hope this helps,

Phil

I went the path of just focusing on Insert of new asset records (instead of trying to do the whole Insert OR update scenario)

So with this insertion, i wanted to make sure that the desired Model was used for the new asset, because going off of model display name, we have multiples with same display name but with different model numbers.

in the map i'm pulling in a Model Number from the spreadsheet and mapping it to the Model.model_number field in the generated Asset. in my initial test this appears to have met the desire for the app to pick the right model.

 

on your note about model number deprecation, i couldnt find anything about that in docs, even in the docs for San Diego it still has model number, and i dont see a Model ID field  unless i'm just missing it. it sounds like you're referring to model.display_name which joins Name and manufacturer from what i understand (or dont understand)  🙂

 

thanks for the responses. it appears that a simply import set process will work for new asset records. And if updating records hopefully i'll have Serial number or asset tag to coalesce on.