Categories

Introduction

Categories are the main way of classifying products in OpenBoxes. All products must be placed in a category, and no product can be in multiple categories. Categories can be expressed as a simple list, or as a tree with multiple levels. They can be defined based on properties of the item, uses, financial classifications, or any other way that is useful for the user.

Default Category Tree Options

The default category tree in OpenBoxes is a fairly simple list divided into equipment, supplies, and other. Users can choose to use and modify this tree, or create their own.

OpenBoxes also offers the option to import categories from the UNSPSC and WHO via the category and product creation wizard.

Editing the Category Tree

users can edit the category tree on the category page. This can be accessing under the “Products” menu by selecting “Categories.”

To add a category: Select the “Add Category” button at the top of the page. This will bring you to a new screen:

Choose a parent category (the category over this one in the tree). For example in screenshot above, the parent category for “Furniture and Equipment” is “Equipment.” If there is no parent category, choose ROOT. Then enter a name for the category and press create.

You will see you new category available in the tree.

To move a category within the tree: Click the green move arrow and hold, then drag the category to the position you want within the tree. If you want to change the parent category, drag the category over the parent, and let it go directly on top of the new parent category. It will sort your category alphabetically in the child list for that category.

The edit a category: Click the pencil button on the category box. This will bring up an edit screen.

From here, you can change the name of the category, the parent category, or the sort order. Do not check “is root node” unless this is the very top position in the tree!

You can also see the children of this category (the categories below it in the tree). And you can see all products associated with this category (there are none in the example above).

Make any changes you need to make and click save.

Delete Categories: To delate a category, press the red delete button next to the category name. Please note - you will not be able to delete any categories that have children or associated products. You can see the children and products in the edit screen. If you want to delete a category, you will have to first remove all products from the category by updating the product records (you can also use batch edit or a product import). Then you will have to either delete any children, or move them under another category.

Importing a Category Tree from Excel

To import a category tree, go to Configuration>Import Data

On the import data screen, you can download the current category data in the import template. The template only has two fields, Category Name and Parent Category ID.

If your category tree has multiple levels, you will have to do the parent levels first so that you can get your ids for the final import.

Let’s say you have a category tree like this:

Medical Supplies

 

Needles

 

Gloves

Non-Medical Supplies

 

Office Supplies

 

Cleaning Supplies

Make sure you keep the ROOT category that comes preloaded into OpenBoxes. Then import the first level of categories using the parent id ROOT. Leave the id field blank. Your import should look like this:

id

name

parentCategoryId

id

name

parentCategoryId

 

Medical Supplies

ROOT

 

Non-Medical Supplies

ROOT

Choose category under the upload type, select the file, and press upload. This will upload the first level of categories.

Now go back to the import data page, and press download data again. You will get a file that has the categories you imported with ids.

id

name

parentCategoryId

id

name

parentCategoryId

h6576

Medical Supplies

ROOT

c574

Non-Medical Supplies

ROOT

ROOT

ROOT

 

Use these ids as the parent category ids for your next import. The file should look like this:

id

name

parentCategoryId

id

name

parentCategoryId

h6576

Medical Supplies

ROOT

c574

Non-Medical Supplies

ROOT

ROOT

ROOT

 

 

Needles

h6576

 

Gloves

h6576

 

Office Supplies

c574

 

Cleaning Supplies

c574

After importing this file, your category tree should like the example above.

If you have many levels to your category tree, you can repeat this import process as many times as you need to continue adding levels to the tree.