How do you assign locations to cases when using the case importer?
Assigning cases to locations via Case Importer
commcare
Related Topic
- Viewing supply point cases at a supervisory level
- Display the owner of a case in the case list
- Can mobile workers view case data from multiple locations
- CommCare – Check Unique Case Property Against Saved Cases
- CommCare – Benefits of Case Sharing via Locations vs. Groups
- CommCare – How to Set Up Excel Import to Update Case Property to Null
- How to get the reference ID of an extension case during a case export
- How to filter a case list to display only cases that the mobile user’s location owns
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:
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 theowner_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:Now when you import the cases, that case will be owned by the location specified in
owner_id
.