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

You don’t need to create the numbers first. A number in your file that isn’t in Keyhive yet is created as part of the import. Check the spelling: 52A and 52 A are two different numbers, so a typo creates a new one.

Assets are matched by name. This is why you start from an export rather than typing a list. Capital letters and spaces at either end of a name don’t matter, but any other difference, such as a changed word or a missing postcode, means 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. Leave archived assets out of the export (they’re hidden unless you’ve changed the Archived filter): the import doesn’t update archived assets, so their rows would create new copies. 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.

Delete the rows for assets you aren’t changing. Every row with a number can move that asset’s key sets (see step 6), even if you didn’t touch it. 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.

If your numbers start with a zero, such as 007, check them before you save. Excel can drop the zeros and turn 007 into 7, which Keyhive treats as a different number.

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.

In the Asset type dropdown, choose Use the asset type column from my file. Each asset then keeps the type in its row.

6. Choose what happens to existing key sets

The Existing key sets on these assets dropdown decides whether each asset’s key sets go on the number too, and what happens to their names. It starts on Don’t change them, which gives the number to the asset but leaves its key sets without it. Pick the option that matches how your key sets are named now:

  • The set names already include the number, such as 16A, 16 B or 17c: choose Assign number, remove it from the set name. Each key set goes on the number its name starts with, and the rest of the name stays as the set name, so 16a becomes 16 A. An asset with sets on more than one hook works too, as long as all its numbers are in the row: 16A goes on 16 and 17A goes on 17. A key set whose name doesn’t start with one of the row’s numbers, such as Office, is left as it is.
  • The set names don’t include the number, such as A, B or Office, and all of the asset’s key sets hang on the same hook: choose Assign number, keep set name. A becomes 16 A.
  • You want Keyhive to rename the sets: choose Assign number, rename A, B, C…. The sets are lettered in the order they were added, whatever they’re called now.
  • The key sets hang on different hooks and their names don’t include the number: leave it on Don’t change them, then move each key set to its hook afterwards.

Assign number, remove it from the set name is the only option that can put an asset’s key sets on different hooks. The other options that assign a number put all of them on the same one.

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. If you chose Assign number, remove it from the set name, it also tells you how many key sets were left as they were because their names didn’t start with the asset’s number.

8. Check it worked

Export your assets again and look at the Key / hook number(s) column. An asset still without a number almost always means its name in the file didn’t match, so the number went onto a new asset with that name instead. Search for the new asset, archive it, and fix the name in the file before you import it again.


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 moves. If you give an asset a number that belongs to a different asset, the import moves it, and the other asset’s key sets lose it. Check the In use tab on the Key / Hook Numbers page first if you aren’t sure.
  • 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.
  • A set named only the number keeps its name. A key set called 35 goes on number 35 but stays called 35, so it shows as 35 35. Rename it on the key set afterwards.
  • An asset with no key sets yet is fine. It keeps its number, and any key set you create for it later in the portal picks the number up.