Assigning cases to locations via Case Importer

commcare

How do you assign locations to cases when using the case importer?

Best Answer

In order to have a case be owned by a location, you need to set the owner_id column in the Excel file being uploaded. This requires a two-step process.

Getting the location_id from your list of locations

To get the location id that you are looking for, you can bulk download your locations:

screen shot

Once you have the Excel file, you can open that up and you will find a column called location_id. This is the id you want when setting the owner_id.

Setting the owner_id of imported cases

If you have a location id (my-location-id) that you would like to have own a particular case, you can add this in your Excel file to import cases:

sample Excel file

Now when you import the cases, that case will be owned by the location specified in owner_id.