Skip to content

How to bulk assign key / hook numbers to assets

In short: Export your assets to a spreadsheet, copy that data into the asset import example file, add a key / hook number to each row, and import it back. Every asset in the file gets its number in one go.

When you’d do this: When you’re getting a board that already exists into Keyhive. The hooks are numbered, the assets are in Keyhive, and pairing them up one at a time would take all afternoon. For one or two, assign them directly instead.

Before you start

Add your key / hook numbers to Keyhive first. The import can only match numbers that already exist. See How to create a key / hook number or How to import key / hook numbers from a spreadsheet. A number that isn’t there yet is skipped quietly: the row still imports, it just doesn’t get a number.

Assets are matched by name, exactly as written. This is why you start from an export rather than typing a list. If a name in your file doesn’t match an asset in Keyhive, whether a changed word, a missing postcode or an extra space, Keyhive creates a new asset instead of updating the one you meant.

Don’t change any of the exported data. Names, descriptions and types come out of Keyhive correct. Copy them across as they are and add the numbers: that’s the only column you should be typing in. Blank cells overwrite, so an empty description column wipes the descriptions you already have.


Steps

1. Export your assets

Click Assets in the sidebar, then Export Assets. Leave the columns as they are and click Export. When it finishes you’ll get a notification in the bell menu. Click Download .csv and open the file.

You now have every asset with its name, type, description and any numbers it already has.

2. Download the import example file

Still on the Assets page, click Import Assets, then Download example CSV file in the modal. Leave the modal open; you’ll come back to it.

You now have two files: your exported assets, and an empty example file with the headings Keyhive expects.

3. Copy your data into the example file

Work in the example file and keep its headings exactly as they are. Copy each column across from your export:

  • Name goes into the name column.
  • Description goes into the description column.
  • Type goes into the asset_type_name column.
  • Key / hook number(s) goes into the key_number column.

The export’s other columns, including Managing branch, Status and Number of key sets, aren’t part of the import. Leave them behind.

You can delete rows for assets you aren’t changing. The rows you keep must stay exactly as they came out.

4. Fill in the key / hook number column

Put the number for each asset in the key_number column. If an asset needs more than one hook, separate them with commas: 52, 53.

Any numbers that came across from the export are already in the right format, so you can leave them and add to them.

Save the file as a CSV. That’s the format it already came in, so Save is usually enough.

5. Upload it and check the columns

Back in the Import Assets modal, drop the file onto the upload box. Because you kept the example file’s headings, Keyhive matches your columns up for you. Check each one has landed on the right heading before you go on.

6. Choose what happens to existing key sets

The modal has an Existing key sets on asset dropdown. It decides whether the asset’s key sets pick up the number too, and it starts on Leave unchanged, which gives the number to the asset but leaves its key sets without it.

Pick Assign key / hook number (keep current set name). The asset’s key sets get the number and keep the names they already have.

The other two options both rename your key sets: clear set name empties the names, and rename A, B, C… replaces them with letters in order. Only choose those if your key set names are wrong and you want Keyhive to redo them.

7. Import

Click Import. It runs in the background, so you can carry on working. You’ll get a notification when it’s done, telling you how many rows went through.

8. Check it worked

Export your assets again and look at the Key / hook number(s) column. Anything still empty is an asset whose number didn’t take, almost always because that number isn’t in Keyhive yet, or the spelling in the file didn’t match.


Good to know

  • Importing only adds. Taking a number out of the column doesn’t unassign it. To remove a number from an asset, do it on the asset. See How to assign a key / hook number to an asset.
  • You can run it again. Assets already in Keyhive are updated rather than duplicated, as long as the names still match, so it’s fine to fix a few rows and re-import the file.
  • A number already in use won’t move. If you give a number to an asset and it’s attached to a different one, check the In use tab on the Key / Hook Numbers page and free it up first.
  • The same file can create assets. A row whose name doesn’t match anything becomes a new asset, which is useful if you’re adding assets and numbers together, and the reason to be careful with names when you’re not.
  • Only the first number reaches the key sets. If you give an asset several numbers, all of them attach to the asset, but its existing key sets are all put on the first one. Move individual key sets afterwards if they hang in different places.
  • An asset with no key sets yet is fine. It keeps its number, and any key set you create for it later picks the number up.