Import Locations
Finding the Location Import Template
To find the location import page and template, go to Configuration>Import Data
This will bring you to the import data page. It lists a number of available import types.
Next to type “locations” there are options to download template and download data. Download template will download a blank csv template. Download data will download a template with the location data currently in the system already entered.
Creating Locations via the Import Template
To create new location, start by downloading a blank template. There will be two sample locations to show you how to format the data. Make sure to delete this before you do the final import. There will also be a separate tab with instructions for filling out the template. Fill out the template following the step by step guide for each field. These instructions are also listed below. * indicates a required field.
id: Leave blank
Name*: Write in the name you want to call the location. The name must be unique - you will get an error if there are duplicates. Avoid special characters
Active*: TRUE means location should be visible and usable in system. FALSE is a way of removing the location from the UI.
LocationType*: Choose from location types listed in the system. These can be configured, but system defaults are Depot, Supplier, Ward, Dispensary, Bin Location, or Receiving. See Location Types and Supported Activities
Organization*: Enter the larger organization to which this location belongs. Either choose from the list of existing organizations or write in the organization name to create an organization via import (be careful not to accidentally create a duplicate). Can be the same or different from location name. See Configure Organizations and Locations
ParentLocation: If this is a bin location, enter the name of the parent depot. Otherwise leave blank.
LocationNumber: Nickname or shortened version of the name that will be referenced instead of the full name if space is tight
LocationGroup: Choose from the list of existing location groups. See Location Groups
streetAddress1: Enter first line of address
streetAddress2: Enter second line of address
City: Enter city or third line of address
stateProvince: Enter state or fourth line of address
postalCode: Enter state or fourth line of address
Country: Enter country or sixth line of address
Description: Enter any other description of this location or an additional line of the address
Once your file is complete, save it. On the import data page, select locations and choose your saved file. Click import.
The next page will show you the data you are importing. If you see error messages at the top, like in the example above, you will need to edit and reupload your file. If you have nor errors and your data looks good, press import to import to locations. You will get a message saying the import is successful, and your new locations will be visible in the location list.
Edit Locations via the Import Template
Editing locations is very similar to creating locations, so please read that section first and ensure that you understand it. There are a few key differences with editing versus product creation. The first is that you don't start from a blank template. Instead you start from a list of existing locations
Download the CSV of all locations on the import data screen. This will give you a list of all locations with ids.
Delete the locations you DO NOT want to edit: This is not strictly necessary. If you reimport the same locations with no changes, nothing bad will happen. But it will make the import much slower, and it will also make it easier to make mistakes. So it is better to delete all records you are not updating from the sheet
Change the fields you want to update:
DO NOT change the id field. This is how OpenBoxes identifies the location
Deleting the value in a cell will overwrite that value with a blank. For example if you delete the address field for a particular location, that will delete it in OB.
If you change the location type for a location, the location automatically use the default supported activities for the new location type. Any previous customizations made to supported activities will be erased. Customs can be redone in the location screen after import.
Import the final file
Review the changes
And import! You can see the changes in the location list or by exporting a new location list file